|
@@ -6,11 +6,13 @@
|
|
xmlns:local="clr-namespace:PixiEditor.Views"
|
|
xmlns:local="clr-namespace:PixiEditor.Views"
|
|
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
|
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
|
xmlns:vm="clr-namespace:PixiEditor.ViewModels"
|
|
xmlns:vm="clr-namespace:PixiEditor.ViewModels"
|
|
- xmlns:helpers="clr-namespace:PixiEditor.Helpers.Behaviours"
|
|
|
|
- mc:Ignorable="d"
|
|
|
|
|
|
+ xmlns:helpers="clr-namespace:PixiEditor.Helpers.Behaviours"
|
|
|
|
+ xmlns:converters="clr-namespace:PixiEditor.Helpers"
|
|
|
|
+ mc:Ignorable="d"
|
|
d:DesignHeight="600" d:DesignWidth="450" DataContext="{DynamicResource NewFileMenuViewModel}" WindowStyle="None" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Height="600" Width="450" Name="newFilePopup">
|
|
d:DesignHeight="600" d:DesignWidth="450" DataContext="{DynamicResource NewFileMenuViewModel}" WindowStyle="None" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Height="600" Width="450" Name="newFilePopup">
|
|
<Window.Resources>
|
|
<Window.Resources>
|
|
<vm:NewFileMenuViewModel x:Key="NewFileMenuViewModel"/>
|
|
<vm:NewFileMenuViewModel x:Key="NewFileMenuViewModel"/>
|
|
|
|
+ <converters:ToolSizeToIntConverter x:Key="ToolSizeToIntConverter"/>
|
|
</Window.Resources>
|
|
</Window.Resources>
|
|
<Border BorderBrush="Black" BorderThickness="1">
|
|
<Border BorderBrush="Black" BorderThickness="1">
|
|
<Grid Background="#404040">
|
|
<Grid Background="#404040">
|
|
@@ -24,7 +26,8 @@
|
|
<i:InvokeCommandAction Command="{Binding DragMoveCommand}"/>
|
|
<i:InvokeCommandAction Command="{Binding DragMoveCommand}"/>
|
|
</i:EventTrigger>
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
</i:Interaction.Triggers>
|
|
- <Button Width="20" Height="20" VerticalAlignment="Top" HorizontalAlignment="Right" BorderThickness="0" Command="{Binding CloseCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
|
|
|
|
|
|
+ <Button Width="20" Height="20" VerticalAlignment="Top" Style="{StaticResource ImageButtonStyle}" Cursor="Hand" HorizontalAlignment="Right" BorderThickness="0" Command="{Binding CloseCommand}"
|
|
|
|
+ CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
|
|
<Button.Background>
|
|
<Button.Background>
|
|
<ImageBrush ImageSource="/Images/Cross.png" Stretch="Uniform"/>
|
|
<ImageBrush ImageSource="/Images/Cross.png" Stretch="Uniform"/>
|
|
</Button.Background>
|
|
</Button.Background>
|
|
@@ -33,22 +36,27 @@
|
|
<StackPanel HorizontalAlignment="Center" Margin="0,50,0,0" Background="#303030" VerticalAlignment="Top" Grid.Row="1" Width="350" Height="150">
|
|
<StackPanel HorizontalAlignment="Center" Margin="0,50,0,0" Background="#303030" VerticalAlignment="Top" Grid.Row="1" Width="350" Height="150">
|
|
<DockPanel Margin="50,35,0,0">
|
|
<DockPanel Margin="50,35,0,0">
|
|
<TextBlock Height="30" Foreground="Snow" Text="Height:" TextAlignment="Center" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
<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=newFilePopup, Path=FileHeight, Mode=TwoWay}" MaxLength="4">
|
|
|
|
|
|
+ <TextBox Height="30" Width="150" Style="{StaticResource DarkTextBoxStyle}" FontSize="16"
|
|
|
|
+ HorizontalAlignment="Left" TextAlignment="Center"
|
|
|
|
+ Margin="5,0,0,0" Text="{Binding ElementName=newFilePopup, Converter={StaticResource ToolSizeToIntConverter}, Path=FileHeight, Mode=TwoWay}" MaxLength="4">
|
|
<i:Interaction.Behaviors>
|
|
<i:Interaction.Behaviors>
|
|
- <helpers:AllowableCharactersTextBoxBehavior RegularExpression="^[0-9./-]+$" MaxLength="4"/>
|
|
|
|
|
|
+ <helpers:TextBoxFocusBehavior FillSize="True" NextFocusDirection="Next"/>
|
|
</i:Interaction.Behaviors>
|
|
</i:Interaction.Behaviors>
|
|
</TextBox>
|
|
</TextBox>
|
|
</DockPanel>
|
|
</DockPanel>
|
|
<DockPanel Margin="50,10,0,0">
|
|
<DockPanel Margin="50,10,0,0">
|
|
<TextBlock Height="30" Foreground="Snow" Text="Width:" TextAlignment="Center" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
<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=newFilePopup, Path=FileWidth, Mode=TwoWay}" MaxLength="4">
|
|
|
|
|
|
+ <TextBox Height="30" Width="150" Style="{StaticResource DarkTextBoxStyle}" FontSize="16" HorizontalAlignment="Left" Margin="10,0,0,0" TextAlignment="Center"
|
|
|
|
+ Text="{Binding ElementName=newFilePopup, Converter={StaticResource ToolSizeToIntConverter}, Path=FileWidth, Mode=TwoWay}" MaxLength="4">
|
|
<i:Interaction.Behaviors>
|
|
<i:Interaction.Behaviors>
|
|
- <helpers:AllowableCharactersTextBoxBehavior RegularExpression="^[0-9./-]+$" MaxLength="4"/>
|
|
|
|
|
|
+ <helpers:TextBoxFocusBehavior FillSize="True" NextFocusDirection="Next"/>
|
|
</i:Interaction.Behaviors>
|
|
</i:Interaction.Behaviors>
|
|
</TextBox>
|
|
</TextBox>
|
|
</DockPanel>
|
|
</DockPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
- <Button VerticalAlignment="Bottom" HorizontalAlignment="Right" FontSize="20" Height="30" Width="60" Style="{StaticResource DarkRoundButton}" Content="OK" Margin="0,0,10,10" Grid.Row="1" Command="{Binding OkCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
|
|
|
|
|
|
+ <Button VerticalAlignment="Bottom" HorizontalAlignment="Right" FontSize="20" Height="30" Width="60"
|
|
|
|
+ Style="{StaticResource DarkRoundButton}" Content="OK" Margin="0,0,10,10" Grid.Row="1"
|
|
|
|
+ Command="{Binding OkCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
</Border>
|
|
</Window>
|
|
</Window>
|