Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Detect changes for an already existing property

$
0
0

I am extending a textblock element, and in the specific I have to detect changes of its ForegroundProperty.

How can I do this ?

for a custom property I write something like this:

public static readonly DependencyProperty MyProperty =
            DependencyProperty.RegisterAttached("Property",
            typeof(bool), typeof(MyClass), new PropertyMetadata(false, PropertyChanged));

What if a property already exists?

Thank you 


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>