/// <summary> /// Callback function called when TextFontWeight dependency property is changed /// </summary> static void TextFontWeightChanged(DependencyObject property, DependencyPropertyChangedEventArgs args) { DrawingCanvas d = property as DrawingCanvas; HelperFunctions.ApplyFontWeight(d, d.TextFontWeight, true); }