1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-24 14:50:10 +00:00
msfs-popout-panel-manager/MainApp/CustomControl/Themes/NumericUpDown.xaml

52 lines
2.8 KiB
Text
Raw Normal View History

2023-07-12 22:41:31 +00:00
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MSFSPopoutPanelManager.MainApp.CustomControl">
<local:FontSizeConverter x:Key="FontSizeConverter" />
<Style TargetType="{x:Type local:NumericUpDown}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:NumericUpDown}">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox
x:Name="PART_TextBox"
Margin="-20,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0" />
<Grid Grid.Column="1">
<RepeatButton
x:Name="PART_ButtonUp"
Width="20"
Height="20"
Margin="-40,0,0,0"
Padding="2,0"
Content="▲"
FontSize="{Binding FontSize, Converter={StaticResource FontSizeConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:NumericUpDown}}}" />
<RepeatButton
x:Name="PART_ButtonDown"
Width="20"
Height="20"
Margin="1,0,0,0"
Padding="2,0"
Content="▼"
FontSize="{Binding FontSize, Converter={StaticResource FontSizeConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:NumericUpDown}}}" />
</Grid>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Width" Value="100" />
</Style>
</ResourceDictionary>