I have a control which inherits from (you guessed it) Control.
I want to receive a notification whenever the FontSize or Style properties are chang
It's a rather disgusting hack, but you could use a two-way binding to simulate this.
i.e. have something like:
public class FontSizeListener {
public double FontSize {
get { return fontSize; }
set { fontSize = value; OnFontSizeChanged (this, EventArgs.Empty); }
}
public event EventHandler FontSizeChanged;
void OnFontSizeChanged (object sender, EventArgs e) {
if (FontSizeChanged != null) FontSizeChanged (sender, e);
}
}
then create the binding like:
then hook up to the listener's event in your control subclass.