I am reading a C # WPF book and in the routed events chapter the event has 2 identical Source and OriginalSource properties. I did not see the difference between the two:
Xaml:
<Button Name="Ok" Click="Ok_Click"/>
Code behind:
private void Ok_Click(object sender, RoutedEventArgs e) { bool flag = false; var source = e.Source; var originalSource = e.OriginalSource; if (source == originalSource) { flag = true; } }
and flag property is true here, can anyone explain why 2 is the same property or in this case these properties have no effects? or where can we see a use case for these properties?
source share