GARbro-mirror/MainWindow.xaml

382 lines
28 KiB
Plaintext
Raw Normal View History

2014-07-22 03:26:28 +08:00
<Window x:Class="GARbro.GUI.MainWindow" x:Name="AppWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:GARbro.GUI"
2015-05-12 17:31:27 +08:00
xmlns:jv="clr-namespace:JustView"
2014-07-22 03:26:28 +08:00
xmlns:s="clr-namespace:GARbro.GUI.Strings"
xmlns:p="clr-namespace:GARbro.GUI.Properties"
Title="GARbro" MinHeight="250" ResizeMode="CanResizeWithGrip"
Loaded="WindowLoaded"
KeyDown="WindowKeyDown"
2014-07-22 03:26:28 +08:00
Top="{Binding Source={x:Static p:Settings.Default}, Path=winTop, Mode=TwoWay}"
Left="{Binding Source={x:Static p:Settings.Default}, Path=winLeft, Mode=TwoWay}"
Height="{Binding Source={x:Static p:Settings.Default}, Path=winHeight, Mode=TwoWay}"
Width="{Binding Source={x:Static p:Settings.Default}, Path=winWidth, Mode=TwoWay}"
WindowState="{Binding Source={x:Static p:Settings.Default}, Path=winState, Mode=TwoWay}">
<Window.Resources>
2014-08-02 16:59:01 +08:00
<!-- alternate colors for directory view -->
2014-07-22 03:26:28 +08:00
<SolidColorBrush x:Key="AlternateColor1" Color="#f2f5f9" />
<SolidColorBrush x:Key="AlternateColor2" Color="White" />
2014-08-03 22:16:09 +08:00
<SolidColorBrush x:Key="InactiveInputBackground" Color="#ebf5fe" />
2014-08-02 16:59:01 +08:00
<!-- toolbar icons -->
2014-07-22 03:26:28 +08:00
<BitmapImage x:Key="Icon32x32Back" UriSource="Images/32x32/back button.png"/>
<BitmapImage x:Key="Icon32x32Forward" UriSource="Images/32x32/forward button.png"/>
<BitmapImage x:Key="Icon32x32Help" UriSource="Images/32x32/help.png"/>
2014-08-01 20:37:16 +08:00
<BitmapImage x:Key="Icon48x48Refresh" UriSource="Images/48x48/refresh.png"/>
2014-08-02 16:59:01 +08:00
<!-- directory view internals -->
2014-07-22 03:26:28 +08:00
<CollectionViewSource x:Key="ListViewSource" Source="{Binding}"/>
<local:BooleanToCollapsedVisibilityConverter x:Key="booleanToCollapsedVisibilityConverter" />
2014-07-30 05:48:37 +08:00
<local:EntryTypeConverter x:Key="entryTypeConverter"/>
<local:SortModeToBooleanConverter x:Key="sortModeToBooleanConverter" />
2014-07-22 03:26:28 +08:00
<Style x:Key="HeaderLeftAlign" TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
</Style>
<DataTemplate x:Key="SortArrowUp">
<DockPanel>
<TextBlock Margin="5,0,5,0" Text="{Binding}" />
<Path VerticalAlignment="Center" Fill="Gray" Data="M 5,5 15,5 10,0 5,5" />
</DockPanel>
</DataTemplate>
<DataTemplate x:Key="SortArrowDown">
<DockPanel>
<TextBlock Margin="5,0,5,0" Text="{Binding}" />
<Path VerticalAlignment="Center" Fill="Gray" Data="M 5,0 10,5 15,0 5,0" />
</DockPanel>
</DataTemplate>
<DataTemplate x:Key="SortArrowNone">
<TextBlock Margin="5,0,5,0" Text="{Binding}"/>
</DataTemplate>
2014-08-02 16:59:01 +08:00
<Style x:Key="DefaultMenuItemStyle" TargetType="{x:Type MenuItem}">
<Setter Property="FontWeight" Value="Bold" />
</Style>
2014-08-02 16:59:01 +08:00
<!-- Sort-by submenu -->
<MenuItem x:Key="sortByMenu" Header="{x:Static s:guiStrings.CtxMenuSortBy}">
<MenuItem Header="{x:Static s:guiStrings.CtxMenuSortByName}" IsCheckable="True"
IsChecked="{Binding ElementName=AppWindow, Path=SortMode, Mode=OneWay, Converter={StaticResource sortModeToBooleanConverter}, ConverterParameter=Name}"
2014-08-02 16:59:01 +08:00
Command="{x:Static local:Commands.SortBy}" CommandParameter="Name"/>
<MenuItem Header="{x:Static s:guiStrings.CtxMenuSortByType}" IsCheckable="True"
IsChecked="{Binding ElementName=AppWindow, Path=SortMode, Mode=OneWay, Converter={StaticResource sortModeToBooleanConverter}, ConverterParameter=Type}"
2014-08-02 16:59:01 +08:00
Command="{x:Static local:Commands.SortBy}" CommandParameter="Type"/>
<MenuItem Header="{x:Static s:guiStrings.CtxMenuSortBySize}" IsCheckable="True"
IsChecked="{Binding ElementName=AppWindow, Path=SortMode, Mode=OneWay, Converter={StaticResource sortModeToBooleanConverter}, ConverterParameter=Size}"
2014-08-02 16:59:01 +08:00
Command="{x:Static local:Commands.SortBy}" CommandParameter="Size"/>
<MenuItem Header="{x:Static s:guiStrings.CtxMenuUnsorted}" IsCheckable="True"
IsChecked="{Binding ElementName=AppWindow, Path=SortMode, Mode=OneWay, Converter={StaticResource sortModeToBooleanConverter}}"
2014-08-02 16:59:01 +08:00
Command="{x:Static local:Commands.SortBy}"/>
</MenuItem>
<!-- Default listview context menu -->
<ContextMenu x:Key="lvDirContextMenu">
<MenuItem Header="{x:Static s:guiStrings.CtxMenuOpen}" InputGestureText="Enter"
Style="{StaticResource DefaultMenuItemStyle}"
Command="{x:Static local:Commands.OpenItem}" />
<MenuItem Header="{x:Static s:guiStrings.CtxMenuCreate}" InputGestureText="F3"
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource booleanToCollapsedVisibilityConverter}}"
Command="{x:Static local:Commands.CreateArchive}" />
<MenuItem Header="{x:Static s:guiStrings.CtxMenuExtract}" InputGestureText="F4"
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource booleanToCollapsedVisibilityConverter}}"
Command="{x:Static local:Commands.ExtractItem}" />
<MenuItem Header="{x:Static s:guiStrings.CtxMenuExplorer}" InputGestureText="Ctrl+E"
Command="{x:Static local:Commands.ExploreItem}"/>
<MenuItem Header="{x:Static s:guiStrings.CtxMenuDelete}" InputGestureText="Del"
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource booleanToCollapsedVisibilityConverter}}"
Command="{x:Static local:Commands.DeleteItem}"/>
<Separator/>
<!--
<MenuItem Header="{x:Static s:guiStrings.CtxMenuRename}" InputGestureText="F2"
Command="{x:Static local:Commands.RenameItem}"/>
-->
<MenuItem Header="{x:Static s:guiStrings.CtxMenuRefresh}" InputGestureText="F5"
Command="{x:Static local:Commands.Refresh}"/>
2014-08-22 14:16:11 +08:00
<MenuItem Header="{x:Static s:guiStrings.CtxMenuConvert}" InputGestureText="F6"
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource booleanToCollapsedVisibilityConverter}}"
Command="{x:Static local:Commands.ConvertImage}" />
</ContextMenu>
2014-07-31 10:57:13 +08:00
2014-07-22 03:26:28 +08:00
</Window.Resources>
<DockPanel LastChildFill="True">
2014-08-02 16:59:01 +08:00
<StackPanel x:Name="MainMenuBar" DockPanel.Dock="Top" Orientation="Vertical"
Visibility="{Binding Source={x:Static p:Settings.Default}, Path=winMenuBarVisibility, Mode=TwoWay}">
<Menu IsMainMenu="True" Background="{DynamicResource {x:Static SystemColors.MenuBrushKey}}">
<MenuItem Header="{x:Static s:guiStrings.MenuFile}">
<MenuItem Header="{x:Static s:guiStrings.MenuOpen}" Command="{x:Static local:Commands.OpenFile}" InputGestureText="Ctrl+O"/>
<MenuItem Header="{x:Static s:guiStrings.CtxMenuCreate}" InputGestureText="F3"
Command="{x:Static local:Commands.CreateArchive}" />
2014-08-22 21:17:19 +08:00
<MenuItem Header="{x:Static s:guiStrings.CtxMenuConvert}" InputGestureText="F6"
Command="{x:Static local:Commands.ConvertImage}" />
2014-08-02 16:59:01 +08:00
<MenuItem Header="{x:Static s:guiStrings.MenuRecent}" x:Name="RecentFilesMenu">
<MenuItem.ItemContainerStyle>
<Style TargetType="MenuItem">
<Setter Property="Header" Value="{Binding Path=Item2}"/>
<Setter Property="Command" Value="{x:Static local:Commands.OpenRecent}"/>
<Setter Property="CommandParameter" Value="{Binding Path=Item1}"/>
</Style>
</MenuItem.ItemContainerStyle>
</MenuItem>
<Separator/>
<MenuItem Header="{x:Static s:guiStrings.MenuExit}" Command="{x:Static local:Commands.Exit}" InputGestureText="Ctrl+Q"/>
2014-07-30 21:15:16 +08:00
</MenuItem>
2014-08-02 16:59:01 +08:00
<MenuItem Header="{x:Static s:guiStrings.MenuView}">
2014-08-03 14:48:34 +08:00
<MenuItem Header="{x:Static s:guiStrings.MenuFitWindow}" InputGestureText="Ctrl+H"
Command="{x:Static local:Commands.FitWindow}"/>
<MenuItem Header="{x:Static s:guiStrings.CtxMenuRefresh}" InputGestureText="F5"
Command="{x:Static local:Commands.Refresh}"/>
<Separator/>
2014-08-02 16:59:01 +08:00
<MenuItem Header="{x:Static s:guiStrings.MenuToggleToolBar}" InputGestureText="Alt+Shift+T"
Command="{x:Static local:Commands.HideToolBar}"/>
<MenuItem Header="{x:Static s:guiStrings.MenuToggleMenuBar}" InputGestureText="Alt+Shift+M"
Command="{x:Static local:Commands.HideMenuBar}"/>
<MenuItem Header="{x:Static s:guiStrings.MenuToggleStatusBar}" InputGestureText="Alt+Shift+S"
Command="{x:Static local:Commands.HideStatusBar}"/>
<Separator/>
<StaticResource ResourceKey="sortByMenu"/>
2014-08-02 16:59:01 +08:00
</MenuItem>
<MenuItem Header="{x:Static s:guiStrings.MenuHelp}">
<MenuItem Header="{x:Static s:guiStrings.MenuAbout}" Command="{x:Static local:Commands.About}"/>
</MenuItem>
</Menu>
<Separator Height="1" Margin="0"/>
</StackPanel>
2014-07-31 10:57:13 +08:00
<Menu Visibility="Collapsed" x:Name="HelperMenuBar"/>
2014-08-02 16:59:01 +08:00
<DockPanel x:Name="MainToolBar" Background="{Binding Path=Background, ElementName=HelperMenuBar}"
HorizontalAlignment="Stretch" DockPanel.Dock="Top"
Visibility="{Binding Source={x:Static p:Settings.Default}, Path=winToolBarVisibility, Mode=TwoWay}">
2014-07-22 03:26:28 +08:00
<DockPanel.Resources>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="Margin" Value="1,2,1,2"/>
</Style>
<Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Static ToolBar.ToggleButtonStyleKey}}">
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="Margin" Value="2,2,2,2"/>
</Style>
<Style TargetType="{x:Type Separator}" BasedOn="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}">
<Setter Property="Margin" Value="5,0,5,0"/>
</Style>
<!-- Path input textbox mouseover highlight -->
2014-08-03 22:16:09 +08:00
<Style TargetType="{x:Type local:ExtAutoCompleteBox}">
<Setter Property="Background" Value="White"/>
2014-08-03 22:16:09 +08:00
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsTextBoxFocused" Value="False"/>
<Condition Property="IsMouseOver" Value="False"/>
2014-08-03 22:16:09 +08:00
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{StaticResource InactiveInputBackground}"/>
</MultiTrigger>
</Style.Triggers>
</Style>
2014-07-22 03:26:28 +08:00
<Style TargetType="{x:Type Image}">
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<!--
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self}, Path=Source.Width}"/>
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource Self}, Path=Source.Height}"/>
<Setter Property="Stretch" Value="None"/>
-->
<Setter Property="Width" Value="24"/>
<Setter Property="Height" Value="24"/>
<Setter Property="Stretch" Value="Uniform"/>
<!-- hack to make images within disabled toolbar buttons appear 'grayed out'.
This doesn't gray them at all, but lowers their opacity so the (usually gray)
background of the button shows through. If WPF had a built-in facility for
grayscaling images in disabled buttons, this kind of icky kludgery wouldn't be
necessary -->
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Button}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
<Setter Property="Opacity" Value="0.33"/>
</DataTrigger>
</Style.Triggers>
</Style>
</DockPanel.Resources>
2014-08-02 16:59:01 +08:00
<Separator DockPanel.Dock="Bottom" Height="1" Margin="0"/>
2014-07-22 03:26:28 +08:00
<Button x:Name="ButtonBack" ToolTip="{x:Static s:guiStrings.TooltipBack}" Margin="5,2,0,2"
Command="{x:Static local:Commands.GoBack}">
<Image Source="{StaticResource Icon32x32Back}"/>
</Button>
<Button x:Name="ButtonForward" ToolTip="{x:Static s:guiStrings.TooltipForward}"
Command="{x:Static local:Commands.GoForward}">
<Image Source="{StaticResource Icon32x32Forward}"/>
</Button>
<Separator/>
2014-08-01 20:37:16 +08:00
<StackPanel Orientation="Horizontal" x:Name="PathWidget">
<local:ExtAutoCompleteBox x:Name="pathLine" Height="22" Width="100" Margin="0" BorderThickness="1,1,0,1"/>
<Button ToolTip="{x:Static s:guiStrings.CtxMenuRefresh}" Height="22" Width="22" Margin="0"
Background="{Binding ElementName=pathLine, Path=Background}"
BorderBrush="{Binding ElementName=pathLine, Path=BorderBrush}" BorderThickness="1">
<Image Source="Images/48x48/refresh.png" Height="16" Width="16"/>
</Button>
</StackPanel>
2015-05-12 17:31:27 +08:00
<StackPanel Orientation="Horizontal" x:Name="EncodingWidget" Visibility="{Binding ElementName=TextView, Path=Visibility}">
<Separator/>
<TextBlock Text="{x:Static s:guiStrings.LabelEncoding}" VerticalAlignment="Center" Margin="5,0,5,0"/>
<ComboBox x:Name="EncodingChoice" IsEditable="False" Height="22" DisplayMemberPath="EncodingName"
ItemsSource="{Binding ElementName=AppWindow, Path=TextEncodings}"
SelectedValue="{Binding Source={x:Static p:Settings.Default}, Path=appTextEncoding, Mode=TwoWay}"
SelectedValuePath="CodePage" SelectionChanged="OnEncodingSelect"/>
<Separator/>
</StackPanel>
2014-07-31 10:57:13 +08:00
<Button ToolTip="{x:Static s:guiStrings.MenuAbout}" DockPanel.Dock="Right" Margin="0,2,10,2"
Command="{x:Static local:Commands.About}">
2014-07-22 03:26:28 +08:00
<Image Source="{StaticResource Icon32x32Help}"/>
</Button>
<TextBlock Visibility="Hidden"/>
</DockPanel>
2014-08-02 16:59:01 +08:00
<StackPanel DockPanel.Dock="Bottom" x:Name="AppStatusBar"
Visibility="{Binding Source={x:Static p:Settings.Default}, Path=winStatusBarVisibility, Mode=TwoWay}">
<Separator Height="1" Margin="0"/>
<StatusBar>
<StatusBarItem Width="{Binding ElementName=CurrentDirectory, Path=ActualWidth}">
2014-08-02 16:59:01 +08:00
<TextBlock x:Name="appStatusText"/>
</StatusBarItem>
<Separator Width="1"/>
<StatusBarItem>
<TextBlock x:Name="appResourceText"/>
</StatusBarItem>
2014-08-02 16:59:01 +08:00
</StatusBar>
</StackPanel>
2014-07-22 03:26:28 +08:00
<Grid x:Name="ContentGrid" DockPanel.Dock="Left" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" ShowGridLines="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding Source={x:Static p:Settings.Default}, Path=lvPanelWidth, Mode=TwoWay}" MinWidth="200" />
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="*" MinWidth="100"/>
</Grid.ColumnDefinitions>
2014-07-31 10:57:13 +08:00
<local:ListViewEx x:Name="CurrentDirectory" Grid.Column="0" BorderThickness="0"
2014-07-22 03:26:28 +08:00
ItemsSource="{Binding Source={StaticResource ListViewSource}}"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
BorderBrush="Transparent" SelectedValuePath="Name"
SelectionMode="Extended" Foreground="Black" AlternationCount="2"
ContextMenu="{StaticResource lvDirContextMenu}"
2014-07-22 03:26:28 +08:00
PreviewTextInput="lv_TextInput" IsSynchronizedWithCurrentItem="True"
GridViewColumnHeader.Click="lv_ColumnHeaderClicked">
<ListView.Resources>
<SolidColorBrush x:Key="ItemInactiveBackground" Color="#ffcbcbcb" />
</ListView.Resources>
<ListView.InputBindings>
<KeyBinding Key="Enter" Command="{x:Static local:Commands.OpenItem}"/>
<KeyBinding Gesture="Ctrl+E" Command="{x:Static local:Commands.ExploreItem}"/>
<KeyBinding Gesture="F2" Command="{x:Static local:Commands.RenameItem}"/>
<KeyBinding Gesture="F4" Command="{x:Static local:Commands.ExtractItem}"/>
<KeyBinding Gesture="F5" Command="{x:Static local:Commands.Refresh}"/>
2014-08-22 21:17:19 +08:00
<KeyBinding Gesture="F6" Command="{x:Static local:Commands.ConvertImage}"/>
2014-07-22 03:26:28 +08:00
<KeyBinding Gesture="Delete" Command="{x:Static local:Commands.DeleteItem}"/>
<KeyBinding Gesture="Backspace" Command="{x:Static local:Commands.GoBack}"/>
<MouseBinding Gesture="LeftDoubleClick" Command="{x:Static local:Commands.OpenItem}" />
</ListView.InputBindings>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<EventSetter Event="Selected" Handler="lvi_Selected"/>
<EventSetter Event="ListViewItem.MouseDoubleClick" Handler="lvi_DoubleClick" />
<Style.Triggers>
<!-- BEGIN alternate row color -->
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="False" />
<Condition Property="IsMouseOver" Value="False" />
<Condition Property="ItemsControl.AlternationIndex" Value="0"/>
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{StaticResource AlternateColor1}"/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="False" />
<Condition Property="IsMouseOver" Value="False" />
<Condition Property="ItemsControl.AlternationIndex" Value="1"/>
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{StaticResource AlternateColor2}"/>
</MultiTrigger>
<!-- END alternate row color -->
<!-- BEGIN context menu trigger -->
<!--
<DataTrigger Binding="{Binding Path=IsArchive}" Value="True">
<Setter Property="ContextMenu" Value="{StaticResource lvArcContextMenu}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=IsArchive}" Value="False">
<Setter Property="ContextMenu" Value="{StaticResource lvDirContextMenu}"/>
</DataTrigger>
-->
<!-- END context menu trigger -->
</Style.Triggers>
</Style>
</ListView.ItemContainerStyle>
<ListView.View>
<GridView AllowsColumnReorder="False">
<GridViewColumn HeaderContainerStyle="{StaticResource HeaderLeftAlign}" Width="{Binding Source={x:Static p:Settings.Default}, Path=lvNameColumnWidth, Mode=TwoWay}" HeaderTemplate="{StaticResource SortArrowNone}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Name" Content="{x:Static s:guiStrings.HeaderName}"/>
</GridViewColumn.Header>
<GridViewColumn.CellTemplate>
<DataTemplate><TextBlock x:Name="item_Name" Text="{Binding Path=Name}"/></DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
2014-07-30 05:48:37 +08:00
<GridViewColumn HeaderContainerStyle="{StaticResource HeaderLeftAlign}" Width="{Binding Source={x:Static p:Settings.Default}, Path=lvTypeColumnWidth, Mode=TwoWay}" HeaderTemplate="{StaticResource SortArrowNone}" DisplayMemberBinding="{Binding Path=Type, Mode=OneWay, Converter={StaticResource entryTypeConverter}}">
2014-07-22 03:26:28 +08:00
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Type" Content="{x:Static s:guiStrings.HeaderType}"/>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn HeaderContainerStyle="{StaticResource HeaderLeftAlign}" Width="{Binding Source={x:Static p:Settings.Default}, Path=lvSizeColumnWidth, Mode=TwoWay}" HeaderTemplate="{StaticResource SortArrowNone}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Size" Content="{x:Static s:guiStrings.HeaderSize}"/>
</GridViewColumn.Header>
<GridViewColumn.CellTemplate>
<DataTemplate><TextBlock Text="{Binding Path=Size}" TextAlignment="Right"/></DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</local:ListViewEx>
2015-05-12 17:31:27 +08:00
<Grid Grid.Column="2" Name="PreviewPane" SnapsToDevicePixels="True">
<ScrollViewer Name="ImageView" Background="LightGray" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<Image Name="ImageCanvas" Stretch="None" UseLayoutRounding="True" SnapsToDevicePixels="True"
local:TouchScrolling.IsEnabled="True"/>
</ScrollViewer>
<jv:TextViewer x:Name="TextView" Visibility="Collapsed" BorderThickness="1,0,0,0" BorderBrush="Black"/>
</Grid>
2014-07-22 03:26:28 +08:00
<!-- Margin and BorderThickness help to react early on mouse pointer -->
<GridSplitter Grid.Column="1" Background="Black" ShowsPreview="False" Focusable="False"
Margin="-3,0" BorderThickness="3,0" BorderBrush="Transparent"
HorizontalAlignment="Center" VerticalAlignment="Stretch" />
</Grid>
</DockPanel>
<Window.InputBindings>
2014-07-31 10:57:13 +08:00
<KeyBinding Gesture="Ctrl+O" Command="{x:Static local:Commands.OpenFile}"/>
2014-07-22 03:26:28 +08:00
<KeyBinding Gesture="Ctrl+Q" Command="{x:Static local:Commands.Exit}"/>
2014-08-02 05:06:13 +08:00
<KeyBinding Gesture="Ctrl+H" Command="{x:Static local:Commands.FitWindow}"/>
2014-07-22 03:26:28 +08:00
<KeyBinding Gesture="Backspace" Command="{x:Static local:Commands.GoBack}"/>
2014-07-30 17:59:41 +08:00
<KeyBinding Gesture="Alt+Left" Command="{x:Static local:Commands.GoBack}"/>
<KeyBinding Gesture="Alt+Right" Command="{x:Static local:Commands.GoForward}"/>
2014-08-02 16:59:01 +08:00
<KeyBinding Gesture="Alt+Shift+M" Command="{x:Static local:Commands.HideMenuBar}"/>
<KeyBinding Gesture="Alt+Shift+T" Command="{x:Static local:Commands.HideToolBar}"/>
<KeyBinding Gesture="Alt+Shift+S" Command="{x:Static local:Commands.HideStatusBar}"/>
2014-07-22 03:26:28 +08:00
</Window.InputBindings>
<Window.CommandBindings>
<CommandBinding Command="{x:Static local:Commands.OpenItem}" Executed="OpenItemExec" CanExecute="CanExecuteOnSelected"/>
2014-07-31 10:57:13 +08:00
<CommandBinding Command="{x:Static local:Commands.OpenFile}" Executed="OpenFileExec" CanExecute="CanExecuteAlways"/>
<CommandBinding Command="{x:Static local:Commands.OpenRecent}" Executed="OpenRecentExec" CanExecute="CanExecuteAlways"/>
<CommandBinding Command="{x:Static local:Commands.ExtractItem}" Executed="ExtractItemExec" CanExecute="CanExecuteExtract"/>
<CommandBinding Command="{x:Static local:Commands.CreateArchive}" Executed="CreateArchiveExec" CanExecute="CanExecuteCreateArchive"/>
<CommandBinding Command="{x:Static local:Commands.DeleteItem}" Executed="DeleteItemExec" CanExecute="CanExecuteOnPhysicalFile" />
2014-07-22 03:26:28 +08:00
<CommandBinding Command="{x:Static local:Commands.RenameItem}" Executed="RenameItemExec" CanExecute="CanExecuteInDirectory" />
<CommandBinding Command="{x:Static local:Commands.ExploreItem}" Executed="ExploreItemExec" CanExecute="CanExecuteInDirectory" />
2014-08-22 14:16:11 +08:00
<CommandBinding Command="{x:Static local:Commands.ConvertImage}" Executed="ConvertImageExec" CanExecute="CanExecuteOnImage" />
2014-07-22 03:26:28 +08:00
<CommandBinding Command="{x:Static local:Commands.SortBy}" Executed="SortByExec" CanExecute="CanExecuteAlways"/>
<CommandBinding Command="{x:Static local:Commands.GoBack}" Executed="GoBackExec" CanExecute="CanExecuteGoBack"/>
<CommandBinding Command="{x:Static local:Commands.GoForward}" Executed="GoForwardExec" CanExecute="CanExecuteGoForward"/>
<CommandBinding Command="{x:Static local:Commands.Refresh}" Executed="RefreshExec" CanExecute="CanExecuteAlways"/>
2014-08-02 05:06:13 +08:00
<CommandBinding Command="{x:Static local:Commands.FitWindow}" Executed="FitWindowExec" CanExecute="CanExecuteFitWindow"/>
2014-08-02 16:59:01 +08:00
<CommandBinding Command="{x:Static local:Commands.HideStatusBar}" Executed="HideStatusBarExec" CanExecute="CanExecuteAlways"/>
<CommandBinding Command="{x:Static local:Commands.HideMenuBar}" Executed="HideMenuBarExec" CanExecute="CanExecuteAlways"/>
<CommandBinding Command="{x:Static local:Commands.HideToolBar}" Executed="HideToolBarExec" CanExecute="CanExecuteAlways"/>
2014-07-31 10:57:13 +08:00
<CommandBinding Command="{x:Static local:Commands.About}" Executed="AboutExec" CanExecute="CanExecuteAlways"/>
2014-07-22 03:26:28 +08:00
<CommandBinding Command="{x:Static local:Commands.Exit}" Executed="ExitExec" CanExecute="CanExecuteAlways"/>
</Window.CommandBindings>
</Window>