|
@@ -0,0 +1,76 @@
|
|
|
+<Window x:Class="PixiEditor.Views.Dialogs.SettingsWindow"
|
|
|
+ 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.Dialogs" xmlns:viewmodels="clr-namespace:PixiEditor.ViewModels" xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters" xmlns:views="clr-namespace:PixiEditor.Views"
|
|
|
+ mc:Ignorable="d"
|
|
|
+ Title="Settings" Name="window"
|
|
|
+ Height="450" Width="800" WindowStyle="None" DataContext="{DynamicResource SettingsWindowViewModel}"
|
|
|
+ BorderBrush="Black" BorderThickness="1">
|
|
|
+ <Window.Resources>
|
|
|
+ <viewmodels:SettingsWindowViewModel x:Key="SettingsWindowViewModel"/>
|
|
|
+ <converters:EqualityBoolToVisibilityConverter x:Key="EqualityBoolToVisibilityConverter"/>
|
|
|
+ </Window.Resources>
|
|
|
+ <WindowChrome.WindowChrome>
|
|
|
+ <WindowChrome CaptionHeight="32"
|
|
|
+ ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
|
|
+ </WindowChrome.WindowChrome>
|
|
|
+
|
|
|
+ <Window.CommandBindings>
|
|
|
+ <CommandBinding Command="{x:Static SystemCommands.CloseWindowCommand}" CanExecute="CommandBinding_CanExecute"
|
|
|
+ Executed="CommandBinding_Executed_Close" />
|
|
|
+ </Window.CommandBindings>
|
|
|
+
|
|
|
+ <Grid Background="{StaticResource MainColor}">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="200"/>
|
|
|
+ <ColumnDefinition Width="147*"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="35" />
|
|
|
+ <RowDefinition />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <DockPanel Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Background="{StaticResource MainColor}">
|
|
|
+ <Label Foreground="White" FontSize="16">Settings</Label>
|
|
|
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource CloseButtonStyle}"
|
|
|
+ WindowChrome.IsHitTestVisibleInChrome="True" ToolTip="Close"
|
|
|
+ Command="{x:Static SystemCommands.CloseWindowCommand}" />
|
|
|
+ </DockPanel>
|
|
|
+ <StackPanel Grid.Row="1" Grid.Column="0">
|
|
|
+ <Button Style="{StaticResource AccentDarkRoundButton}" Margin="10 5 10 5"
|
|
|
+ Command="{Binding SelectCategoryCommand}" CommandParameter="General">General</Button>
|
|
|
+ <Button Style="{StaticResource AccentDarkRoundButton}" Margin="10 5 10 5"
|
|
|
+ Command="{Binding SelectCategoryCommand}" CommandParameter="Updates">Updates</Button>
|
|
|
+ </StackPanel>
|
|
|
+ <Grid Grid.Row="1" Grid.Column="1" Background="{StaticResource AccentColor}">
|
|
|
+ <Grid Visibility="{Binding SelectedCategory, Converter={StaticResource EqualityBoolToVisibilityConverter},
|
|
|
+ ConverterParameter='General'}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <Label Content="File" Style="{StaticResource Header1}"/>
|
|
|
+ <StackPanel Orientation="Vertical" Margin="50 0 50 0">
|
|
|
+ <CheckBox Content="Show New File dialog on startup"
|
|
|
+ IsChecked="{Binding SettingsSubViewModel.ShowNewFilePopupOnStartup}"/>
|
|
|
+ <Label Content="Default new file size:" Style="{StaticResource Header2}" Margin="0 20 0 20"/>
|
|
|
+ <StackPanel Orientation="Horizontal" Margin="40,0,0,0">
|
|
|
+ <Label Content="Width:" Style="{StaticResource BaseLabel}"/>
|
|
|
+ <views:SizeInput Size="{Binding SettingsSubViewModel.DefaultNewFileWidth, Mode=TwoWay}" Width="60" Height="25"/>
|
|
|
+ <Label Content="Height:" Style="{StaticResource BaseLabel}"/>
|
|
|
+ <views:SizeInput Size="{Binding SettingsSubViewModel.DefaultNewFileHeight, Mode=TwoWay}" Width="60" Height="25"/>
|
|
|
+ </StackPanel>
|
|
|
+ </StackPanel>
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ <Grid Visibility="{Binding SelectedCategory, Converter={StaticResource EqualityBoolToVisibilityConverter},
|
|
|
+ ConverterParameter='Updates'}">
|
|
|
+ <StackPanel Orientation="Vertical">
|
|
|
+ <Label Style="{StaticResource Header1}" Content="Auto-updates"/>
|
|
|
+ <StackPanel Orientation="Vertical" Margin="50 0 50 0">
|
|
|
+ <CheckBox IsChecked="{Binding SettingsSubViewModel.CheckUpdatesOnStartup}" Content="Check updates on startup"/>
|
|
|
+ </StackPanel>
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+</Window>
|