| .. .. <Style x:Key="UpButtonStyle" TargetType="RepeatButton"> <Setter Property="MinHeight" Value="64"/> <Setter Property="MinWidth" Value="32"/> <Setter Property="Template"> .. <FontIcon FontFamily="Segoe MDL2 Assets" Glyph=""/> .. </Style> <Style x:Key="DownButtonStyle" TargetType="RepeatButton"> <Setter Property="MinHeight" Value="64"/> <Setter Property="MinWidth" Value="32"/> <Setter Property="Template"> .. <FontIcon FontFamily="Segoe MDL2 Assets" Glyph=""/> .. </Style> <Grid> <editors:SfNumericUpDown x:Name="numericUpDown" HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Style="{StaticResource sfNumericUpDownStyle}" AllowNull="True" Watermark="Type Here"> </editors:SfNumericUpDown> </Grid> |
| <Style x:Key="NumericRepeatButtonStyle" TargetType="controls:SfUpDown"> <Setter Property="Template"> <Setter.Value> .. <RepeatButton x:Name="PART_DownButton" Tag="{Binding Path=Tag,RelativeSource={RelativeSource Mode=TemplatedParent}}" Background="#FFC0CB" /> <RepeatButton x:Name="PART_UpButton" Tag="{Binding Path=Tag,RelativeSource={RelativeSource Mode=TemplatedParent}}" Background="#FF4500" ></RepeatButton> .. </Setter> </Style> |
| <Page.Resources> <ResourceDictionary xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:MSDNSample"> .. <Style TargetType="editors:SfNumericUpDown" x:Key="sfNumericUpDownStyle"> <Setter Property="UpDownStyle" Value="{StaticResource NumericRepeatButtonStyle}"/> .. </Style> </ResourceDictionary> </Page.Resources> <Grid> <editors:SfNumericUpDown x:Name="numericUpDown" HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Style="{StaticResource sfNumericUpDownStyle}" AllowNull="True" Watermark="Type Here"> </editors:SfNumericUpDown> </Grid> |