123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <UserControl
- x:Class="PDF_Master.CustomControl.NumericUpDown"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Master.CustomControl"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- d:DesignWidth="120"
- FontSize="20"
- Loaded="UserControl_Loaded"
- mc:Ignorable="d">
- <Border Background="{StaticResource color.field.bg.def}"
- BorderBrush="{StaticResource color.field.border.norm}" BorderThickness="1,1,1,1"
- CornerRadius="4,4,4,4">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="1" />
- <ColumnDefinition Width="20" />
- </Grid.ColumnDefinitions>
- <Border
- />
- <TextBox
- Name="TextBox_Num"
- MinWidth="68"
- MinHeight="28"
- Padding="8,0,0,0"
- VerticalContentAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- LostFocus="TextBox_Num_LostFocus"
- PreviewKeyDown="TextBox_Num_PreviewKeyDown"
- FontFamily="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:NumericUpDown}, Path=FontFamily}"
- FontSize="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:NumericUpDown}, Path=FontSize}"
- Foreground="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:NumericUpDown}, Path=Foreground}"
- InputMethod.IsInputMethodEnabled="False"
- PreviewTextInput="CountTextBox_PreviewTextInput"
- Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:NumericUpDown}, Path=Text}"
- TextAlignment="Left" />
- <Rectangle Grid.Column="1" Fill="{StaticResource color.field.border.norm}" Margin="0,0.5,0,0.5"></Rectangle>
- <Grid Grid.Column="2" Width="20" >
- <Grid.RowDefinitions>
- <RowDefinition Height="12*" />
- <RowDefinition Height="3*"/>
- <RowDefinition Height="3*" />
- <RowDefinition Height="12*"/>
- </Grid.RowDefinitions>
- <Border
- Grid.Row="0"
- Background="{StaticResource color.field.bg.def}"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="0,0,0,0.5"
- CornerRadius="0,4,0,0" Grid.RowSpan="2">
- <Button
- Name="Button_Add"
- Background="Transparent"
- BorderBrush="Transparent"
- BorderThickness="0"
- Click="Button_Add_Click">
- <Path
-
- Data="M10 5.93571L13.9696 9.90532L15.0303 8.84466L10.5303 4.34472C10.2374 4.05183 9.76257 4.05183 9.46967 4.34472L4.96974 8.84466L6.0304 9.90532L10 5.93571Z"
- Fill="{StaticResource color.icon.arrow.gray.def}"
- Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:NumericUpDown}, Path=ShowBtn}" Height="5.78" Stretch="Fill" Width="10.06" />
- </Button>
- </Border>
- <Border
- Grid.Row="2"
- Background="{StaticResource color.field.bg.def}"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="0,0.5,0,0"
- CornerRadius="0,0,4,0" Grid.RowSpan="2" >
- <Button
- Name="Button_Sub"
- Background="Transparent"
- BorderThickness="00"
- Click="Button_Sub_Click">
- <Path
- Data="M10 9.06427L6.03039 5.09467L4.96973 6.15533L9.46967 10.6553C9.76256 10.9482 10.2374 10.9482 10.5303 10.6553L15.0303 6.15533L13.9696 5.09467L10 9.06427Z"
- Fill="{StaticResource color.icon.arrow.gray.def}"
- Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:NumericUpDown}, Path=ShowBtn}" Height="5.78" Stretch="Fill" Width="10.06"/>
- </Button>
- </Border>
- </Grid>
- </Grid>
- </Border>
- </UserControl>
|