When the Minimum property is changed, the Value property becomes null.

Editors for WPF Forum

The latest build of this product (v25.1.2) was released 9 days ago, which was before this thread was created.
Posted 4 days ago by Yuki Ogawa
Version: 25.1.2
Platform: .NET 8
Environment: Windows 11 (64-bit)
Avatar

Hello,

There is unexpected behavior with the Int32EditBox. Could you please confirm whether this is intended behavior or a bug?

  • Issue:
    When the Minimum property is changed, the Value property becomes null.
  • Steps to Reproduce:
    1. Build the following XAML code
      <Window x:Class="WpfApp1.MainWindow"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:editors="http://schemas.actiprosoftware.com/winfx/xaml/editors"
              Title="MainWindow" Height="200" Width="300">
          <StackPanel>
              <editors:Int32EditBox x:Name="input" IsNullAllowed="False"/>
              <editors:Int32EditBox x:Name="output" Minimum="{Binding Value, ElementName=input}" IsNullAllowed="False"/>
          </StackPanel>
      </Window>
      ​
    2. Click the Increment button of the upper Int32EditBox twice
    3. The Value property of the lower Int32EditBox becomes null
  • Expected Behavior:
    The value 2 is displayed in the Int32EditBox.
  • Actual Behavior:
    The Int32EditBox is blank/empty. The Value property is null.

Best regards, Yuki Ogawa

Comments (2)

Posted 3 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Thank you for the sample steps.  We debugged this and oddly it seems that the coerce callback for the Value property on the second time passes in the the original "output" edit box's Value, which in your XAML is null since it's not set.  We will update the logic for the next version to work around this.

We also found in the current version that if you set Value="0" in your XAML initially, it prevents null from being sent to the coerce and it will work as expected.  That is a temporary workaround you can implement.


Actipro Software Support

Posted 3 days ago by Yuki Ogawa
Avatar

Thank you for your investigation.
We look forward to the release of the next version.

Add Comment

Please log in to a validated account to post comments.