Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: Change color of spinner button for decimalupdown

$
0
0
Hi

So what I attempting to do is to change the background color of the buttons used within the DecimalUpDown controls;
         xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
         xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes;assembly=Xceed.Wpf.Toolkit"

        <Style TargetType="{x:Type xctk:DecimalUpDown}">
            <Style.Resources>
                <LinearGradientBrush x:Key="{x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}"
                    StartPoint="0,0"
                    EndPoint="0,1">
                    <LinearGradientBrush.GradientStops>
                        <GradientStopCollection>
                            <GradientStop Color="red"
                      Offset="0" />
                            <GradientStop Color="red"
                      Offset="0.5" />
                            <GradientStop Color="red"
                      Offset="0.5" />
                            <GradientStop Color="red"
                      Offset="1" />
                        </GradientStopCollection>
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Style.Resources>
        </Style>
Ignore the colors all being red, these will change two another gradient, however this simply does not work. What am I doing wrong ???

Regards

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>