public void WPFStyles() { ///WPF styles redefinition /// //styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.OverridesDefaultStyleProperty, false)); //styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.TemplateProperty, true)); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.SnapsToDevicePixelsProperty, true)); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.FocusableProperty, false)); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.FocusVisualStyleProperty, null)); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.AllowDropProperty, true)); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.HorizontalAlignmentProperty, WPF.HorizontalAlignment.Left)); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.VerticalAlignmentProperty, WPF.VerticalAlignment.Top)); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.WidthProperty, Convert.ToDouble(SettingsIO.TileWidth))); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.HeightProperty, Convert.ToDouble(SettingsIO.TileHeight))); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.PaddingProperty, new WPF.Thickness(-4))); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.BorderThicknessProperty, new WPF.Thickness(0))); styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.BorderBrushProperty, WPF.Media.Brushes.Transparent)); //styleButt.Setters.Add(new WPF.Setter(WPF.Controls.Button.BackgroundProperty, WPF.Media.Brushes.Tan)); styleMetroBlu.Setters.Add(new WPF.Setter(WPF.Controls.Button.BackgroundProperty, WPF.Media.Brushes.Red)); styleButt.BasedOn = styleMetroBlu; WPF.Trigger triggerIsPressed = new WPF.Trigger { Property = WPF.Controls.Button.IsPressedProperty, Value = true }; triggerIsPressed.Setters.Add(new WPF.Setter(WPF.Controls.Button.BackgroundProperty, WPF.Media.Brushes.Orange)); triggerIsPressed.Setters.Add(new WPF.Setter(WPF.Controls.Button.BorderThicknessProperty, new WPF.Thickness(0))); triggerIsPressed.Setters.Add(new WPF.Setter(WPF.Controls.Button.BorderBrushProperty, WPF.Media.Brushes.Transparent)); styleButt.Triggers.Add(triggerIsPressed); styleLbl.Setters.Add(new WPF.Setter(WPF.Controls.Label.HorizontalAlignmentProperty, WPF.HorizontalAlignment.Left)); styleLbl.Setters.Add(new WPF.Setter(WPF.Controls.Label.VerticalAlignmentProperty, WPF.VerticalAlignment.Top)); styleLbl.Setters.Add(new WPF.Setter(WPF.Controls.Label.ForegroundProperty, GeneralUtils.ColorToBrush(SettingsIO.MetroText))); styleLbl.Setters.Add(new WPF.Setter(WPF.Controls.Label.FontFamilyProperty, new WPF.Media.FontFamily(SettingsIO.TileFontFamily))); styleLbl.Setters.Add(new WPF.Setter(WPF.Controls.Label.FontSizeProperty, SettingsIO.TileFontSize)); styleLbl.Setters.Add(new WPF.Setter(WPF.Controls.Label.IsHitTestVisibleProperty, false)); }