|
@@ -0,0 +1,58 @@
|
|
|
|
+<Window x:Class="PixiEditor.Views.ResizeDocumentPopup"
|
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
|
|
|
+ xmlns:local="clr-namespace:PixiEditor.Views" xmlns:behaviors="clr-namespace:PixiEditor.Helpers.Behaviours" xmlns:converters="clr-namespace:PixiEditor.Helpers"
|
|
|
|
+ mc:Ignorable="d" Name="window"
|
|
|
|
+ Title="ResizeDocumentPopup" WindowStartupLocation="CenterScreen" Height="300" Width="400" WindowStyle="None">
|
|
|
|
+
|
|
|
|
+ <Window.Resources>
|
|
|
|
+ <converters:ToolSizeToIntConverter x:Key="ToolSizeToIntConverter"/>
|
|
|
|
+ </Window.Resources>
|
|
|
|
+
|
|
|
|
+ <WindowChrome.WindowChrome>
|
|
|
|
+ <WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
|
|
|
+ </WindowChrome.WindowChrome>
|
|
|
|
+
|
|
|
|
+ <Window.CommandBindings>
|
|
|
|
+ <CommandBinding Command="{x:Static SystemCommands.CloseWindowCommand}" CanExecute="CommandBinding_CanExecute" Executed="CommandBinding_Executed_Close" />
|
|
|
|
+ </Window.CommandBindings>
|
|
|
|
+
|
|
|
|
+ <Grid Background="{StaticResource AccentColor}">
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
+ <RowDefinition Height="35"/>
|
|
|
|
+ <RowDefinition/>
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
+
|
|
|
|
+ <DockPanel Grid.Row="0" Background="{StaticResource MainColor}">
|
|
|
|
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource CloseButtonStyle}" WindowChrome.IsHitTestVisibleInChrome="True" ToolTip="Close"
|
|
|
|
+ Command="{x:Static SystemCommands.CloseWindowCommand}"/>
|
|
|
|
+ </DockPanel>
|
|
|
|
+ <Label Grid.Row="1" Foreground="White" FontSize="20" HorizontalAlignment="Center" Content="Resize document"/>
|
|
|
|
+ <StackPanel HorizontalAlignment="Center" Margin="0,50,0,0" Background="{StaticResource MainColor}" VerticalAlignment="Top" Grid.Row="1" Width="350" Height="150">
|
|
|
|
+ <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>
|
|
|
|
+ </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>
|
|
|
|
+ </DockPanel>
|
|
|
|
+ </StackPanel>
|
|
|
|
+ <Button Grid.Row="1" Height="30" Width="60" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="10" Style="{StaticResource DarkRoundButton}" Content="OK" Command="{Binding OkCommand}"
|
|
|
|
+ CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
|
|
|
|
+ </Grid>
|
|
|
|
+</Window>
|