How to catch SourceUpdated for nested window children?

I would like to know when any input element in my window updated the binding source.

Input elements can be TextBox, RadioButton, Slider, ComboBox, etc. and can be nested in UserControls or Panels.

Capturing SourceUpdated would be nice, but it is not a routable event, so the parent template was not spoiled.

Is there an easy way to do this?

+3
source share
1 answer

SourceUpdated creates bubbles from nested children, but NotifyOnSourceUpdated must be set in the Binding expression:

<StackPanel SourceUpdated="StackPanel_SourceUpdated">
    <TextBox Text="{Binding Path=Val1, NotifyOnSourceUpdated=True}" ></TextBox>
</StackPanel>

I would still like to hear about a method that does not require setting NotifyOnSourceUpdated for each binding expression.

+2
source

Source: https://habr.com/ru/post/1786815/


All Articles