|
@@ -8,7 +8,7 @@
|
|
|
xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
|
|
|
xmlns:enums="clr-namespace:PixiEditor.Models.Enums"
|
|
|
mc:Ignorable="d"
|
|
|
- d:DesignHeight="180" d:DesignWidth="240" Name="uc">
|
|
|
+ d:DesignHeight="200" d:DesignWidth="240" Name="uc">
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="Loaded">
|
|
|
<i:InvokeCommandAction Command="{Binding ElementName=uc, Path=LoadedCommand}"/>
|
|
@@ -22,45 +22,42 @@
|
|
|
<Setter Property="FontSize" Value="12"/>
|
|
|
<Setter Property="Margin" Value="10,0,0,0"/>
|
|
|
<Setter Property="Width" Value="80"/>
|
|
|
- <Setter Property="Height" Value="30"/>
|
|
|
+ <Setter Property="Height" Value="25"/>
|
|
|
</Style>
|
|
|
</UserControl.Resources>
|
|
|
<Border Background="{StaticResource MainColor}" VerticalAlignment="Stretch">
|
|
|
- <DockPanel>
|
|
|
- <Grid Height="50" HorizontalAlignment="Center" DockPanel.Dock="Top"
|
|
|
- Margin="0,20,0,0"
|
|
|
- Visibility="{Binding SizeUnitSelectionVisibility, ElementName=uc}">
|
|
|
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
+ <Grid Height="60" HorizontalAlignment="Center" DockPanel.Dock="Top"
|
|
|
+ Visibility="{Binding SizeUnitSelectionVisibility, ElementName=uc}">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="100"/>
|
|
|
<ColumnDefinition/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
<Grid.RowDefinitions>
|
|
|
- <RowDefinition />
|
|
|
- <RowDefinition Height="20"/>
|
|
|
+ <RowDefinition Height="30"/>
|
|
|
+ <RowDefinition Height="30"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
- <RadioButton Grid.Row="0" Grid.Column="0"
|
|
|
- x:Name="PercentageRb"
|
|
|
- Foreground="White"
|
|
|
- FontSize="12"
|
|
|
- GroupName="Unit"
|
|
|
- Checked="PercentageRb_Checked"
|
|
|
- VerticalContentAlignment="Center"
|
|
|
- IsChecked="{Binding Path=SelectedUnit,
|
|
|
+ <RadioButton Grid.Row="0" Grid.Column="0"
|
|
|
+ x:Name="PercentageRb"
|
|
|
+ Foreground="White"
|
|
|
+ FontSize="12"
|
|
|
+ GroupName="Unit"
|
|
|
+ Checked="PercentageRb_Checked"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ IsChecked="{Binding Path=SelectedUnit,
|
|
|
ElementName=uc,
|
|
|
Converter={converters:EnumBooleanConverter},
|
|
|
ConverterParameter=Percentage
|
|
|
- }"
|
|
|
- >Percentage:</RadioButton>
|
|
|
- <local:SizeInput Grid.Column="1" Grid.Row="0"
|
|
|
- x:Name="PercentageSizePicker"
|
|
|
- IsEnabled="{Binding EditingEnabled, ElementName=uc}"
|
|
|
- Size="{Binding Path=ChosenPercentageSize, ElementName=uc, Mode=TwoWay}"
|
|
|
- Unit="Percentage"
|
|
|
- Margin="-10,0,0,0"
|
|
|
- Width="80"
|
|
|
- >
|
|
|
-
|
|
|
+ }">Percentage:</RadioButton>
|
|
|
+ <local:SizeInput Grid.Column="1" Grid.Row="0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ x:Name="PercentageSizePicker"
|
|
|
+ IsEnabled="{Binding EditingEnabled, ElementName=uc}"
|
|
|
+ Size="{Binding Path=ChosenPercentageSize, ElementName=uc, Mode=TwoWay}"
|
|
|
+ Unit="Percentage"
|
|
|
+ Margin="-10,0,0,0"
|
|
|
+ Width="80">
|
|
|
<i:Interaction.Triggers>
|
|
|
<i:EventTrigger EventName="LostFocus">
|
|
|
<i:InvokeCommandAction Command="{Binding ElementName=uc, Path=WidthLostFocusCommand}"/>
|
|
@@ -69,60 +66,60 @@
|
|
|
</local:SizeInput>
|
|
|
|
|
|
<RadioButton Grid.Row="1" Grid.Column="0"
|
|
|
- x:Name="AbsoluteRb"
|
|
|
- Foreground="White"
|
|
|
- FontSize="12"
|
|
|
- GroupName="Unit"
|
|
|
- Checked="AbsoluteRb_Checked"
|
|
|
- VerticalContentAlignment="Center"
|
|
|
- IsChecked="{Binding Path=SelectedUnit,
|
|
|
+ x:Name="AbsoluteRb"
|
|
|
+ Foreground="White"
|
|
|
+ FontSize="12"
|
|
|
+ GroupName="Unit"
|
|
|
+ Checked="AbsoluteRb_Checked"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ IsChecked="{Binding Path=SelectedUnit,
|
|
|
ElementName=uc,
|
|
|
Converter={converters:EnumBooleanConverter},
|
|
|
ConverterParameter=Pixel}"
|
|
|
>Absolute:</RadioButton>
|
|
|
-
|
|
|
+
|
|
|
</Grid>
|
|
|
|
|
|
<Grid Height="90" HorizontalAlignment="Center" DockPanel.Dock="Top">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="40"/>
|
|
|
- <ColumnDefinition/>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition />
|
|
|
- <RowDefinition />
|
|
|
- <RowDefinition />
|
|
|
- </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="40"/>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition />
|
|
|
+ <RowDefinition />
|
|
|
+ <RowDefinition />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
|
|
- <TextBlock Grid.Column="0" Grid.Row="0" Foreground="Snow" Text="Width:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
|
|
- <local:SizeInput Grid.Column="1" Grid.Row="0"
|
|
|
+ <TextBlock Grid.Column="0" Grid.Row="0" Foreground="Snow" Text="Width:" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
|
|
+ <local:SizeInput Grid.Column="1" Grid.Row="0"
|
|
|
x:Name="WidthPicker"
|
|
|
Width="80"
|
|
|
IsEnabled="{Binding EditingEnabled, ElementName=uc}"
|
|
|
Size="{Binding Path=ChosenWidth, ElementName=uc, Mode=TwoWay}"
|
|
|
Margin="50,0,0,0"
|
|
|
>
|
|
|
- <i:Interaction.Triggers>
|
|
|
- <i:EventTrigger EventName="LostFocus">
|
|
|
- <i:InvokeCommandAction Command="{Binding ElementName=uc, Path=WidthLostFocusCommand}"/>
|
|
|
- </i:EventTrigger>
|
|
|
- </i:Interaction.Triggers>
|
|
|
- </local:SizeInput>
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="LostFocus">
|
|
|
+ <i:InvokeCommandAction Command="{Binding ElementName=uc, Path=WidthLostFocusCommand}"/>
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>
|
|
|
+ </local:SizeInput>
|
|
|
|
|
|
- <TextBlock Grid.Column="0" Grid.Row="1" Foreground="Snow" Text="Height:" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
|
- <local:SizeInput Grid.Column="1" Grid.Row="1"
|
|
|
+ <TextBlock Grid.Column="0" Grid.Row="1" Foreground="Snow" Text="Height:" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
|
+ <local:SizeInput Grid.Column="1" Grid.Row="1"
|
|
|
x:Name="HeightPicker"
|
|
|
IsEnabled="{Binding EditingEnabled, ElementName=uc}"
|
|
|
Margin="50,0,0,0"
|
|
|
Size="{Binding ChosenHeight, ElementName=uc, Mode=TwoWay}">
|
|
|
- <i:Interaction.Triggers>
|
|
|
- <i:EventTrigger EventName="LostFocus">
|
|
|
- <i:InvokeCommandAction Command="{Binding ElementName=uc, Path=HeightLostFocusCommand}"/>
|
|
|
- </i:EventTrigger>
|
|
|
- </i:Interaction.Triggers>
|
|
|
- </local:SizeInput>
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="LostFocus">
|
|
|
+ <i:InvokeCommandAction Command="{Binding ElementName=uc, Path=HeightLostFocusCommand}"/>
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>
|
|
|
+ </local:SizeInput>
|
|
|
|
|
|
- <CheckBox
|
|
|
+ <CheckBox
|
|
|
Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2"
|
|
|
Name="aspectRatio"
|
|
|
IsChecked="{Binding ElementName=uc, Path=PreserveAspectRatio}"
|
|
@@ -130,7 +127,7 @@
|
|
|
Foreground="White"
|
|
|
HorizontalAlignment="Left"
|
|
|
VerticalAlignment="Center" />
|
|
|
- </Grid>
|
|
|
- </DockPanel>
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
</Border>
|
|
|
</UserControl>
|