Skip to content

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

Closed

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.

Activity

  1. HarishKumarSF4517 commented on Nov 28, 2025

    @HarishKumarSF4517
    Contributor

    This issue has been validated in Visual Studio Code 1.106.3. It was reproducible when we apply binding to the slider control.
    Note: The user mentioned that the actual behavior value as 10 but from my side it shows value: 1. I have attached the SliderSample.zip and video for reference.

    Screen.Recording.2025-11-28.at.5.57.32.PM.mov
  2. added
    t/bug
    s/verified
    s/triaged
    on Nov 28, 2025
  3. added a commit that references this issue on Nov 28, 2025
    2cd5a1a
  4. self-assigned this
    on Nov 28, 2025
  5. StephaneDelcroix commented on Dec 1, 2025

    @StephaneDelcroix
    Contributor

    same issues: #14472, #18910, #12243

  6. added a commit that references this issue on Dec 1, 2025
    c45c527
  7. added this to the Backlog milestone on Dec 16, 2025
  8. added 4 commits that reference this issue on Dec 22, 2025
    334691d
    f67e73e
    fc542e9
    7499b16
  9. added a commit that references this issue on Dec 30, 2025
    eabed2b
  10. added 6 commits that reference this issue on Jan 5, 2026
    591d44a
    e3bbe0e
    47b4d9e
    daeb933
    5c184c0
    46cd9ce
  11. added a commit that references this issue on Jan 13, 2026
  12. added a commit that references this issue on Jan 16, 2026
    a1c7f01
  13. locked and limited conversation to collaborators on Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-controls-sliders/triageds/verifiedt/bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions