Exemplo n.º 1
0
 public static void SetDisabledEffect(DependencyObject obj, bool val)
 {
     if (val == true)
     {
         //SystemColors.ControlBrushとは少し違うらしい
         obj.SetValue(Control.BackgroundProperty, new SolidColorBrush(ColorDef.FromUInt(0xFFF4F4F4)));
         obj.SetValue(Control.ForegroundProperty, SystemColors.GrayTextBrush);
     }
     else
     {
         obj.ClearValue(Control.BackgroundProperty);
         obj.ClearValue(Control.ForegroundProperty);
     }
 }
Exemplo n.º 2
0
 public static Color FromUInt(UInt32 value)
 {
     return(ColorDef.FromName("#" + value.ToString("X8")));
 }