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

New Post: change DateTimeUpDown background OnMouseOver and IsPressed

$
0
0
Hi,

Try not setting the ButtonChrome Render properties. These properties will modify its colors on MouseOver, MousePressed....

To it yourself in the Template Property :
<Setter Property="Template">
            <Setter.Value>
               <ControlTemplate TargetType="RepeatButton">
                  <Grid Name="Grid">
                     <chrome:ButtonChrome x:Name="Chrome"
                                          BorderBrush="{TemplateBinding BorderBrush}"
                                          Background="{TemplateBinding Background}"
                                          CornerRadius="{DynamicResource {x:Static themes:ResourceKeys.SpinButtonCornerRadiusKey}}"
                                          SnapsToDevicePixels="true">
                     </chrome:ButtonChrome>

                     <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                       VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                       Margin="{TemplateBinding Padding}" />
                  </Grid>
                 <ControlTemplate.Triggers>
                     <Trigger Property="IsMouseOver"
                              Value="True">
                        <Setter Property="Background"
                                Value="Blue" />
                     </Trigger>
                  </ControlTemplate.Triggers>
               </ControlTemplate>
            </Setter.Value>
         </Setter>

Viewing all articles
Browse latest Browse all 4964

Trending Articles



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