Beispiel #1
0
        /// <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();
            }
        }
Beispiel #2
0
 /// <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();
 }
Beispiel #4
0
        /// <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();
        }
Beispiel #5
0
 /// <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();
 }