InvokeCommandAction on ValueChanged for UpDown control

Hello , I need to perform an InvokeCommandAction on the ValueChanged event for an Updown control, like in the code below.

But the command is not called. However if I replace ValueChanged by ValueChanging, I am receiving the command. I know I can call the function of my command in the "set" of MyProperty but in my application the code is a little bit different as the property is in a model in a collection and the command in a viewmodel.

Is there some workaround without code behind or is it considered a bug and can be fixed ? the version of Syncfusion package is 19.4.0.48

 xmlns:i="http://schemas.microsoft.com/xaml/behaviors"

<syncfusion:UpDown Value="{Binding MyProperty}">

                <i:Interaction.Triggers>

                    <i:EventTrigger EventName="ValueChanged">

                        <i:InvokeCommandAction Command="{Binding Path=MyCommand}"></i:InvokeCommandAction>

                    </i:EventTrigger>

                </i:Interaction.Triggers>

            </syncfusion:UpDown>




1 Reply

SN Sudharsan Narayanan Syncfusion Team March 23, 2022 03:59 AM UTC

Hi Raouz,

We have checked the reported issue that “Value Changed not triggered” from our end. In the Up Down, the Value changing event is 
RoutedEvent and ValueChangedevent is PropertyChangedCallBack, so it doesn’t trigger on value change in the InvokeCommandAction. To achieve the requirement, you can bind the value to a property in View Modal and get notification from View Modal’s setter or INotifyPropertyChanged.PropertyChanged event.  

Regards,
 
Sudharsan 


Loader.
Up arrow icon