Skip to content

TargetNullValue causes null value in Slider Controls #11400

@GrafJ-AUMA

Description

@GrafJ-AUMA

Description

I am using a slider, bound to a nullable decimal in a view model. It's a percentage value from 0 to 100 in with 0.1 accuarcy. I defined a TargetNullValue at 50. If I click on the slider to move it a slinge step (IsMoveToPointEnabled="False") and I reach the TargetNullValue, the value get set to null.

Reproduction Steps

  1. Create a new empty WPF Project
  2. Add a slider bound to a nullable decimal in a view model
  3. Define a TargetNullValue for the bound value
  4. Set Min to 0 and max to 100
  5. Click as long as needed to move the slider to the target null value

Expected behavior

The value gets set and is not null. If I moved the slider before (Sliding aroung), it works as expected.

Actual behavior

The bound value is set to null.

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

.NET Framework 4.8 on Windows 11 x64

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions