12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <Window x:Class="PixiEditor.Views.NewFilePopup"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PixiEditor.Views"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:vm="clr-namespace:PixiEditor.ViewModels"
- xmlns:helpers="clr-namespace:PixiEditor.Helpers.Behaviours"
- mc:Ignorable="d"
- d:DesignHeight="600" d:DesignWidth="450" DataContext="{DynamicResource NewFileMenuViewModel}" WindowStyle="None" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Height="600" Width="450" Name="newFilePopup">
- <Window.Resources>
- <vm:NewFileMenuViewModel x:Key="NewFileMenuViewModel"/>
- </Window.Resources>
- <Grid Background="#303030">
- <Grid.RowDefinitions>
- <RowDefinition Height="25*"/>
- <RowDefinition Height="577*"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Background="#FF2C2C2C">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="MouseDown">
- <i:InvokeCommandAction Command="{Binding DragMoveCommand}"/>
- </i:EventTrigger>
- </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.Background>
- <ImageBrush ImageSource="/Images/Cross.png" Stretch="Uniform"/>
- </Button.Background>
- </Button>
- </Grid>
- <StackPanel HorizontalAlignment="Center" Margin="0,50,0,0" Background="#FF2E2E2E" 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=newFilePopup, Path=FileHeight, Mode=TwoWay}" MaxLength="4">
- <i:Interaction.Behaviors>
- <helpers:AllowableCharactersTextBoxBehavior RegularExpression="^[0-9./-]+$" MaxLength="4"/>
- </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=newFilePopup, Path=FileWidth, Mode=TwoWay}" MaxLength="4">
- <i:Interaction.Behaviors>
- <helpers:AllowableCharactersTextBoxBehavior RegularExpression="^[0-9./-]+$" MaxLength="4"/>
- </i:Interaction.Behaviors>
- </TextBox>
- </DockPanel>
- </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}}}"/>
- </Grid>
- </Window>
|