Help, key bindings
This commit is contained in:
@@ -59,6 +59,24 @@ namespace FileTime.App.Core.Tab
|
||||
}
|
||||
}
|
||||
|
||||
public async Task ClearMarkedItems(IContainer container)
|
||||
{
|
||||
if (_markedItems.ContainsKey(container))
|
||||
{
|
||||
var markedItems = _markedItems[container];
|
||||
for (var i = 0; i < markedItems.Count; i++)
|
||||
{
|
||||
await ItemUnmarked.InvokeAsync(this, markedItems[i]);
|
||||
markedItems.RemoveAt(i--);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async Task ClearCurrentMarkedItems()
|
||||
{
|
||||
await ClearMarkedItems(await Tab.GetCurrentLocation());
|
||||
}
|
||||
|
||||
public bool ContainsMarkedItem(IContainer container, AbsolutePath path)
|
||||
{
|
||||
if (!_markedItems.ContainsKey(container)) return false;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<ResourceDictionary>
|
||||
<Color x:Key="AppBackgroundColor">#073642</Color>
|
||||
<Color x:Key="ContainerBackgroundColor">#083e4c</Color>
|
||||
<Color x:Key="TransparentContainerBackgroundColor">#D0083e4c</Color>
|
||||
|
||||
<Color x:Key="ItemBackgroundColor">#00000000</Color>
|
||||
<Color x:Key="AlternativeItemBackgroundColor">#10000000</Color>
|
||||
@@ -44,6 +45,9 @@
|
||||
<SolidColorBrush
|
||||
x:Key="ContainerBackgroundBrush"
|
||||
Color="{DynamicResource ContainerBackgroundColor}" />
|
||||
<SolidColorBrush
|
||||
x:Key="TransparentContainerBackgroundBrush"
|
||||
Color="{DynamicResource TransparentContainerBackgroundColor}" />
|
||||
|
||||
<SolidColorBrush
|
||||
x:Key="ItemBackgroundBrush"
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace FileTime.Avalonia.Command
|
||||
|
||||
bool ctrlOrAlt = (key.Ctrl ?? false) || (key.Alt ?? false);
|
||||
|
||||
if (ctrlOrAlt && currentText.Last() != ' ') s += " ";
|
||||
if (ctrlOrAlt && currentText.Length > 0 && currentText.Last() != ' ') s += " ";
|
||||
|
||||
if (key.Ctrl ?? false) s += "CTRL+";
|
||||
if (key.Alt ?? false) s += "ALT+";
|
||||
@@ -69,7 +69,7 @@ namespace FileTime.Avalonia.Command
|
||||
{
|
||||
var s = "";
|
||||
|
||||
if (currentText.Last() != ' ' && !wasCtrlOrAlt) s += " ";
|
||||
if (currentText.Length > 0 && currentText.Last() != ' ' && !wasCtrlOrAlt) s += " ";
|
||||
s += key.Key.ToString();
|
||||
if (!wasCtrlOrAlt) s += " ";
|
||||
|
||||
|
||||
@@ -73,6 +73,12 @@ namespace FileTime.Avalonia.ViewModels
|
||||
[Property]
|
||||
private ObservableCollection<string> _popupTexts = new ObservableCollection<string>();
|
||||
|
||||
[Property]
|
||||
private bool _showAllShortcut;
|
||||
|
||||
[Property]
|
||||
private List<CommandBinding> _allShortcut;
|
||||
|
||||
public ObservableCollection<ParallelCommandsViewModel> TimelineCommands { get; } = new();
|
||||
|
||||
async partial void OnInitialize()
|
||||
@@ -95,6 +101,8 @@ namespace FileTime.Avalonia.ViewModels
|
||||
_keysToSkip.Add(new KeyWithModifiers[] { new KeyWithModifiers(Key.PageUp) });
|
||||
_keysToSkip.Add(new KeyWithModifiers[] { new KeyWithModifiers(Key.F4, alt: true) });
|
||||
|
||||
AllShortcut = _commandBindings.Concat(_universalCommandBindings).ToList();
|
||||
|
||||
var tab = new Tab();
|
||||
await tab.Init(LocalContentProvider);
|
||||
|
||||
@@ -428,6 +436,7 @@ namespace FileTime.Avalonia.ViewModels
|
||||
{
|
||||
_clipboard.AddContent(selectedItem);
|
||||
}
|
||||
await AppState.SelectedTab.TabState.ClearCurrentMarkedItems();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -647,6 +656,12 @@ namespace FileTime.Avalonia.ViewModels
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private Task ShowAllShortcut2()
|
||||
{
|
||||
ShowAllShortcut = true;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
[Command]
|
||||
public async void ProcessInputs()
|
||||
{
|
||||
@@ -707,6 +722,7 @@ namespace FileTime.Avalonia.ViewModels
|
||||
|
||||
if (key == Key.Escape)
|
||||
{
|
||||
ShowAllShortcut = false;
|
||||
_previousKeys.Clear();
|
||||
PossibleCommands = new();
|
||||
}
|
||||
@@ -750,7 +766,14 @@ namespace FileTime.Avalonia.ViewModels
|
||||
|
||||
if (key == Key.Escape)
|
||||
{
|
||||
await ExitRapidTravelMode();
|
||||
if (ShowAllShortcut)
|
||||
{
|
||||
ShowAllShortcut = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
await ExitRapidTravelMode();
|
||||
}
|
||||
}
|
||||
else if (key == Key.Back)
|
||||
{
|
||||
@@ -888,6 +911,11 @@ namespace FileTime.Avalonia.ViewModels
|
||||
FileTime.App.Core.Command.Commands.CreateContainer,
|
||||
new KeyWithModifiers[]{new KeyWithModifiers(Key.C),new KeyWithModifiers(Key.C)},
|
||||
CreateContainer),
|
||||
new CommandBinding(
|
||||
"create container",
|
||||
FileTime.App.Core.Command.Commands.CreateContainer,
|
||||
new KeyWithModifiers[]{new KeyWithModifiers(Key.F7)},
|
||||
CreateContainer),
|
||||
new CommandBinding(
|
||||
"create element",
|
||||
FileTime.App.Core.Command.Commands.CreateElement,
|
||||
@@ -1008,6 +1036,11 @@ namespace FileTime.Avalonia.ViewModels
|
||||
FileTime.App.Core.Command.Commands.Rename,
|
||||
new KeyWithModifiers[]{new KeyWithModifiers(Key.C),new KeyWithModifiers(Key.W)},
|
||||
Rename),
|
||||
new CommandBinding(
|
||||
"rename",
|
||||
FileTime.App.Core.Command.Commands.Rename,
|
||||
new KeyWithModifiers[]{new KeyWithModifiers(Key.F2)},
|
||||
Rename),
|
||||
new CommandBinding(
|
||||
"timeline pause",
|
||||
FileTime.App.Core.Command.Commands.Dummy,
|
||||
@@ -1028,16 +1061,26 @@ namespace FileTime.Avalonia.ViewModels
|
||||
FileTime.App.Core.Command.Commands.Refresh,
|
||||
new KeyWithModifiers[]{new KeyWithModifiers(Key.R)},
|
||||
RefreshCurrentLocation),
|
||||
new CommandBinding(
|
||||
"refresh",
|
||||
FileTime.App.Core.Command.Commands.Refresh,
|
||||
new KeyWithModifiers[]{new KeyWithModifiers(Key.F5)},
|
||||
RefreshCurrentLocation),
|
||||
new CommandBinding(
|
||||
"go to",
|
||||
FileTime.App.Core.Command.Commands.Dummy,
|
||||
new KeyWithModifiers[]{new KeyWithModifiers(Key.L, ctrl: true)},
|
||||
new KeyWithModifiers[] { new KeyWithModifiers(Key.L, ctrl: true) },
|
||||
GoToContainer),
|
||||
new CommandBinding(
|
||||
"toggle advanced icons",
|
||||
FileTime.App.Core.Command.Commands.Dummy,
|
||||
new KeyWithModifiers[]{new KeyWithModifiers(Key.Z),new KeyWithModifiers(Key.I)},
|
||||
new KeyWithModifiers[] { new KeyWithModifiers(Key.Z), new KeyWithModifiers(Key.I) },
|
||||
ToggleAdvancedIcons),
|
||||
new CommandBinding(
|
||||
"show all shortcut",
|
||||
FileTime.App.Core.Command.Commands.Dummy,
|
||||
new KeyWithModifiers[] { new KeyWithModifiers(Key.F1) },
|
||||
ShowAllShortcut2),
|
||||
};
|
||||
var universalCommandBindings = new List<CommandBinding>()
|
||||
{
|
||||
|
||||
@@ -18,464 +18,492 @@
|
||||
x:Name="RootContainer"
|
||||
Background="{DynamicResource AppBackgroundBrush}">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border CornerRadius="10" Background="{DynamicResource ContainerBackgroundBrush}" Padding="10" Margin="10">
|
||||
<Grid RowDefinitions="Auto,Auto">
|
||||
|
||||
<TextBlock
|
||||
Margin="0,0,0,10"
|
||||
Text="Drives" />
|
||||
|
||||
<ItemsRepeater
|
||||
Grid.Row="1"
|
||||
Items="{Binding RootDriveInfos}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,5" ColumnDefinitions="20,*,Auto" RowDefinitions="Auto,Auto">
|
||||
<Image
|
||||
Grid.RowSpan="2"
|
||||
Width="20"
|
||||
Height="20"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Source="{SvgImage /Assets/material/folder.svg}" />
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Stretch"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding FullName}" />
|
||||
|
||||
<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Classes="SmallText"
|
||||
Text="{Binding Label}" IsVisible="{Binding Label,Converter={StaticResource IsNotEmptyConverter}}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel HorizontalAlignment="Right"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
|
||||
<TextBlock Classes="SmallText" VerticalAlignment="Center" Text="{Binding Free, Converter={StaticResource FormatSizeConverter}, ConverterParameter=0}">
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock Classes="SmallText" VerticalAlignment="Center" Text=" / ">
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock Classes="SmallText" VerticalAlignment="Center" Text="{Binding Size, Converter={StaticResource FormatSizeConverter}, ConverterParameter=0}">
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<ProgressBar
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="2"
|
||||
Maximum="100"
|
||||
Value="{Binding UsedPercentage}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="1" CornerRadius="10" Background="{DynamicResource ContainerBackgroundBrush}" Padding="0,10" Margin="10">
|
||||
<Grid RowDefinitions="Auto,Auto">
|
||||
|
||||
<TextBlock
|
||||
Margin="10,0,10,10"
|
||||
Text="Places" />
|
||||
|
||||
<ItemsRepeater
|
||||
Grid.Row="1"
|
||||
Items="{Binding Places}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Classes="PlacesItem" PointerPressed="OnPlacePointerPressed" Cursor="Hand">
|
||||
<StackPanel Orientation="Horizontal" Margin="10,5" HorizontalAlignment="Stretch">
|
||||
<Image
|
||||
Width="20"
|
||||
Height="20"
|
||||
VerticalAlignment="Center"
|
||||
Source="{Binding Container,Converter={StaticResource ItemToImageConverter}}" />
|
||||
|
||||
<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Name}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="2" RowDefinitions="Auto,40,*,Auto">
|
||||
<Grid>
|
||||
<ItemsControl Items="{Binding TimelineCommands}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Background="{DynamicResource ContainerBackgroundColor}" Padding="5">
|
||||
<ItemsControl Items="{Binding ParallelCommands}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
<ProgressBar Margin="0,5,0,0" Maximum="100" Value="{Binding Progress}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="1" ColumnDefinitions="*,Auto">
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="10,5"
|
||||
Text="{Binding AppState.SelectedTab.TabNumber,StringFormat=({0})}" />
|
||||
|
||||
<local:PathPresenter Margin="10,5,0,5" DataContext="{Binding AppState.SelectedTab.CurrentLocation.Container.FullName}"/>
|
||||
|
||||
<TextBlock
|
||||
Margin="0,5,10,5"
|
||||
Text="{Binding AppState.SelectedTab.SelectedItem.Item.Name}" Foreground="{StaticResource AccentForegroundBrush}" />
|
||||
</StackPanel>
|
||||
|
||||
<ItemsControl
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
Items="{Binding AppState.Tabs}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid RowDefinitions="Auto,1">
|
||||
<StackPanel Orientation="Horizontal" Margin="20,0,20,0">
|
||||
|
||||
<TextBlock
|
||||
VerticalAlignment="Center" Text="{Binding TabNumber,StringFormat=({0})}" />
|
||||
|
||||
<local:PathPresenter Margin="5,0,0,0" DataContext="{Binding CurrentLocation.Container.FullName}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Rectangle Fill="{DynamicResource ForegroundBrush}" Grid.Row="1" IsVisible="{Binding IsSelected}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
|
||||
<Grid
|
||||
Grid.Row="2"
|
||||
Margin="20,0,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="15*" />
|
||||
<ColumnDefinition Width="10" />
|
||||
<ColumnDefinition Width="40*" />
|
||||
<ColumnDefinition Width="10" />
|
||||
<ColumnDefinition Width="45*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid>
|
||||
<ListBox
|
||||
Classes="ContentListView"
|
||||
IsEnabled="False"
|
||||
Items="{Binding AppState.SelectedTab.Parent.Items}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<local:ItemView ShowAttributes="False"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
|
||||
<Rectangle
|
||||
Grid.Column="1"
|
||||
Width="1"
|
||||
Margin="0,10,0,10"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{DynamicResource ContentSeparatorBrush}" />
|
||||
|
||||
<Grid Grid.Column="2">
|
||||
<ListBox
|
||||
x:Name="CurrentItems"
|
||||
IsTabStop="True"
|
||||
Items="{Binding AppState.SelectedTab.CurrentLocation.Items}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
SelectedItem="{Binding AppState.SelectedTab.SelectedItem, Mode=TwoWay}"
|
||||
Classes="ContentListView">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<local:ItemView/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<Border CornerRadius="10" Background="{DynamicResource ContainerBackgroundBrush}" Padding="10" Margin="10">
|
||||
<Grid RowDefinitions="Auto,Auto">
|
||||
|
||||
<TextBlock
|
||||
x:Name="CurrentEmpty"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource ErrorBrush}"
|
||||
IsVisible="{Binding AppState.SelectedTab.CurrentLocation.Items.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}">
|
||||
Empty
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
Margin="0,0,0,10"
|
||||
Text="Drives" />
|
||||
|
||||
<Rectangle
|
||||
Grid.Column="3"
|
||||
Width="1"
|
||||
Margin="0,10,0,10"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{DynamicResource ContentSeparatorBrush}" />
|
||||
|
||||
<Grid Grid.Column="4" IsVisible="{Binding AppState.SelectedTab.ChildContainer,Converter={StaticResource IsNotNullConverter}}">
|
||||
<ListBox
|
||||
Classes="ContentListView"
|
||||
IsEnabled="False"
|
||||
x:Name="ChildItems"
|
||||
Items="{Binding AppState.SelectedTab.ChildContainer.Items}"
|
||||
IsVisible="{Binding AppState.SelectedTab.ChildContainer.Items.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}">
|
||||
<ListBox.ItemTemplate>
|
||||
<ItemsRepeater
|
||||
Grid.Row="1"
|
||||
Items="{Binding RootDriveInfos}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<local:ItemView/>
|
||||
<Grid Margin="0,5" ColumnDefinitions="20,*,Auto" RowDefinitions="Auto,Auto">
|
||||
<Image
|
||||
Grid.RowSpan="2"
|
||||
Width="20"
|
||||
Height="20"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Source="{SvgImage /Assets/material/folder.svg}" />
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Stretch"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding FullName}" />
|
||||
|
||||
<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Classes="SmallText"
|
||||
Text="{Binding Label}" IsVisible="{Binding Label,Converter={StaticResource IsNotEmptyConverter}}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel HorizontalAlignment="Right"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
|
||||
<TextBlock Classes="SmallText" VerticalAlignment="Center" Text="{Binding Free, Converter={StaticResource FormatSizeConverter}, ConverterParameter=0}">
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock Classes="SmallText" VerticalAlignment="Center" Text=" / ">
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock Classes="SmallText" VerticalAlignment="Center" Text="{Binding Size, Converter={StaticResource FormatSizeConverter}, ConverterParameter=0}">
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<ProgressBar
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="2"
|
||||
Maximum="100"
|
||||
Value="{Binding UsedPercentage}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Grid
|
||||
IsVisible="{Binding AppState.SelectedTab.ChildContainer.Items.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}">
|
||||
|
||||
<TextBlock
|
||||
x:Name="ChildEmpty"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource ErrorBrush}"
|
||||
IsVisible="{Binding AppState.SelectedTab.ChildContainer.Exceptions.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}">
|
||||
Empty
|
||||
</TextBlock>
|
||||
|
||||
<Grid
|
||||
RowDefinitions="Auto, Auto"
|
||||
IsVisible="{Binding AppState.SelectedTab.ChildContainer.Exceptions.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}">
|
||||
|
||||
<TextBlock
|
||||
Margin="0,0,0,10"
|
||||
HorizontalAlignment="Center"
|
||||
TextWrapping="Wrap"
|
||||
Text="There were some errors while opening container."
|
||||
Foreground="{DynamicResource ErrorBrush}" />
|
||||
|
||||
<ItemsRepeater Grid.Row="1" Items="{Binding AppState.SelectedTab.ChildContainer.Exceptions}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding, Converter={StaticResource ExceptionToStringConverter}}"/>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Grid
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{Binding Inputs, Converter={StaticResource IsNotNullConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="1" CornerRadius="10" Background="{DynamicResource ContainerBackgroundBrush}" Padding="0,10" Margin="10">
|
||||
<Grid RowDefinitions="Auto,Auto">
|
||||
|
||||
<ItemsControl
|
||||
x:Name="InputList"
|
||||
Items="{Binding Inputs}">
|
||||
<TextBlock
|
||||
Margin="10,0,10,10"
|
||||
Text="Places" />
|
||||
|
||||
<ItemsRepeater
|
||||
Grid.Row="1"
|
||||
Items="{Binding Places}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Classes="PlacesItem" PointerPressed="OnPlacePointerPressed" Cursor="Hand">
|
||||
<StackPanel Orientation="Horizontal" Margin="10,5" HorizontalAlignment="Stretch">
|
||||
<Image
|
||||
Width="20"
|
||||
Height="20"
|
||||
VerticalAlignment="Center"
|
||||
Source="{Binding Container,Converter={StaticResource ItemToImageConverter}}" />
|
||||
|
||||
<TextBlock
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Name}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="2" RowDefinitions="Auto,40,*,Auto">
|
||||
<Grid>
|
||||
<ItemsControl Items="{Binding TimelineCommands}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid MinWidth="400">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Background="{DynamicResource ContainerBackgroundColor}" Padding="5">
|
||||
<ItemsControl Items="{Binding ParallelCommands}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
<ProgressBar Margin="0,5,0,0" Maximum="100" Value="{Binding Progress}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding InputElement.Text}" />
|
||||
<TextBox
|
||||
AttachedToVisualTree="InputText_AttachedToVisualTree"
|
||||
Grid.Column="1"
|
||||
GotFocus="InputText_GotFocus"
|
||||
LostFocus="InputText_LostFocus"
|
||||
KeyDown="InputText_KeyDown"
|
||||
Text="{Binding Value, Mode=TwoWay}" />
|
||||
<Grid Grid.Row="1" ColumnDefinitions="*,Auto">
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="10,5"
|
||||
Text="{Binding AppState.SelectedTab.TabNumber,StringFormat=({0})}" />
|
||||
|
||||
<local:PathPresenter Margin="10,5,0,5" DataContext="{Binding AppState.SelectedTab.CurrentLocation.Container.FullName}"/>
|
||||
|
||||
<TextBlock
|
||||
Margin="0,5,10,5"
|
||||
Text="{Binding AppState.SelectedTab.SelectedItem.Item.Name}" Foreground="{StaticResource AccentForegroundBrush}" />
|
||||
</StackPanel>
|
||||
|
||||
<ItemsControl
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
Items="{Binding AppState.Tabs}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid RowDefinitions="Auto,1">
|
||||
<StackPanel Orientation="Horizontal" Margin="20,0,20,0">
|
||||
|
||||
<TextBlock
|
||||
VerticalAlignment="Center" Text="{Binding TabNumber,StringFormat=({0})}" />
|
||||
|
||||
<local:PathPresenter Margin="5,0,0,0" DataContext="{Binding CurrentLocation.Container.FullName}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Rectangle Fill="{DynamicResource ForegroundBrush}" Grid.Row="1" IsVisible="{Binding IsSelected}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Command="{Binding ProcessInputsCommand}"
|
||||
Content="Ok" />
|
||||
<Button
|
||||
Command="{Binding CancelInputsCommand}"
|
||||
Content="Cancel" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Grid
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{Binding MessageBoxText, Converter={StaticResource IsNotNullConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
Grid.Row="2"
|
||||
Margin="20,0,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="15*" />
|
||||
<ColumnDefinition Width="10" />
|
||||
<ColumnDefinition Width="40*" />
|
||||
<ColumnDefinition Width="10" />
|
||||
<ColumnDefinition Width="45*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding MessageBoxText}"/>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Command="{Binding ProcessMessageBoxCommand}"
|
||||
Content="Yes" />
|
||||
<Button
|
||||
Command="{Binding CancelMessageBoxCommand}"
|
||||
Content="No" />
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<ListBox
|
||||
Classes="ContentListView"
|
||||
IsEnabled="False"
|
||||
Items="{Binding AppState.SelectedTab.Parent.Items}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<local:ItemView ShowAttributes="False"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
|
||||
<Rectangle
|
||||
Grid.Column="1"
|
||||
Width="1"
|
||||
Margin="0,10,0,10"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{DynamicResource ContentSeparatorBrush}" />
|
||||
|
||||
<Grid Grid.Column="2">
|
||||
<ListBox
|
||||
x:Name="CurrentItems"
|
||||
IsTabStop="True"
|
||||
Items="{Binding AppState.SelectedTab.CurrentLocation.Items}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
SelectedItem="{Binding AppState.SelectedTab.SelectedItem, Mode=TwoWay}"
|
||||
Classes="ContentListView">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<local:ItemView/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<TextBlock
|
||||
x:Name="CurrentEmpty"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource ErrorBrush}"
|
||||
IsVisible="{Binding AppState.SelectedTab.CurrentLocation.Items.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}">
|
||||
Empty
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
|
||||
<Rectangle
|
||||
Grid.Column="3"
|
||||
Width="1"
|
||||
Margin="0,10,0,10"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
Fill="{DynamicResource ContentSeparatorBrush}" />
|
||||
|
||||
<Grid Grid.Column="4" IsVisible="{Binding AppState.SelectedTab.ChildContainer,Converter={StaticResource IsNotNullConverter}}">
|
||||
<ListBox
|
||||
Classes="ContentListView"
|
||||
IsEnabled="False"
|
||||
x:Name="ChildItems"
|
||||
Items="{Binding AppState.SelectedTab.ChildContainer.Items}"
|
||||
IsVisible="{Binding AppState.SelectedTab.ChildContainer.Items.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<local:ItemView/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Grid
|
||||
IsVisible="{Binding AppState.SelectedTab.ChildContainer.Items.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}">
|
||||
|
||||
<TextBlock
|
||||
x:Name="ChildEmpty"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource ErrorBrush}"
|
||||
IsVisible="{Binding AppState.SelectedTab.ChildContainer.Exceptions.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}">
|
||||
Empty
|
||||
</TextBlock>
|
||||
|
||||
<Grid
|
||||
RowDefinitions="Auto, Auto"
|
||||
IsVisible="{Binding AppState.SelectedTab.ChildContainer.Exceptions.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}">
|
||||
|
||||
<TextBlock
|
||||
Margin="0,0,0,10"
|
||||
HorizontalAlignment="Center"
|
||||
TextWrapping="Wrap"
|
||||
Text="There were some errors while opening container."
|
||||
Foreground="{DynamicResource ErrorBrush}" />
|
||||
|
||||
<ItemsRepeater Grid.Row="1" Items="{Binding AppState.SelectedTab.ChildContainer.Exceptions}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding, Converter={StaticResource ExceptionToStringConverter}}"/>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{Binding Inputs, Converter={StaticResource IsNotNullConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ItemsControl
|
||||
x:Name="InputList"
|
||||
Items="{Binding Inputs}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid MinWidth="400">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding InputElement.Text}" />
|
||||
<TextBox
|
||||
AttachedToVisualTree="InputText_AttachedToVisualTree"
|
||||
Grid.Column="1"
|
||||
GotFocus="InputText_GotFocus"
|
||||
LostFocus="InputText_LostFocus"
|
||||
KeyDown="InputText_KeyDown"
|
||||
Text="{Binding Value, Mode=TwoWay}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Command="{Binding ProcessInputsCommand}"
|
||||
Content="Ok" />
|
||||
<Button
|
||||
Command="{Binding CancelInputsCommand}"
|
||||
Content="Cancel" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Grid
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsVisible="{Binding MessageBoxText, Converter={StaticResource IsNotNullConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding MessageBoxText}"/>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Command="{Binding ProcessMessageBoxCommand}"
|
||||
Content="Yes" />
|
||||
<Button
|
||||
Command="{Binding CancelMessageBoxCommand}"
|
||||
Content="No" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<ItemsRepeater Items="{Binding PopupTexts}" Margin="0,0,0,20" HorizontalAlignment="Center" VerticalAlignment="Bottom" IsVisible="{Binding PopupTexts.Count,Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}">
|
||||
<ItemsRepeater.Styles>
|
||||
<Style Selector="TextBlock">
|
||||
<Style.Animations>
|
||||
<Animation Duration="0:0:1">
|
||||
<KeyFrame Cue="0%">
|
||||
<Setter Property="Opacity" Value="0.0"/>
|
||||
</KeyFrame>
|
||||
<KeyFrame Cue="100%">
|
||||
<Setter Property="Opacity" Value="1.0"/>
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</ItemsRepeater.Styles>
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" HorizontalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</Grid>
|
||||
|
||||
<ItemsRepeater Items="{Binding PopupTexts}" Margin="0,0,0,20" HorizontalAlignment="Center" VerticalAlignment="Bottom" IsVisible="{Binding PopupTexts.Count,Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}">
|
||||
<ItemsRepeater.Styles>
|
||||
<Style Selector="TextBlock">
|
||||
<Style.Animations>
|
||||
<Animation Duration="0:0:1">
|
||||
<KeyFrame Cue="0%">
|
||||
<Setter Property="Opacity" Value="0.0"/>
|
||||
</KeyFrame>
|
||||
<KeyFrame Cue="100%">
|
||||
<Setter Property="Opacity" Value="1.0"/>
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</ItemsRepeater.Styles>
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" HorizontalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</Grid>
|
||||
<Grid Grid.Row="3">
|
||||
<Grid IsVisible="{Binding AppState.ViewMode, Converter={StaticResource EqualityConverter}, ConverterParameter=RapidTravel}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="3">
|
||||
<Grid IsVisible="{Binding AppState.ViewMode, Converter={StaticResource EqualityConverter}, ConverterParameter=RapidTravel}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle
|
||||
Height="1"
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{DynamicResource ContentSeparatorBrush}" />
|
||||
|
||||
<Rectangle
|
||||
Height="1"
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{DynamicResource ContentSeparatorBrush}" />
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="30,10,10,10"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="30,10,10,10"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,30,0"
|
||||
Text="Rapid travel mode" />
|
||||
|
||||
<TextBlock Text="Filter " />
|
||||
|
||||
<TextBlock Text="{Binding AppState.RapidTravelText}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Grid IsVisible="{Binding NoCommandFound}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Rectangle
|
||||
Height="1"
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{DynamicResource ContentSeparatorBrush}" />
|
||||
|
||||
<TextBlock
|
||||
Margin="0,0,30,0"
|
||||
Text="Rapid travel mode" />
|
||||
Grid.Row="1"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="{DynamicResource ErrorBrush}"
|
||||
Text="No command found" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Text="Filter " />
|
||||
<Grid IsVisible="{Binding PossibleCommands.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding AppState.RapidTravelText}" />
|
||||
</StackPanel>
|
||||
<Rectangle
|
||||
Height="1"
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{DynamicResource ContentSeparatorBrush}" />
|
||||
|
||||
<ItemsRepeater
|
||||
Grid.Row="1"
|
||||
Items="{Binding PossibleCommands}">
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding KeysDisplayText}" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid IsVisible="{Binding NoCommandFound}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Rectangle
|
||||
Height="1"
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{DynamicResource ContentSeparatorBrush}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="{DynamicResource ErrorBrush}"
|
||||
Text="No command found" />
|
||||
</Grid>
|
||||
|
||||
<Grid IsVisible="{Binding PossibleCommands.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Rectangle
|
||||
Height="1"
|
||||
Margin="10,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{DynamicResource ContentSeparatorBrush}" />
|
||||
|
||||
<Border Background="{DynamicResource TransparentContainerBackgroundBrush}" Margin="20" HorizontalAlignment="Center" IsVisible="{Binding ShowAllShortcut}">
|
||||
<Grid RowDefinitions="Auto, *" Margin="30,10">
|
||||
<TextBlock Text="Shortcuts" Margin="0,0,0,20"/>
|
||||
<ScrollViewer
|
||||
Grid.Row="1"
|
||||
HorizontalScrollBarVisibility="Disabled">
|
||||
<ItemsControl
|
||||
Grid.Row="1"
|
||||
Items="{Binding PossibleCommands}">
|
||||
Items="{Binding AllShortcut}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid Margin="0,5,10,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -487,8 +515,8 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user