|
@@ -0,0 +1,103 @@
|
|
|
+<UserControl
|
|
|
+ xmlns="https://github.com/avaloniaui"
|
|
|
+ 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:converters="clr-namespace:PixiEditor.AvaloniaUI.Helpers.Converters"
|
|
|
+ xmlns:ui="clr-namespace:PixiEditor.Extensions.UI;assembly=PixiEditor.Extensions"
|
|
|
+ xmlns:commands="clr-namespace:PixiEditor.AvaloniaUI.Models.Commands"
|
|
|
+ mc:Ignorable="d"
|
|
|
+ d:DesignHeight="600" d:DesignWidth="400"
|
|
|
+ x:Class="PixiEditor.AvaloniaUI.Views.Settings.ShortcutsBinder">
|
|
|
+
|
|
|
+ <Grid>
|
|
|
+ <ScrollViewer x:Name="commandScroll">
|
|
|
+ <!--FocusVisualStyle="{x:Null}"-->
|
|
|
+ <ScrollViewer.Template>
|
|
|
+ <ControlTemplate TargetType="{x:Type ScrollViewer}">
|
|
|
+ <Grid x:Name="Grid" Background="{TemplateBinding Background}">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="Auto"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Rectangle x:Name="Corner" Grid.Column="1" Grid.Row="1"/>
|
|
|
+ <!--Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"-->
|
|
|
+ <ScrollContentPresenter
|
|
|
+ x:Name="PART_ScrollContentPresenter"
|
|
|
+ CanHorizontallyScroll="False"
|
|
|
+ CanVerticallyScroll="False"
|
|
|
+ ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
|
+ Content="{TemplateBinding Content}"
|
|
|
+ Grid.Column="0"
|
|
|
+ Margin="{TemplateBinding Padding}"
|
|
|
+ Grid.Row="0" />
|
|
|
+ <!--CanContentScroll="{TemplateBinding CanContentScroll}"-->
|
|
|
+ <!--<ScrollBar
|
|
|
+ x:Name="PART_VerticalScrollBar"
|
|
|
+ AutomationProperties.AutomationId="VerticalScrollBar"
|
|
|
+ Cursor="Arrow"
|
|
|
+ Grid.Column="1"
|
|
|
+ Maximum="{TemplateBinding ScrollableHeight}"
|
|
|
+ Minimum="0"
|
|
|
+ Grid.Row="0"
|
|
|
+ Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
|
|
|
+ Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
+ ViewportSize="{TemplateBinding ViewportHeight}"
|
|
|
+ Margin="0,5,0,20" />
|
|
|
+ <ScrollBar
|
|
|
+ x:Name="PART_HorizontalScrollBar"
|
|
|
+ AutomationProperties.AutomationId="HorizontalScrollBar"
|
|
|
+ Cursor="Arrow"
|
|
|
+ Grid.Column="0"
|
|
|
+ Maximum="{TemplateBinding ScrollableWidth}"
|
|
|
+ Minimum="0"
|
|
|
+ Orientation="Horizontal"
|
|
|
+ Grid.Row="1"
|
|
|
+ Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
|
|
|
+ Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
+ ViewportSize="{TemplateBinding ViewportWidth}" />-->
|
|
|
+ </Grid>
|
|
|
+ </ControlTemplate>
|
|
|
+ </ScrollViewer.Template>
|
|
|
+ <Grid>
|
|
|
+ <TextBlock Foreground="LightGray" HorizontalAlignment="Center" TextAlignment="Center"
|
|
|
+ IsVisible="{Binding !VisibleGroups, Mode=OneWay}"
|
|
|
+ ui:Translator.Key="NOTHING_FOUND" d:Text="Nothing found."/>
|
|
|
+ <ItemsControl ItemsSource="{Binding Commands}" Foreground="White" Focusable="False">
|
|
|
+ <!--<ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate DataType="{x:Type commands:CommandGroup}">
|
|
|
+ <StackPanel Margin="0,0,0,20" IsVisible="{Binding Visibility}">
|
|
|
+ <TextBlock ui:Translator.Key="{Binding DisplayName.Key}" FontSize="22" FontWeight="SemiBold"/>
|
|
|
+ <ItemsControl ItemsSource="{Binding Commands}" Focusable="False">
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate DataType="{x:Type commands1:Command}">
|
|
|
+ <Grid Margin="0,5,5,0" Visibility="{Binding Visibility}">
|
|
|
+ <TextBlock Text="{Binding Command.DisplayName}" ToolTip="{Binding Command.Description}"/>
|
|
|
+ <userControls:ShortcutBox Width="120" Command="{Binding Command}" HorizontalAlignment="Right" Focusable="False"/>
|
|
|
+ </Grid>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ </ItemsControl>
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>-->
|
|
|
+ </ItemsControl>
|
|
|
+ </Grid>
|
|
|
+ </ScrollViewer>
|
|
|
+
|
|
|
+ <Grid Height="10" VerticalAlignment="Top"
|
|
|
+ IsVisible="{Binding !#commandScroll.VerticalOffset, Mode=OneWay}">
|
|
|
+ <!--Margin="-10,0"-->
|
|
|
+ <!--<Grid.Background>
|
|
|
+ <LinearGradientBrush StartPoint="0, 0" EndPoint="0, 1">
|
|
|
+ <GradientStop Color="#22000000" Offset="0"/>
|
|
|
+ <GradientStop Color="#00000000" Offset="1.0"/>
|
|
|
+ </LinearGradientBrush>
|
|
|
+ </Grid.Background>-->
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+</UserControl>
|