|
@@ -0,0 +1,116 @@
|
|
|
|
+<Window x:Class="PixiEditor.Views.Dialogs.Guides.GuidesManager"
|
|
|
|
+ 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:dialogs="clr-namespace:PixiEditor.Views.Dialogs"
|
|
|
|
+ xmlns:views="clr-namespace:PixiEditor.Views"
|
|
|
|
+ xmlns:gModels="clr-namespace:PixiEditor.Models.DataHolders.Guides"
|
|
|
|
+ xmlns:local="clr-namespace:PixiEditor.Views.Dialogs.Guides"
|
|
|
|
+ xmlns:vm="clr-namespace:PixiEditor.ViewModels"
|
|
|
|
+ xmlns:cmds="clr-namespace:PixiEditor.Models.Commands.XAML"
|
|
|
|
+ mc:Ignorable="d"
|
|
|
|
+ views:Translator.Key="GUIDES_MANAGER_TITLE"
|
|
|
|
+ Width="800" Height="450"
|
|
|
|
+ MinWidth="250" MinHeight="450"
|
|
|
|
+ Background="{StaticResource AccentColor}"
|
|
|
|
+ Foreground="White">
|
|
|
|
+
|
|
|
|
+ <WindowChrome.WindowChrome>
|
|
|
|
+ <WindowChrome CaptionHeight="32" GlassFrameThickness="0.1"
|
|
|
|
+ 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>
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
+ <RowDefinition Height="35"/>
|
|
|
|
+ <RowDefinition/>
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
+
|
|
|
|
+ <dialogs:DialogTitleBar TitleKey="GUIDES_MANAGER_TITLE" CloseCommand="{x:Static SystemCommands.CloseWindowCommand}"/>
|
|
|
|
+ <Grid Grid.Row="1">
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
+ <ColumnDefinition Width="250"/>
|
|
|
|
+ <ColumnDefinition/>
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
+
|
|
|
|
+ <Border Margin="20" Background="{StaticResource DarkerAccentColor}" CornerRadius="5" BorderThickness="1" BorderBrush="{StaticResource MainColor}">
|
|
|
|
+ <Grid>
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
+ <RowDefinition/>
|
|
|
|
+ <RowDefinition Height="25"/>
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
+
|
|
|
|
+ <ListView ItemsSource="{Binding ActiveDocument.Guides, Source={vm:MainVM DocumentManagerSVM}}" Margin="0,5"
|
|
|
|
+ Background="Transparent" BorderThickness="0" x:Name="guideList">
|
|
|
|
+ <ListView.ItemContainerStyle>
|
|
|
|
+ <Style TargetType="ListViewItem">
|
|
|
|
+ <Setter Property="BorderBrush" Value="Transparent" />
|
|
|
|
+ <Setter Property="Background" Value="Transparent"/>
|
|
|
|
+ <Setter Property="Foreground" Value="White"/>
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="ListViewItem">
|
|
|
|
+ <Border x:Name="border"
|
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
|
+ BorderBrush="Transparent"
|
|
|
|
+ BorderThickness="0,1.5">
|
|
|
|
+ <ContentPresenter />
|
|
|
|
+ </Border>
|
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
|
+ <Setter TargetName="border" Property="Background" Value="{StaticResource MainColor}" />
|
|
|
|
+ <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource MainColor}" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="IsSelected" Value="True">
|
|
|
|
+ <Setter TargetName="border" Property="Background" Value="{StaticResource MainColor}" />
|
|
|
|
+ <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource BrighterAccentColor}" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <MultiTrigger>
|
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
|
+ <Condition Property="IsMouseOver" Value="True"/>
|
|
|
|
+ <Condition Property="IsSelected" Value="True"/>
|
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
|
+ <Setter TargetName="border" Property="Background" Value="{StaticResource BrighterAccentColor}"/>
|
|
|
|
+ </MultiTrigger>
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+ </ListView.ItemContainerStyle>
|
|
|
|
+ <ListView.ItemTemplate>
|
|
|
|
+ <DataTemplate DataType="{x:Type gModels:Guide}">
|
|
|
|
+ <Grid Height="15" Margin="5">
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
+ <ColumnDefinition Width="Auto"/>
|
|
|
|
+ <ColumnDefinition/>
|
|
|
|
+ <ColumnDefinition Width="Auto"/>
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
+
|
|
|
|
+ <Image Source="{Binding IconPath}"/>
|
|
|
|
+ <TextBlock Grid.Column="1" Text="{Binding DisplayName}" Margin="5,0,0,0"/>
|
|
|
|
+ <StackPanel Grid.Column="2"></StackPanel>
|
|
|
|
+ </Grid>
|
|
|
|
+ </DataTemplate>
|
|
|
|
+ </ListView.ItemTemplate>
|
|
|
|
+ </ListView>
|
|
|
|
+
|
|
|
|
+ <Border Grid.Row="1" BorderThickness="0,1,0,0" BorderBrush="{StaticResource MainColor}">
|
|
|
|
+ <DockPanel>
|
|
|
|
+ <Button DockPanel.Dock="Left" Width="25"
|
|
|
|
+ Background="Transparent" Foreground="White"
|
|
|
|
+ Command="{cmds:Command PixiEditor.Guides.AddLineGuide}">LG</Button>
|
|
|
|
+ </DockPanel>
|
|
|
|
+ </Border>
|
|
|
|
+ </Grid>
|
|
|
|
+ </Border>
|
|
|
|
+ <ContentPresenter Margin="20" Grid.Column="1" Content="{Binding SelectedItem.SettingsControl, ElementName=guideList}"/>
|
|
|
|
+ </Grid>
|
|
|
|
+ </Grid>
|
|
|
|
+</Window>
|