Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF combo box update source trigger
    text
    copied!<p>I've added triggers for combobox, i.e. </p> <ul> <li><p>When combo box is 'Disabled' then 'Text' property should set to '1' and added updatesourcetrigger to property changed.</p></li> <li><p>When combo box is 'Enabled' then 'Text' property should be selected one and added update source trigger to property changed.</p></li> </ul> <p>But the problem is I'm unable to call the update source trigger when combo box is Disabled and 'Text' property is set to '1'.</p> <p>Below is the XAML code snippet:</p> <pre><code>&lt;ComboBox Name="cmbIntervals" Grid.Row="5" Grid.Column="1" Width="150" HorizontalAlignment="Left" VerticalAlignment="Top" IsEnabled="{Binding ElementName=chkRollingInterval, Path=IsChecked}" ItemsSource="{Binding Source={x:Static es:MasterParameters.Instance}, Path=NoOfIntervals}" Tag="{Binding Path=[NoOfIntervals], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" &gt; &lt;ComboBox.Style&gt; &lt;Style TargetType="{x:Type ComboBox}"&gt; &lt;Style.Triggers&gt; &lt;Trigger Property="IsEnabled" Value="False"&gt; &lt;Setter Property="Text" Value="1"/&gt; &lt;Setter Property="Text" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag, Mode=TwoWay, UpdateSourceTrigger=Default}"/&gt; &lt;/Trigger&gt; &lt;Trigger Property="IsEnabled" Value="True"&gt; &lt;Setter Property="Text" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/&gt; &lt;/Trigger&gt; &lt;/Style.Triggers&gt; &lt;/Style&gt; &lt;/ComboBox.Style&gt; &lt;/ComboBox&gt; </code></pre> <p>From above XAML code when ever i updated 'Text' property to '1' for combo box 'Disabeld' mode i need to update this '1' value to the source property i.e. 'Tag' and from there to 'NoOfIntervals' but it doesn't happening.</p> <p>Thanks, Nag</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload