/// <summary> /// Occurs when the value of the <see cref="TextElement.Font"/> dependency property changes. /// </summary> private static void HandleFontChanged(DependencyObject dobj, SourcedResource <SpriteFont> oldValue, SourcedResource <SpriteFont> newValue) { var textElement = dobj as TextElement; if (textElement != null) { textElement.ReloadFont(); } }
/// <summary> /// Occurs when the value of the <see cref="Font"/> dependency property changes. /// </summary> private static void HandleFontChanged(DependencyObject dobj, SourcedResource <UltravioletFont> oldValue, SourcedResource <UltravioletFont> newValue) { ((Control)dobj).ReloadFont(); }
/// <summary> /// Occurs when the value of the <see cref="Font"/> dependency property changes. /// </summary> private static void HandleFontChanged(DependencyObject dobj, SourcedResource<SpriteFont> oldValue, SourcedResource<SpriteFont> newValue) { ((TextBlockBase)dobj).ReloadFont(); }
/// <summary> /// Occurs when the value of the <see cref="Source"/> dependency property changes. /// </summary> private static void HandleSourceChanged(DependencyObject dobj, SourcedResource <Graphics.Graphics2D.Sprite> oldValue, SourcedResource <Graphics.Graphics2D.Sprite> newValue) { var sprite = (Sprite)dobj; sprite.ReloadSource(); }
/// <summary> /// Occurs when the value of the <see cref="TextElement.Font"/> dependency property changes. /// </summary> private static void HandleFontChanged(DependencyObject dobj, SourcedResource<SpriteFont> oldValue, SourcedResource<SpriteFont> newValue) { var textElement = dobj as TextElement; if (textElement != null) textElement.ReloadFont(); }