ImportFilePopup.xaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <Window x:Class="PixiEditor.Views.ImportFilePopup"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:PixiEditor.Views"
  7. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  8. xmlns:vm="clr-namespace:PixiEditor.ViewModels"
  9. xmlns:behaviors="clr-namespace:PixiEditor.Helpers.Behaviours"
  10. mc:Ignorable="d"
  11. Title="ImportFilePopup" Height="350" Width="300" WindowStyle="None" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Name="importFilePopup" DataContext="{DynamicResource ImportFilePopupViewModel}">
  12. <Window.Resources>
  13. <vm:ImportFilePopupViewModel x:Key="ImportFilePopupViewModel"/>
  14. </Window.Resources>
  15. <Grid Background="#303030">
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="4*"/>
  18. <RowDefinition Height="67*"/>
  19. </Grid.RowDefinitions>
  20. <Grid Grid.Row="0" Background="#FF2C2C2C">
  21. <i:Interaction.Triggers>
  22. <i:EventTrigger EventName="MouseDown">
  23. <i:InvokeCommandAction Command="{Binding DragMoveCommand}"/>
  24. </i:EventTrigger>
  25. </i:Interaction.Triggers>
  26. <Button Width="20" Height="20" VerticalAlignment="Top" HorizontalAlignment="Right" BorderThickness="0" Command="{Binding CloseButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
  27. <Button.Background>
  28. <ImageBrush ImageSource="/Images/Cross.png" Stretch="Uniform"/>
  29. </Button.Background>
  30. </Button>
  31. </Grid>
  32. <StackPanel Grid.Row="1" >
  33. <Label Height="40" Width="120" VerticalAlignment="Top" Content="Import" Foreground="Snow" HorizontalContentAlignment="Center" FontSize="24" Margin="0,10,0,0"/>
  34. <StackPanel Background="#2D2D2D" Height="85" Width="190" Margin="0,10,0,0">
  35. <DockPanel Height="20" Margin="0,15,0,0" Width="150">
  36. <TextBlock Width="40" HorizontalAlignment="Left" Text="Width:" Foreground="Snow" FontSize="14"/>
  37. <TextBox Style="{StaticResource DarkTextBoxStyle}" Width="75" Margin="-10,0,0,0" Text="{Binding ImportWidth, Mode=TwoWay}">
  38. <i:Interaction.Behaviors>
  39. <behaviors:AllowableCharactersTextBoxBehavior RegularExpression="^[0-9./-]+$" MaxLength="4"/>
  40. </i:Interaction.Behaviors>
  41. </TextBox>
  42. </DockPanel>
  43. <DockPanel Height="20" Margin="0,15,0,0" Width="150">
  44. <TextBlock Width="45" HorizontalAlignment="Left" Text="Height:" Foreground="Snow" FontSize="14"/>
  45. <TextBox Style="{StaticResource DarkTextBoxStyle}" Width="75" Margin="-15,0,0,0" Text="{Binding ImportHeight, Mode=TwoWay}">
  46. <i:Interaction.Behaviors>
  47. <behaviors:AllowableCharactersTextBoxBehavior RegularExpression="^[0-9./-]+$" MaxLength="4"/>
  48. </i:Interaction.Behaviors>
  49. </TextBox>
  50. </DockPanel>
  51. </StackPanel>
  52. <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}"/>
  53. </StackPanel>
  54. <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}}}"/>
  55. </Grid>
  56. </Window>