|
@@ -1,11 +1,10 @@
|
|
-<UserControl x:Class="PixiEditor.Views.Input.SizeInput"
|
|
|
|
- x:ClassModifier="internal"
|
|
|
|
|
|
+<UserControl x:Class="PixiEditor.UI.Common.Controls.SizeInput"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
- xmlns:ui="clr-namespace:PixiEditor.Extensions.UI;assembly=PixiEditor.Extensions"
|
|
|
|
- xmlns:input="clr-namespace:PixiEditor.Views.Input"
|
|
|
|
|
|
+ xmlns:controls="clr-namespace:PixiEditor.UI.Common.Controls;assembly=PixiEditor.UI.Common"
|
|
|
|
+ xmlns:localization="clr-namespace:PixiEditor.UI.Common.Localization"
|
|
mc:Ignorable="d" Focusable="True"
|
|
mc:Ignorable="d" Focusable="True"
|
|
d:DesignHeight="30" Name="uc"
|
|
d:DesignHeight="30" Name="uc"
|
|
FlowDirection="LeftToRight">
|
|
FlowDirection="LeftToRight">
|
|
@@ -28,23 +27,23 @@
|
|
<ColumnDefinition Width="2"/>
|
|
<ColumnDefinition Width="2"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
</Grid.ColumnDefinitions>
|
|
- <input:NumberInput IsEnabled="{Binding IsEnabled, ElementName=uc}" HorizontalContentAlignment="Right"
|
|
|
|
|
|
+ <controls:NumberInput IsEnabled="{Binding IsEnabled, ElementName=uc}" HorizontalContentAlignment="Right"
|
|
BorderThickness="0" Background="Transparent"
|
|
BorderThickness="0" Background="Transparent"
|
|
Foreground="{Binding Foreground, ElementName=uc}" Focusable="True"
|
|
Foreground="{Binding Foreground, ElementName=uc}" Focusable="True"
|
|
Margin="0,0,5,0" VerticalAlignment="Center"
|
|
Margin="0,0,5,0" VerticalAlignment="Center"
|
|
- Decimals="{Binding Decimals, RelativeSource={RelativeSource FindAncestor, AncestorType=input:SizeInput}}"
|
|
|
|
|
|
+ Decimals="{Binding Decimals, RelativeSource={RelativeSource FindAncestor, AncestorType=controls:SizeInput}}"
|
|
x:Name="input"
|
|
x:Name="input"
|
|
- Value="{Binding Size, RelativeSource={RelativeSource FindAncestor, AncestorType=input:SizeInput}, Mode=TwoWay}"
|
|
|
|
- Min="{Binding MinSize, RelativeSource={RelativeSource FindAncestor, AncestorType=input:SizeInput}}"
|
|
|
|
- Max="{Binding MaxSize, RelativeSource={RelativeSource FindAncestor, AncestorType=input:SizeInput}}"
|
|
|
|
|
|
+ Value="{Binding Size, RelativeSource={RelativeSource FindAncestor, AncestorType=controls:SizeInput}, Mode=TwoWay}"
|
|
|
|
+ Min="{Binding MinSize, RelativeSource={RelativeSource FindAncestor, AncestorType=controls:SizeInput}}"
|
|
|
|
+ Max="{Binding MaxSize, RelativeSource={RelativeSource FindAncestor, AncestorType=controls:SizeInput}}"
|
|
d:Value="22"
|
|
d:Value="22"
|
|
FocusNext="{Binding FocusNext, ElementName=uc}"
|
|
FocusNext="{Binding FocusNext, ElementName=uc}"
|
|
SelectOnMouseClick="{Binding BehaveLikeSmallEmbeddedField, ElementName=uc}"
|
|
SelectOnMouseClick="{Binding BehaveLikeSmallEmbeddedField, ElementName=uc}"
|
|
ConfirmOnEnter="{Binding BehaveLikeSmallEmbeddedField, ElementName=uc}"
|
|
ConfirmOnEnter="{Binding BehaveLikeSmallEmbeddedField, ElementName=uc}"
|
|
- Width="43"/>
|
|
|
|
|
|
+ Width="53"/>
|
|
<Grid Grid.Column="1" Background="{Binding BorderBrush, ElementName=border}"
|
|
<Grid Grid.Column="1" Background="{Binding BorderBrush, ElementName=border}"
|
|
d:Background="{DynamicResource ThemeAccentBrush}"/>
|
|
d:Background="{DynamicResource ThemeAccentBrush}"/>
|
|
- <TextBlock ui:Translator.Key="{Binding Unit, ElementName=uc}"
|
|
|
|
|
|
+ <TextBlock localization:Translator.Key="{Binding Unit, ElementName=uc}"
|
|
TextAlignment="Right"
|
|
TextAlignment="Right"
|
|
Grid.Column="2" Margin="5,0" VerticalAlignment="Center"
|
|
Grid.Column="2" Margin="5,0" VerticalAlignment="Center"
|
|
/>
|
|
/>
|