1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <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="14"
- 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"
- 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"
- LostFocus="TextBox_Num_LostFocus"
- PreviewKeyDown="TextBox_Num_PreviewKeyDown"
- PreviewTextInput="CountTextBox_PreviewTextInput"
- Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:NumericUpDown}, Path=Text}"
- TextAlignment="Left" />
- <Rectangle
- Grid.Column="1"
- Margin="0,0.5,0,0.5"
- Fill="{StaticResource color.field.border.norm}" />
- <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"
- Grid.RowSpan="2"
- Background="{StaticResource color.field.bg.def}"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="0,0,0,0.5"
- CornerRadius="0,4,0,0">
- <Button
- Name="Button_Add"
- Background="Transparent"
- BorderBrush="Transparent"
- BorderThickness="0"
- Click="Button_Add_Click">
- <Path
- Width="10.06"
- Height="5.78"
- 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}"
- Stretch="Fill"
- Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:NumericUpDown}, Path=ShowBtn}" />
- </Button>
- </Border>
- <Border
- Grid.Row="2"
- Grid.RowSpan="2"
- Background="{StaticResource color.field.bg.def}"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="0,0.5,0,0"
- CornerRadius="0,0,4,0">
- <Button
- Name="Button_Sub"
- Background="Transparent"
- BorderThickness="00"
- Click="Button_Sub_Click">
- <Path
- Width="10.06"
- Height="5.78"
- 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}"
- Stretch="Fill"
- Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:NumericUpDown}, Path=ShowBtn}" />
- </Button>
- </Border>
- </Grid>
- </Grid>
- </Border>
- </UserControl>
|