|
@@ -8,7 +8,7 @@
|
|
|
xmlns:behaviors="clr-namespace:PixiEditor.Helpers.Behaviours"
|
|
|
xmlns:converters="clr-namespace:PixiEditor.Helpers"
|
|
|
mc:Ignorable="d" Name="window"
|
|
|
- Title="ResizeCanvasPopup" Topmost="True" ShowInTaskbar="False" WindowStartupLocation="CenterScreen" Height="370" Width="400" WindowStyle="None">
|
|
|
+ Title="ResizeCanvasPopup" Topmost="True" ShowInTaskbar="False" WindowStartupLocation="CenterScreen" Height="390" Width="400" WindowStyle="None">
|
|
|
|
|
|
<Window.Resources>
|
|
|
<converters:ToolSizeToIntConverter x:Key="ToolSizeToIntConverter"/>
|
|
@@ -33,26 +33,17 @@
|
|
|
Command="{x:Static SystemCommands.CloseWindowCommand}"/>
|
|
|
</DockPanel>
|
|
|
<Label Grid.Row="1" VerticalAlignment="Top" Foreground="White" FontSize="24" HorizontalAlignment="Center" Content="Resize Canvas"/>
|
|
|
- <StackPanel HorizontalAlignment="Center" Margin="0,50,0,0" Background="{StaticResource MainColor}" VerticalAlignment="Top" Grid.Row="1" Width="300" Height="230">
|
|
|
+ <StackPanel HorizontalAlignment="Center" Margin="0,50,0,0" Background="{StaticResource MainColor}" VerticalAlignment="Top" Grid.Row="1" Width="300" Height="250">
|
|
|
<DockPanel Margin="50,35,0,0">
|
|
|
<TextBlock Height="30" Foreground="Snow" Text="Height:" TextAlignment="Center" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
- <TextBox Height="30" Width="150" Style="{StaticResource DarkTextBoxStyle}" FontSize="16"
|
|
|
- HorizontalAlignment="Left" TextAlignment="Center"
|
|
|
- Margin="5,0,0,0" Text="{Binding ElementName=window, Converter={StaticResource ToolSizeToIntConverter}, Path=NewHeight, Mode=TwoWay}" MaxLength="4">
|
|
|
- <i:Interaction.Behaviors>
|
|
|
- <behaviors:TextBoxFocusBehavior FillSize="True"/>
|
|
|
- </i:Interaction.Behaviors>
|
|
|
- </TextBox>
|
|
|
+ <local:SizeInput Margin="5,0,0,0" PreserveAspectRatio="{Binding Path=IsChecked, ElementName=aspectRatio}" AspectRatioValue="{Binding Path=NewWidth, ElementName=window}" HorizontalAlignment="Left" Width="150" Height="30" Size="{Binding NewHeight, ElementName=window, Mode=TwoWay}"/>
|
|
|
</DockPanel>
|
|
|
<DockPanel Margin="50,10,0,0">
|
|
|
<TextBlock Height="30" Foreground="Snow" Text="Width:" TextAlignment="Center" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
- <TextBox Height="30" Width="150" Style="{StaticResource DarkTextBoxStyle}" FontSize="16" HorizontalAlignment="Left" Margin="10,0,0,0" TextAlignment="Center"
|
|
|
- Text="{Binding ElementName=window, Converter={StaticResource ToolSizeToIntConverter}, Path=NewWidth, Mode=TwoWay}" MaxLength="4">
|
|
|
- <i:Interaction.Behaviors>
|
|
|
- <behaviors:TextBoxFocusBehavior FillSize="True"/>
|
|
|
- </i:Interaction.Behaviors>
|
|
|
- </TextBox>
|
|
|
+ <local:SizeInput Width="150" Height="30" PreserveAspectRatio="{Binding Path=IsChecked, ElementName=aspectRatio}" AspectRatioValue="{Binding Path=NewHeight, ElementName=window}"
|
|
|
+ HorizontalAlignment="Left" Margin="10,0,0,0" Size="{Binding Path=NewWidth, ElementName=window, Mode=TwoWay}"/>
|
|
|
</DockPanel>
|
|
|
+ <CheckBox Name="aspectRatio" Content="Preserve aspect ratio" Foreground="White" HorizontalAlignment="Left" IsChecked="True" Margin="50,10,0,0"/>
|
|
|
<Separator Margin="10,20,10,0" Background="{StaticResource AccentColor}" Height="1"/>
|
|
|
<Label Content="Anchor point:" Foreground="White" Margin="10,5,0,0" HorizontalAlignment="Left" FontSize="16"/>
|
|
|
<local:AnchorPointPicker AnchorPoint="{Binding Path=SelectedAnchorPoint, Mode=TwoWay, ElementName=window}" Width="78" Margin="45,-25,0,0" Height="78"/>
|