|
@@ -0,0 +1,69 @@
|
|
|
+<Window x:Class="PixiEditor.Views.Dialogs.ImportShortcutTemplatePopup"
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:diag="clr-namespace:PixiEditor.Views.Dialogs"
|
|
|
+ xmlns:xaml="clr-namespace:PixiEditor.Models.Commands.XAML"
|
|
|
+ mc:Ignorable="d"
|
|
|
+ Title="Import from template" Foreground="White"
|
|
|
+ MinWidth="580"
|
|
|
+ SizeToContent="WidthAndHeight" WindowStyle="None"
|
|
|
+ Background="{StaticResource AccentColor}"
|
|
|
+ x:Name="window">
|
|
|
+
|
|
|
+ <Window.CommandBindings>
|
|
|
+ <CommandBinding Command="{x:Static SystemCommands.CloseWindowCommand}" CanExecute="CommandBinding_CanExecute"
|
|
|
+ Executed="CommandBinding_Executed_Close" />
|
|
|
+ </Window.CommandBindings>
|
|
|
+
|
|
|
+ <WindowChrome.WindowChrome>
|
|
|
+ <WindowChrome CaptionHeight="32" GlassFrameThickness="0.1"
|
|
|
+ ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
|
|
+ </WindowChrome.WindowChrome>
|
|
|
+
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="32"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <diag:DialogTitleBar DockPanel.Dock="Top"
|
|
|
+ TitleText="Import from template" CloseCommand="{x:Static SystemCommands.CloseWindowCommand}"/>
|
|
|
+ <ItemsControl Grid.Row="1" ItemsSource="{Binding Templates, ElementName=window}"
|
|
|
+ Margin="10">
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="Auto"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Center"
|
|
|
+ ToolTip="{Binding Description}"/>
|
|
|
+ <StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
|
+ <StackPanel.Resources>
|
|
|
+ <Style TargetType="Button" BasedOn="{StaticResource DarkRoundButton}">
|
|
|
+ <Setter Property="Width" Value="120"/>
|
|
|
+ <Setter Property="Height" Value="Auto"/>
|
|
|
+ <Setter Property="Padding" Value="5"/>
|
|
|
+ <Setter Property="FontSize" Value="12"/>
|
|
|
+ <Setter Property="Margin" Value="5,0, 0, 0"/>
|
|
|
+ </Style>
|
|
|
+ </StackPanel.Resources>
|
|
|
+ <Button Command="{xaml:Command PixiEditor.Shortcuts.Provider.ImportInstallation, UseProvided=True}"
|
|
|
+ CommandParameter="{Binding}" Content="From installed"
|
|
|
+ Visibility="{Binding ProvidesFromInstallation, Converter={BoolToVisibilityConverter}}"
|
|
|
+ IsEnabled="{Binding HasInstallationPresent}"/>
|
|
|
+ <Button Command="{xaml:Command PixiEditor.Shortcuts.Provider.ImportFile, UseProvided=True}"
|
|
|
+ CommandParameter="{Binding}" Content="Import"
|
|
|
+ Visibility="{Binding ProvidesImport, Converter={BoolToVisibilityConverter}}"/>
|
|
|
+ <Button Command="{xaml:Command PixiEditor.Shortcuts.Provider.ImportDefault, UseProvided=True}"
|
|
|
+ CommandParameter="{Binding}" Content="Use default"
|
|
|
+ Visibility="{Binding HasDefaultShortcuts, Converter={BoolToVisibilityConverter}}"/>
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ </ItemsControl>
|
|
|
+ </Grid>
|
|
|
+</Window>
|