Exemplo n.º 1
0
        /// <inheritdoc />
        protected override ColorPair Setup()
        {
            var colorPair = new ColorPair
            {
                On  = FindResource("PlatinumBrush") as SolidColorBrush,
                Off = Brushes.Transparent
            };

            return(colorPair);
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        protected override ColorPair Setup()
        {
            var colorPair = new ColorPair
            {
                On  = FindResource("RedBrush") as SolidColorBrush,
                Off = FindResource("DarkRedBrush") as SolidColorBrush
            };

            return(colorPair);
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Initializes Step.
        /// </summary>
        protected Step()
        {
            Padding    = new Thickness(0);
            _colorPair = Setup();
            On         = false;
            Button     = new Button
            {
                Width           = 60,
                Height          = 60,
                Padding         = new Thickness(0),
                Background      = _colorPair.Off,
                Foreground      = Brushes.White,
                BorderThickness = new Thickness(0),
                Style           = TryFindResource("MaterialDesignFlatDarkBgButton") as Style
            };
            Button.Click += Toggle;
            ButtonAssist.SetCornerRadius(Button, new CornerRadius(0));

            Highlight = new Border
            {
                Width           = 60,
                Height          = 60,
                Padding         = new Thickness(0),
                BorderBrush     = _colorPair.Off,
                BorderThickness = new Thickness(2, 0, 0, 0)
            };

            Container = new Grid
            {
                Height = 60,
                Width  = 60
            };
            Container.Children.Add(Button);
            Container.Children.Add(Highlight);

            Content = Container;
        }