SaveFilePopup.xaml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <Window x:Class="PixiEditor.Views.SaveFilePopup"
  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:helpers="clr-namespace:PixiEditor.Helpers.Behaviours"
  10. mc:Ignorable="d"
  11. Title="SaveFilePopup" Height="250" Width="400" WindowStyle="None" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Name="saveFilePopup">
  12. <Grid Background="#303030">
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="20*"/>
  15. <RowDefinition Height="229*"/>
  16. </Grid.RowDefinitions>
  17. <Grid Grid.Row="0" Background="#FF2C2C2C">
  18. <i:Interaction.Triggers>
  19. <i:EventTrigger EventName="MouseDown">
  20. <i:InvokeCommandAction Command="{Binding DragMoveCommand}"/>
  21. </i:EventTrigger>
  22. </i:Interaction.Triggers>
  23. <Button Width="20" Height="20" VerticalAlignment="Top" HorizontalAlignment="Right" BorderThickness="0" Command="{Binding CloseButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
  24. <Button.Background>
  25. <ImageBrush ImageSource="/Images/Cross.png" Stretch="Uniform"/>
  26. </Button.Background>
  27. </Button>
  28. </Grid>
  29. <TextBlock Grid.Row="1" Height="30" Width="120" Foreground="Snow" VerticalAlignment="Top" HorizontalAlignment="Center" Text="File settings" TextAlignment="Center" FontSize="20"/>
  30. <DockPanel Grid.Row="1" Height="70" Width="320" Margin="0,0,0,100" Background="#2D2D2D">
  31. <TextBlock Foreground="Snow" Width="40" Height="40" HorizontalAlignment="Left" Margin="50,0,0,0" Text="Width:" TextAlignment="Center" Padding="0,11.5,0,0"/>
  32. <TextBox Style="{StaticResource DarkTextBoxStyle}" Width="70" Height="20" HorizontalAlignment="Left" Margin="5,0,0,0" Text="{Binding ElementName=saveFilePopup, Path=SaveWidth, Mode=TwoWay}">
  33. <i:Interaction.Behaviors>
  34. <helpers:AllowableCharactersTextBoxBehavior RegularExpression="^[0-9./-]+$" MaxLength="4"/>
  35. </i:Interaction.Behaviors>
  36. </TextBox>
  37. <TextBlock Foreground="Snow" Width="40" Height="40" HorizontalAlignment="Left" Margin="5,0,0,0" Text="Height:" TextAlignment="Center" Padding="0,11.5,0,0"/>
  38. <TextBox Style="{StaticResource DarkTextBoxStyle}" Width="70" Height="20" HorizontalAlignment="Left" Margin="5,0,0,0" Text="{Binding ElementName=saveFilePopup, Path=SaveHeight,Mode=TwoWay}">
  39. <i:Interaction.Behaviors>
  40. <helpers:AllowableCharactersTextBoxBehavior RegularExpression="^[0-9./-]+$" MaxLength="4"/>
  41. </i:Interaction.Behaviors>
  42. </TextBox>
  43. </DockPanel>
  44. <Button Grid.Row="1" Foreground="Snow" Height="40" Width="160" Margin="0,50,0,0" Content="Path" Background="#303030" BorderBrush="{Binding PathButtonBorder}" Command="{Binding ChoosePathCommand}"/>
  45. <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}}}"/>
  46. </Grid>
  47. </Window>