public MacroFilterViewer(MacroFilter filter)
        {
            InitializeComponent();

            _filter = filter;

            MacroDial.RawValue = _filter.Macro;

            for (int i = 0; i < MacrosGrid.Children.Count; i++)
            {
                MacroRectangle Rect = (MacroRectangle)MacrosGrid.Children[i];
                Set(Rect, _filter[i]);
                Rect.Index = i + 1;
            }
        }
 void Set(MacroRectangle rect, bool value) => rect.Fill = (IBrush)Application.Current.Styles.FindResource(value? "ThemeExtraBrush" : "ThemeForegroundLowBrush");
Beispiel #3
0
 void MouseEnter(MacroRectangle rect) => SetColor(rect, _filter[MacrosGrid.Children.IndexOf(rect)] = drawingState);