53 lines
3.5 KiB
XML
53 lines
3.5 KiB
XML
<base:UCKeyValueNumber x:Class="AuroraUIComponent.UserControls.UCKeyValueVertical"
|
|
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:AuroraUIComponent.UserControls"
|
|
xmlns:base="clr-namespace:AuroraUIComponent.UserControls.KeyValueBase"
|
|
mc:Ignorable="d" d:DataContext="{d:DesignInstance Type=local:UCKeyValueVertical}"
|
|
d:DesignHeight="60" d:DesignWidth="200" FontSize="12">
|
|
<UserControl.Resources>
|
|
<local:MouseVisibilityConverter x:Key="convVisibility"/>
|
|
<local:PaddingConverter x:Key="convPadding"/>
|
|
</UserControl.Resources>
|
|
<Grid x:Name="GridParent">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border Background="{Binding KeyTextBgColor, RelativeSource={RelativeSource AncestorType=UserControl}}" Margin="2">
|
|
<TextBlock x:Name="TextKey" Grid.Row="0" Margin="5 0" FontWeight="Bold"
|
|
Text="{Binding KeyText, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
FontSize="{Binding KeyTextSize, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
Foreground="{Binding KeyTextFgColor, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
|
|
</Border>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox Name="TextValue" Margin="2" VerticalContentAlignment="Center" Height="Auto"
|
|
HorizontalContentAlignment="{Binding ValueHorizontalAlignment, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
FontSize="{Binding ValueTextSize, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
Foreground="{Binding ValueTextFgColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
Background="{Binding ValueTextBgColor, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
Padding="{Binding Unit, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource convPadding}}"/>
|
|
<TextBlock Text="{Binding Unit, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
FontSize="11" HorizontalAlignment="Right" Margin="0 0 6 0" Foreground="#c0c0c0"/>
|
|
<Button Name="ButtonMouse" Grid.Column="1" Click="Button_Click" Margin="0 2 2 2" Padding="0">
|
|
<Button.Visibility>
|
|
<MultiBinding Converter="{StaticResource convVisibility}">
|
|
<Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="IsReadOnly"/>
|
|
<Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="ShowKeypad"/>
|
|
</MultiBinding>
|
|
</Button.Visibility>
|
|
<Image Source="{DynamicResource Electronics_MouseDrawingImage}"/>
|
|
</Button>
|
|
</Grid>
|
|
</Grid>
|
|
</base:UCKeyValueNumber>
|