123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <Window x:Class="PixiEditor.Views.ImportFilePopup"
- 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:local="clr-namespace:PixiEditor.Views"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:vm="clr-namespace:PixiEditor.ViewModels"
- xmlns:behaviors="clr-namespace:PixiEditor.Helpers.Behaviours"
- mc:Ignorable="d"
- Title="ImportFilePopup" Height="350" Width="300" WindowStyle="None" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Name="importFilePopup" DataContext="{DynamicResource ImportFilePopupViewModel}">
- <Window.Resources>
- <vm:ImportFilePopupViewModel x:Key="ImportFilePopupViewModel"/>
- </Window.Resources>
- <Grid Background="#303030">
- <Grid.RowDefinitions>
- <RowDefinition Height="4*"/>
- <RowDefinition Height="67*"/>
- </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 CloseButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
- <Button.Background>
- <ImageBrush ImageSource="/Images/Cross.png" Stretch="Uniform"/>
- </Button.Background>
- </Button>
- </Grid>
- <StackPanel Grid.Row="1" >
- <Label Height="40" Width="120" VerticalAlignment="Top" Content="Import" Foreground="Snow" HorizontalContentAlignment="Center" FontSize="24" Margin="0,10,0,0"/>
- <StackPanel Background="#2D2D2D" Height="85" Width="190" Margin="0,10,0,0">
- <DockPanel Height="20" Margin="0,15,0,0" Width="150">
- <TextBlock Width="40" HorizontalAlignment="Left" Text="Width:" Foreground="Snow" FontSize="14"/>
- <TextBox Style="{StaticResource DarkTextBoxStyle}" Width="75" Margin="-10,0,0,0" Text="{Binding ImportWidth, Mode=TwoWay}">
- <i:Interaction.Behaviors>
- <behaviors:AllowableCharactersTextBoxBehavior RegularExpression="^[0-9./-]+$" MaxLength="4"/>
- </i:Interaction.Behaviors>
- </TextBox>
- </DockPanel>
- <DockPanel Height="20" Margin="0,15,0,0" Width="150">
- <TextBlock Width="45" HorizontalAlignment="Left" Text="Height:" Foreground="Snow" FontSize="14"/>
- <TextBox Style="{StaticResource DarkTextBoxStyle}" Width="75" Margin="-15,0,0,0" Text="{Binding ImportHeight, Mode=TwoWay}">
- <i:Interaction.Behaviors>
- <behaviors:AllowableCharactersTextBoxBehavior RegularExpression="^[0-9./-]+$" MaxLength="4"/>
- </i:Interaction.Behaviors>
- </TextBox>
- </DockPanel>
- </StackPanel>
- <Button Grid.Row="1" BorderThickness="1" Foreground="Snow" Height="40" Width="160" Margin="0,30,0,0" Content="File Path" Background="#303030" BorderBrush="{Binding PathButtonBorder}" Command="{Binding ChoosePathCommand}"/>
- </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>
|