12345678910111213141516171819202122232425262728 |
- <UserControl x:Class="CustomControls.NumericUpDown"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:CustomControls"
- mc:Ignorable="d"
- d:DesignHeight="25" d:DesignWidth="100">
- <Grid Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <TextBox Name="tbmain" Grid.ColumnSpan="2" Grid.RowSpan="2" Padding="0,2,0,2"
- Text="{Binding Path=FormattedValue, RelativeSource={RelativeSource AncestorType={x:Type local:NumericUpDown}}}" KeyDown="tbmain_KeyDown" />
- <RepeatButton Name="btnUp" BorderThickness="0" BorderBrush="Transparent" Grid.Column="1" Grid.Row="0" Background="Transparent" Click="btnUp_Click" Margin="0,1,1,0">
- <Path Fill="Black" Data="M 0 3 L 6 3 L 3 0 Z"/>
- </RepeatButton>
- <RepeatButton Name="btnDown" BorderThickness="0" BorderBrush="Transparent" Grid.Column="1" Grid.Row="1" Width="13" Background="Transparent" Click="btnDown_Click" Margin="0,0,1,1">
- <Path Fill="Black" Data="M 0 0 L 3 3 L 6 0 Z"/>
- </RepeatButton>
- </Grid>
- </UserControl>
|