Skip to content

Slider Binding Initialization Order Causes Incorrect Value Assignment in XAML #32903

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
Environment:

Visual C++ 2026   00487-30000-00000-AA247
Microsoft Visual C++ 2026

.NET MAUI ツール   18.0.343 (e540c31511)
.NET MAUI 開発を有効にする Visual Studio 拡張機能。

ASP.NET and Web Tools   18.0.333.805
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   18.0.333.805
Azure App Service Tools v3.0.0

Boost.Test のテスト アダプター   1.0
Boost.Test 向けに作成された単体テストを含む、Visual Studio のテスト ツールを有効にします。 拡張機能のインストール ディレクトリに、使用条件およびサード パーティからの通知が含まれています。

C# ツール   5.0.0-2.25529.7+68a9207cafc10bb08d345e32f06dd1a91ab7a6a2
IDE で使用する C# コンポーネント。 プロジェクトの種類や設定に応じて、異なるバージョンのコンパイラを使用できます。

Code Cleanup On Save   1.0.12
Automatically run one of the Code Clean profiles when saving the document. This ensures your code is always formatted correctly and follows your coding style conventions.

GitHub Copilot   18.0.925.419
GitHub Copilot は、コードの記述速度の向上と作業量の削減に役立つ AI ペア プログラマーです。

Mono Debugging for Visual Studio   18.0.15 (76f6142551)
Support for debugging Mono processes with Visual Studio

NuGet パッケージ マネージャー   7.0.0
Visual Studio 内の NuGet パッケージ マネージャー。 NuGet の詳細については、https://docs.nuget.org/ にアクセスしてください

Razor (ASP.NET Core)   18.0.2.2551302+48a2659b91e7032c97ea024751a6ea9469a94d7f
ASP.NET Core Razor の言語サービスを提供します。

Test Adapter for Google Test   1.0
Google Test 向けに作成された単体テストを含む、Visual Studio のテスト ツールを有効にします。 拡張機能のインストール ディレクトリに、使用条件およびサード パーティからの通知が含まれています。

TypeScript Tools   18.0.0912.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic ツール   5.0.0-2.25529.7+68a9207cafc10bb08d345e32f06dd1a91ab7a6a2
IDE で使用する Visual Basic コンポーネント。 プロジェクトの種類や設定に応じて、異なるバージョンのコンパイラを使用できます。

Visual C++ for Cross Platform Mobile Development (Android)   15.0.11104.47
Visual C++ for Cross Platform Mobile Development (Android)

Visual F# Tools   18.0.0-rc2.25522.6+db81a081913bbaa32e528305723c07d98fd598b8
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2.3152.23957
Visual Studio 向けの AI 支援付き開発。

VSPackage 拡張機能   1.0
VSPackage Visual Studio 拡張機能の詳細情報

Xamarin Designer   18.0.1.33 (remotes/origin/HEAD@44462085bc)
Visual Studio で Xamarin Designer ツールを有効にするための Visual Studio 拡張機能。

Description:
When using XAML data binding for a Slider control in .NET MAUI, the initialization order of bindings appears to be Minimum → Value → Maximum. This causes the Value property to be evaluated before Maximum is set, resulting in the Value being treated as out of range and forcibly set to Minimum.
This behavior leads to incorrect initial values even when the ViewModel provides valid defaults.

Steps to Reproduce:

  1. Create a MAUI project with a Slider bound to three properties in a ViewModel:

<Slider Minimum="{Binding ValueMin}"
        Maximum="{Binding ValueMax}"
        Value="{Binding Value, Mode=TwoWay}" />

  1. In the ViewModel, set initial values:
public double ValueMin { get; set; } = 10;
public double ValueMax { get; set; } = 100;
public double Value { get; set; } = 50;
  1. Run the application.

Expected Behavior:
The Slider should initialize with:

Minimum = 10
Maximum = 100
Value = 50

Actual Behavior:

Minimum is correctly set to 10.
Value is evaluated before Maximum is applied, so the Slider considers 50 out of range and forces Value to Minimum (10).
After Maximum is set to 100, Value remains at 10 instead of 50.

Additional Notes:

Adding FallbackValue does not solve the underlying issue; it only masks the problem.
The issue seems related to XAML binding evaluation order in Visual Studio or MAUI runtime.


Original Comments

Feedback Bot on 11/28/2025, 04:21 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Metadata

Metadata

Assignees

Labels

area-controls-sliderSliders/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions