Esempio n. 1
0
 public static void SkinOverlay(this FrameworkElement control, Style style)
 {
     control.SetBinding(Control.ForegroundProperty, new Binding("TextColor")
     {
         Source = style, Converter = ColorConverter,
     });
     control.SetValue(Control.BackgroundProperty, InvisibleBrush);
 }
Esempio n. 2
0
 public static void SkinSectionHeader(this FrameworkElement control, Style style)
 {
     control.SetBinding(Control.ForegroundProperty, new Binding("SectionHeaderTextColor")
     {
         Source = style, Converter = ColorConverter,
     });
     control.SetBinding(Control.BackgroundProperty, new Binding("SectionHeaderColor")
     {
         Source = style, Converter = ColorConverter, ConverterParameter = true,
     });
 }
Esempio n. 3
0
 public static void Skin(this FrameworkElement control, Style style)
 {
     control.SetBinding(Control.ForegroundProperty, new Binding("TextColor")
     {
         Source = style, Converter = ColorConverter,
     });
     control.SetBinding(Control.BackgroundProperty, new Binding("LayerItemBackgroundColor")
     {
         Source = style, Converter = ColorConverter,
     });
 }
Esempio n. 4
0
 public static async void SkinLayer(this FrameworkElement control, Style style)
 {
     control.SetBinding(Control.ForegroundProperty, new Binding("TextColor")
     {
         Source = style, Converter = ColorConverter
     });
     if (string.IsNullOrWhiteSpace(style.LayerBackgroundImage))
     {
         control.SetBinding(Control.BackgroundProperty, new Binding("LayerBackgroundColor")
         {
             Source = style, Converter = ColorConverter,
         });
     }
     else
     {
         control.SetValue(Control.BackgroundProperty, new ImageBrush
         {
             ImageSource = await WpfFactory.LoadBitmapAsync(style.LayerBackgroundImage),
             Stretch     = Stretch.UniformToFill,
         });
     }
 }