예제 #1
0
 protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
 {
     if (e.Property == VisualElement.FontProperty)
     {
         this.OnFontChanged(EventArgs.Empty);
     }
     else if (e.Property == VisualElement.CustomFontProperty || e.Property == VisualElement.CustomFontSizeProperty || e.Property == VisualElement.CustomFontStyleProperty)
     {
         FontFamily family     = (FontFamily)null;
         string     customFont = this.CustomFont;
         if (!string.IsNullOrEmpty(customFont) && customFont != "None")
         {
             family = ThemeResolutionService.GetCustomFont(customFont);
         }
         if (family == null)
         {
             int num = (int)this.ResetValue(VisualElement.FontProperty, ValueResetFlags.DefaultValueOverride);
             return;
         }
         if (!string.IsNullOrEmpty(customFont))
         {
             int num1 = (int)this.SetDefaultValueOverride(VisualElement.FontProperty, (object)new Font(family, this.CustomFontSize, this.CustomFontStyle));
         }
     }
     base.OnPropertyChanged(e);
 }