Search TextBlock horizontal alignment centered

Please leave the statement after ```if``` or ```else``` condition to a new line, so it doesn't get too long.