|
@@ -0,0 +1,71 @@
|
|
|
|
+<Window x:Class="PixiEditor.Views.Dialogs.ExtensionWindow"
|
|
|
|
+ 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:uc="clr-namespace:PixiEditor.Views.UserControls"
|
|
|
|
+ xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
|
|
|
+ xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters" xmlns:viewModels="clr-namespace:PixiEditor.ViewModels"
|
|
|
|
+ xmlns:sdk="clr-namespace:PixiEditor.SDK;assembly=PixiEditor.SDK" xmlns:extensions="clr-namespace:PixiEditor.Models.Extensions"
|
|
|
|
+ d:DataContext="{d:DesignInstance Type=viewModels:ExtensionWindowViewModel}"
|
|
|
|
+ mc:Ignorable="d" Topmost="True"
|
|
|
|
+ Title="Extensions"
|
|
|
|
+ Height="450" Width="800"
|
|
|
|
+ MinHeight="180" MinWidth="600">
|
|
|
|
+ <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="250"/>
|
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
+ <RowDefinition Height="35" />
|
|
|
|
+ <RowDefinition />
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
+ <i:Interaction.Behaviors>
|
|
|
|
+ <behaviours:ClearFocusOnClickBehavior/>
|
|
|
|
+ </i:Interaction.Behaviors>
|
|
|
|
+
|
|
|
|
+ <DockPanel Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Background="{StaticResource MainColor}">
|
|
|
|
+ <TextBlock Foreground="White" VerticalAlignment="Center" Margin="10,0,0,0" FontSize="16">Extensions</TextBlock>
|
|
|
|
+ <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Style="{StaticResource CloseButtonStyle}"
|
|
|
|
+ WindowChrome.IsHitTestVisibleInChrome="True" ToolTip="Close"
|
|
|
|
+ Command="{x:Static SystemCommands.CloseWindowCommand}" />
|
|
|
|
+ </DockPanel>
|
|
|
|
+ <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
|
|
|
+ <ItemsControl ItemsSource="{Binding MainWindowExtensionsViewModel.Extensions}">
|
|
|
|
+ <d:ItemsControl.ItemsSource>
|
|
|
|
+ <x:Array Type="{x:Type sdk:Extension}">
|
|
|
|
+ <extensions:XAMLSDKExtension XAMLDisplayName="Example Extension Name" XAMLDescription="This is the desciprtion of the example extension. It should automatically wrap"/>
|
|
|
|
+ <extensions:XAMLSDKExtension XAMLDisplayName="Extension with no description" XAMLDescription=" "/>
|
|
|
|
+ <extensions:XAMLSDKExtension XAMLDisplayName=" " XAMLDescription="Description of a extension with no name"/>
|
|
|
|
+ </x:Array>
|
|
|
|
+ </d:ItemsControl.ItemsSource>
|
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
|
+ <DataTemplate DataType="{x:Type sdk:Extension}">
|
|
|
|
+ <uc:ExtensionItem MinHeight="60" MaxHeight="120"
|
|
|
|
+ SelectedExtension="{Binding DataContext.SelectedExtension, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}" Extension="{Binding}"/>
|
|
|
|
+ </DataTemplate>
|
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
|
+ <ItemsControl.ItemsPanel>
|
|
|
|
+ <ItemsPanelTemplate>
|
|
|
|
+ <StackPanel/>
|
|
|
|
+ </ItemsPanelTemplate>
|
|
|
|
+ </ItemsControl.ItemsPanel>
|
|
|
|
+ </ItemsControl>
|
|
|
|
+ </ScrollViewer>
|
|
|
|
+ <ScrollViewer Grid.Row="1" Grid.Column="1" Background="{StaticResource AccentColor}"
|
|
|
|
+ VerticalScrollBarVisibility="Auto">
|
|
|
|
+ <uc:ExtensionPage DataContext="{Binding SelectedExtension}"/>
|
|
|
|
+ </ScrollViewer>
|
|
|
|
+ </Grid>
|
|
|
|
+</Window>
|