| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156 |
- <UserControl
- Background="Transparent"
- DragDrop.AllowDrop="True"
- Focusable="True"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d"
- x:Class="PicView.Avalonia.Views.MainView"
- x:DataType="vm:MainViewModel"
- xmlns="https://github.com/avaloniaui"
- xmlns:buttons="clr-namespace:PicView.Avalonia.Views.UC.Buttons"
- xmlns:converters="clr-namespace:PicView.Avalonia.Converters"
- xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:uc="clr-namespace:PicView.Avalonia.Views.UC"
- xmlns:views="clr-namespace:PicView.Avalonia.Views"
- xmlns:vm="clr-namespace:PicView.Avalonia.ViewModels"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Design.DataContext>
- <vm:MainViewModel />
- </Design.DataContext>
- <UserControl.Resources>
- <converters:SortFilesByToBoolConverter x:Key="EnumToBoolConverter" />
- <SolidColorBrush Color="{DynamicResource MainTextColor}" x:Key="Brush0" />
- </UserControl.Resources>
- <UserControl.ContextMenu>
- <ContextMenu x:Name="MainContextMenu">
- <!-- Open -->
- <MenuItem
- Command="{CompiledBinding OpenFileCommand}"
- Header="{CompiledBinding Translation.Open,
- Mode=OneWay}"
- MinWidth="180">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource AltFolderGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12.14"
- Stretch="Fill"
- Width="15" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Save -->
- <MenuItem
- Command="{CompiledBinding SaveFileCommand}"
- Header="{CompiledBinding Translation.Save,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource SaveGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Save as -->
- <MenuItem
- Command="{CompiledBinding SaveFileAsCommand}"
- Header="{CompiledBinding Translation.SaveAs,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource SaveGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Print -->
- <MenuItem
- Command="{CompiledBinding PrintCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.Print,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- x:Name="PrintMenuItem">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource PrintGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Open with -->
- <MenuItem
- Command="{CompiledBinding OpenWithCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.OpenWith,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- x:Name="OpenWithMenuItem">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource OpenWithGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Locate on disk -->
- <MenuItem
- Command="{CompiledBinding LocateOnDiskCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.ShowInFolder,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource ShowInFolderGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Sort files by -->
- <MenuItem Header="{CompiledBinding Translation.SortFilesBy, Mode=OneWay}">
- <MenuItem.Icon>
- <Path
- Data="M666 481q-60 92-137 273-22-45-37-72.5t-40.5-63.5-51-56.5-63-35-81.5-14.5h-224q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h224q250 0 410 225zm1126 799q0 14-9 23l-320 320q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-192q-32 0-85 .5t-81 1-73-1-71-5-64-10.5-63-18.5-58-28.5-59-40-55-53.5-56-69.5q59-93 136-273 22 45 37 72.5t40.5 63.5 51 56.5 63 35 81.5 14.5h256v-192q0-14 9-23t23-9q12 0 24 10l319 319q9 9 9 23zm0-896q0 14-9 23l-320 320q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-192h-256q-48 0-87 15t-69 45-51 61.5-45 77.5q-32 62-78 171-29 66-49.5 111t-54 105-64 100-74 83-90 68.5-106.5 42-128 16.5h-224q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h224q48 0 87-15t69-45 51-61.5 45-77.5q32-62 78-171 29-66 49.5-111t54-105 64-100 74-83 90-68.5 106.5-42 128-16.5h256v-192q0-14 9-23t23-9q12 0 24 10l319 319q9 9 9 23z"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- <!-- Sort files by name -->
- <MenuItem
- Command="{CompiledBinding SortFilesByNameCommand}"
- GroupName="SortType"
- Header="{CompiledBinding Translation.FileName,
- Mode=OneWay}"
- IsChecked="{CompiledBinding SortOrder,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=Name}"
- ToggleType="Radio" />
- <!-- Sort files by size -->
- <MenuItem
- Command="{CompiledBinding SortFilesBySizeCommand}"
- GroupName="SortType"
- Header="{CompiledBinding Translation.FileSize,
- Mode=OneWay}"
- IsChecked="{CompiledBinding SortOrder,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=FileSize}"
- ToggleType="Radio" />
- <!-- Sort files by extension -->
- <MenuItem
- Command="{CompiledBinding SortFilesByExtensionCommand}"
- GroupName="SortType"
- Header="{CompiledBinding Translation.FileExtension,
- Mode=OneWay}"
- IsChecked="{CompiledBinding SortOrder,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=Extension}"
- ToggleType="Radio" />
- <!-- Sort files by creation time -->
- <MenuItem
- Command="{CompiledBinding SortFilesByCreationTimeCommand}"
- GroupName="SortType"
- Header="{CompiledBinding Translation.Created,
- Mode=OneWay}"
- IsChecked="{CompiledBinding SortOrder,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=CreationTime}"
- ToggleType="Radio" />
- <!-- Sort files by last access time -->
- <MenuItem
- Command="{CompiledBinding SortFilesByLastAccessTimeCommand}"
- GroupName="SortType"
- Header="{CompiledBinding Translation.LastAccessTime,
- Mode=OneWay}"
- IsChecked="{CompiledBinding SortOrder,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=LastAccessTime}"
- ToggleType="Radio" />
- <!-- Sort files randomly -->
- <MenuItem
- Command="{CompiledBinding SortFilesRandomlyCommand}"
- GroupName="SortType"
- Header="{CompiledBinding Translation.Random,
- Mode=OneWay}"
- IsChecked="{CompiledBinding SortOrder,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=Random}"
- ToggleType="Radio" />
- <Separator />
- <!-- Sort files ascending -->
- <MenuItem
- Command="{CompiledBinding SortFilesAscendingCommand}"
- GroupName="SortDirection"
- Header="{CompiledBinding Translation.Ascending,
- Mode=OneWay}"
- IsChecked="{CompiledBinding IsAscending}"
- ToggleType="Radio" />
- <!-- Sort files descending -->
- <MenuItem
- Command="{CompiledBinding SortFilesDescendingCommand}"
- GroupName="SortDirection"
- Header="{CompiledBinding Translation.Descending,
- Mode=OneWay}"
- ToggleType="Radio" />
- </MenuItem>
- <!-- Recent files -->
- <MenuItem Header="{Binding Translation.RecentFiles, Mode=OneWay}">
- <MenuItem.Icon>
- <Path
- Data="M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- <MenuItem Theme="{StaticResource Slim}" x:Name="RecentFilesHeader">
- <MenuItem.Header>
- <DockPanel LastChildFill="False">
- <Button
- Classes="errorHover"
- CornerRadius="8,0,0,0"
- DockPanel.Dock="Left"
- Margin="0,0,5,0"
- Padding="8,4"
- x:Name="HistoryClearButton">
- <StackPanel Orientation="Horizontal">
- <Path
- Data="{StaticResource RecycleGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12"
- x:Name="HistoryClearPath" />
- <TextBlock
- Classes="txt"
- Foreground="{DynamicResource MainTextColor}"
- Margin="5,0,0,0"
- Text="{CompiledBinding Translation.Clear}"
- x:Name="HistoryClearTextBlock" />
- </StackPanel>
- </Button>
- <Button
- Classes="hover"
- ClickMode="Release"
- DockPanel.Dock="Left"
- Margin="0,0,5,0"
- Padding="8,4"
- x:Name="HistoryFileButton">
- <StackPanel Orientation="Horizontal">
- <Path
- Data="{StaticResource FilePropertiesGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12"
- x:Name="HistoryFileButtonPath" />
- <TextBlock
- Classes="txt"
- Foreground="{DynamicResource MainTextColor}"
- Margin="5,0,0,0"
- Text="{CompiledBinding Translation.OpenFileHistory}"
- x:Name="HistoryFileNameTextBlock" />
- </StackPanel>
- </Button>
- <customControls:IconButton
- Background="Transparent"
- Classes="hover"
- CornerRadius="0,8,0,0"
- DockPanel.Dock="Right"
- Foreground="{DynamicResource MainTextColor}"
- Icon="{StaticResource SortDescImage}"
- IconHeight="12"
- IconWidth="12"
- Margin="5,0,0,0"
- Padding="8,4"
- x:Name="HistorySortButton" />
- </DockPanel>
- </MenuItem.Header>
- </MenuItem>
- <Separator Background="{DynamicResource TertiaryBorderColor}" />
- <MenuItem
- StaysOpenOnClick="True"
- Theme="{StaticResource Slim}"
- x:Name="RecentFilesContent">
- <MenuItem.Header>
- <customControls:AutoScrollViewer MaxHeight="450" Theme="{StaticResource Inline}">
- <StackPanel Margin="0,0,15,0" x:Name="RecentFilesCM" />
- </customControls:AutoScrollViewer>
- </MenuItem.Header>
- </MenuItem>
- </MenuItem>
- <!-- Settings -->
- <MenuItem Header="{CompiledBinding Translation.Settings, Mode=OneWay}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource WrenchGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- <!-- Toggle Subdirectories -->
- <MenuItem
- Command="{CompiledBinding ToggleSubdirectoriesCommand}"
- Header="{CompiledBinding Translation.SearchSubdirectory,
- Mode=OneWay}"
- IsChecked="{Binding IsIncludingSubdirectories}"
- ToggleType="CheckBox" />
- <Separator />
- <!-- Toggle looping -->
- <MenuItem
- Header="{CompiledBinding Translation.IsLooping,
- Mode=OneWay}"
- IsChecked="{Binding IsLooping}"
- ToggleType="CheckBox" />
- <Separator />
- <!-- Toggle scrolling -->
- <MenuItem
- Header="{CompiledBinding Translation.IsScrolling,
- Mode=OneWay}"
- IsChecked="{CompiledBinding IsScrollingEnabled}"
- ToggleType="CheckBox" />
- <!-- Toggle stretching -->
- <MenuItem
- Command="{CompiledBinding StretchCommand}"
- Header="{CompiledBinding Translation.Stretch,
- Mode=OneWay}"
- IsChecked="{CompiledBinding IsStretched}"
- ToggleType="CheckBox" />
- <!-- Toggle side-by-side -->
- <MenuItem
- Command="{CompiledBinding ShowSideBySideCommand}"
- Header="{CompiledBinding Translation.SideBySide,
- Mode=OneWay}"
- IsChecked="{CompiledBinding PicViewer.IsShowingSideBySide}"
- ToggleType="CheckBox" />
- <Separator />
- <!-- Toggle topmost -->
- <MenuItem
- Command="{CompiledBinding ChangeTopMostCommand}"
- Header="{CompiledBinding Translation.StayTopMost,
- Mode=OneWay}"
- IsChecked="{CompiledBinding IsTopMost}"
- ToggleType="CheckBox" />
- <!-- Toggle auto fit -->
- <MenuItem
- Command="{CompiledBinding ChangeAutoFitCommand}"
- Header="{CompiledBinding Translation.AutoFitWindow,
- Mode=OneWay}"
- IsChecked="{CompiledBinding IsAutoFit}"
- ToggleType="CheckBox" />
- <Separator />
- <!-- Toggle ctrl zoom -->
- <MenuItem Command="{CompiledBinding ChangeCtrlZoomCommand}" Header="{CompiledBinding Translation.IsCtrlToZoom, Mode=OneWay}">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{CompiledBinding ChangeCtrlZoomImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Toggle UI -->
- <MenuItem
- Command="{CompiledBinding ToggleUICommand}"
- Header="{CompiledBinding Translation.IsShowingUI,
- Mode=OneWay}"
- IsVisible="{CompiledBinding IsUIShown,
- Mode=OneWay}">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource EyeOffImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <MenuItem
- Command="{CompiledBinding ToggleUICommand}"
- Header="{CompiledBinding Translation.IsShowingUI,
- Mode=OneWay}"
- IsVisible="{CompiledBinding !IsUIShown,
- Mode=OneWay}">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource EyeImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Change background -->
- <MenuItem
- Command="{CompiledBinding ChangeBackgroundCommand}"
- Header="{CompiledBinding Translation.ChangeBackground,
- Mode=OneWay}"
- StaysOpenOnClick="True">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource CanvasImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Toggle bottom gallery -->
- <MenuItem
- Command="{CompiledBinding ToggleBottomGalleryCommand}"
- Header="{CompiledBinding Translation.IsShowingBottomGallery,
- Mode=OneWay}"
- IsChecked="{CompiledBinding IsBottomGalleryShown}">
- <MenuItem.Icon>
- <Image Height="12" Width="12">
- <DrawingImage>
- <DrawingImage.Drawing>
- <DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
- <GeometryDrawing Brush="{StaticResource Brush0}" Geometry="F1 M512,512z M0,0z M80,132L80,460A20,20,0,0,0,100,480L492,480A20,20,0,0,0,512,460L512,132A20,20,0,0,0,492,112L100,112A20,20,0,0,0,80,132z M373.14,173.33A46,46,0,1,1,326.86,219.33A46.19,46.19,0,0,1,373.14,173.33z M111.73,449.33L111.73,353.85 234.49,243.65 328.27,337 215.27,449.33z M480,449.33L259,449.33 403.58,305.33 480,370.59z" />
- <GeometryDrawing Brush="{StaticResource Brush0}" Geometry="F1 M512,512z M0,0z M20,32A20,20,0,0,0,0,52L0,396A20,20,0,0,0,20,416L48,416 48,100A20,20,0,0,1,68,80L448,80 448,52A20,20,0,0,0,428,32z" />
- </DrawingGroup>
- </DrawingImage.Drawing>
- </DrawingImage>
- </Image>
- </MenuItem.Icon>
- </MenuItem>
- <!-- Toggle bottom bar -->
- <MenuItem
- Command="{CompiledBinding ToggleBottomNavBarCommand}"
- Header="{CompiledBinding Translation.ShowBottomToolbar,
- Mode=OneWay}"
- IsChecked="{CompiledBinding IsBottomToolbarShown}"
- IsVisible="{CompiledBinding !IsBottomToolbarShown}"
- ToggleType="CheckBox">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource Panel-Bottom}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Show Settings window -->
- <MenuItem Command="{CompiledBinding ShowSettingsWindowCommand}" Header="{CompiledBinding Translation.ShowAllSettingsWindow, Mode=OneWay}">
- <MenuItem.Icon>
- <Path
- Data="M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4zM416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- </MenuItem>
- <Separator />
- <!-- Navigation -->
- <MenuItem Header="{CompiledBinding Translation.Navigation, Mode=OneWay}">
- <MenuItem.Icon>
- <Image
- Height="14"
- Source="{StaticResource SignPostImage}"
- Width="14" />
- </MenuItem.Icon>
- <!-- Next -->
- <MenuItem
- Command="{CompiledBinding NextCommand}"
- Header="{CompiledBinding Translation.NextImage,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- StaysOpenOnClick="True">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource NextImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Prev -->
- <MenuItem
- Command="{CompiledBinding PreviousCommand}"
- Header="{CompiledBinding Translation.PrevImage,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- StaysOpenOnClick="True">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource PrevImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Next 10 -->
- <MenuItem
- Command="{CompiledBinding Skip10Command}"
- Header="{CompiledBinding Translation.AdvanceBy10Images,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- StaysOpenOnClick="True">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource NextImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Next 100 -->
- <MenuItem
- Command="{CompiledBinding Skip100Command}"
- Header="{CompiledBinding Translation.AdvanceBy100Images,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- StaysOpenOnClick="True">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource NextImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Prev 10 -->
- <MenuItem
- Command="{CompiledBinding Prev10Command}"
- Header="{CompiledBinding Translation.GoBackBy10Images,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- StaysOpenOnClick="True">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource PrevImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Prev 100 -->
- <MenuItem
- Command="{CompiledBinding Prev100Command}"
- Header="{CompiledBinding Translation.GoBackBy100Images,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- StaysOpenOnClick="True">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource PrevImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- First Image -->
- <MenuItem
- Command="{CompiledBinding FirstCommand}"
- Header="{CompiledBinding Translation.FirstImage}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource FirstImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Last Image -->
- <MenuItem
- Command="{CompiledBinding LastCommand}"
- Header="{CompiledBinding Translation.LastImage,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource LastImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Next folder -->
- <MenuItem
- Command="{CompiledBinding NextFolderCommand}"
- Header="{CompiledBinding Translation.NextFolder,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Image
- Height="14"
- Source="{StaticResource NextFolderImage}"
- Width="14" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Prev folder -->
- <MenuItem
- Command="{CompiledBinding PreviousFolderCommand}"
- Header="{CompiledBinding Translation.PrevFolder,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Image
- Height="14"
- Source="{StaticResource PrevFolderImage}"
- Width="14" />
- </MenuItem.Icon>
- </MenuItem>
- </MenuItem>
- <Separator />
- <!-- Set as wallpaper -->
- <MenuItem
- Command="{CompiledBinding SetAsWallpaperCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.SetAsWallpaper,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource PanoramaGeometry}"
- Fill="{StaticResource Brush0}"
- Height="10.40"
- Stretch="Fill"
- Width="13" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Image -->
- <MenuItem Header="{CompiledBinding Translation.Image, Mode=OneWay}">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource Image}"
- Width="12" />
- </MenuItem.Icon>
- <!-- Exif window -->
- <MenuItem Command="{CompiledBinding ShowExifWindowCommand}" Header="{CompiledBinding Translation.ImageInfo, Mode=OneWay}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource ImageInfoGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- File properties -->
- <MenuItem
- Command="{CompiledBinding FilePropertiesCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.FileProperties,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource FilePropertiesGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Single image resize -->
- <MenuItem Command="{CompiledBinding ShowSingleImageResizeWindowCommand}" Header="{CompiledBinding Translation.ResizeImage, Mode=OneWay}">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource BatchResizeImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Batch resize -->
- <MenuItem Command="{CompiledBinding ShowBatchResizeWindowCommand}" Header="{CompiledBinding Translation.BatchResize, Mode=OneWay}">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource BatchResizeImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Optimize image -->
- <MenuItem
- Command="{CompiledBinding OptimizeImageCommand}"
- Header="{CompiledBinding Translation.OptimizeImage,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding ShouldOptimizeImageBeEnabled,
- Mode=OneWay}">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource PortalImage}"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Crop -->
- <MenuItem
- Command="{CompiledBinding CropCommand}"
- Header="{CompiledBinding Translation.Crop,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding ShouldCropBeEnabled,
- Mode=OneWay}"
- x:Name="CropMenuItem">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource CropGeometry}"
- Fill="{DynamicResource MainTextColor}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Flip -->
- <MenuItem
- Command="{CompiledBinding FlipCommand}"
- Header="{CompiledBinding Translation.IsFlipped}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- StaysOpenOnClick="True">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource FlipGeometry}"
- Fill="{DynamicResource MainTextColor}"
- Height="12"
- Stretch="Fill"
- Width="12">
- <Path.RenderTransform>
- <ScaleTransform ScaleX="{CompiledBinding PicViewer.ScaleX}" />
- </Path.RenderTransform>
- </Path>
- </MenuItem.Icon>
- </MenuItem>
- <!-- Rotate left -->
- <MenuItem
- Command="{CompiledBinding RotateLeftCommand}"
- Header="{CompiledBinding Translation.RotateLeft,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- StaysOpenOnClick="True">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource RotateLeftGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Rotate right -->
- <MenuItem
- Command="{CompiledBinding RotateRightCommand}"
- Header="{CompiledBinding Translation.RotateRight,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource,
- Converter={x:Static ObjectConverters.IsNotNull}}"
- StaysOpenOnClick="True">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource RotateRightGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- </MenuItem>
- <Separator />
- <!-- Delete file -->
- <MenuItem
- Command="{CompiledBinding RecycleFileCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.DeleteFile,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource RecycleGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Paste -->
- <MenuItem Command="{CompiledBinding PasteCommand}" Header="{CompiledBinding Translation.Paste, Mode=OneWay}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource PasteGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Copy -->
- <MenuItem
- Command="{CompiledBinding CopyFileCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.Copy,
- Mode=OneWay}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource CopyGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- <!-- Copy image -->
- <MenuItem
- Command="{CompiledBinding CopyImageCommand}"
- Header="{CompiledBinding Translation.CopyImage,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource CopyImageGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Copy file path -->
- <MenuItem
- Command="{CompiledBinding CopyFilePathCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- Header="{Binding Translation.FileCopyPath, Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource CopyGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Copy base64 -->
- <MenuItem
- Command="{CompiledBinding CopyBase64Command}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Header>
- <TextBlock>
- <Run Text="{CompiledBinding Translation.Copy, Mode=OneWay}" />
- <Run Text=" base64" />
- </TextBlock>
- </MenuItem.Header>
- <MenuItem.Icon>
- <Path
- Data="{StaticResource CopyGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Duplicate file -->
- <MenuItem
- Command="{CompiledBinding DuplicateFileCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.DuplicateFile,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource DuplicateGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Cut -->
- <!-- <MenuItem -->
- <!-- Command="{CompiledBinding CutCommand}" -->
- <!-- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName, -->
- <!-- FallbackValue=''}" -->
- <!-- Header="{CompiledBinding Translation.FileCut, -->
- <!-- Mode=OneWay}" -->
- <!-- IsEnabled="False"> -->
- <!-- <MenuItem.Icon> -->
- <!-- <Path -->
- <!-- Data="{StaticResource CutGeometry}" -->
- <!-- Fill="{StaticResource Brush0}" -->
- <!-- Height="12" -->
- <!-- Stretch="Fill" -->
- <!-- Width="12" /> -->
- <!-- </MenuItem.Icon> -->
- <!-- </MenuItem> -->
- </MenuItem>
- <!-- Copy file -->
- <MenuItem
- Command="{CompiledBinding CopyFileCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.CopyFile,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource CopyGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <Separator />
- <!-- Fullscreen -->
- <MenuItem
- Command="{CompiledBinding ToggleFullscreenCommand}"
- Header="{CompiledBinding Translation.Fullscreen,
- Mode=OneWay}"
- IsVisible="{CompiledBinding !IsFullscreen,
- Mode=OneWay}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource FullscreenGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Maximize -->
- <MenuItem
- Command="{CompiledBinding MaximizeCommand}"
- Header="{CompiledBinding Translation.Maximize,
- Mode=OneWay}"
- IsVisible="{CompiledBinding ShouldMaximizeBeShown,
- Mode=OneWay}"
- x:Name="MaximizeMenuItem">
- <MenuItem.Icon>
- <Image
- Height="12"
- Source="{StaticResource SquareImage}"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Restore -->
- <MenuItem
- Command="{CompiledBinding RestoreCommand}"
- Header="{CompiledBinding Translation.RestoreDown,
- Mode=OneWay}"
- IsVisible="{CompiledBinding ShouldRestore,
- Mode=OneWay}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource RestoreGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- <!-- Close -->
- <MenuItem Command="{CompiledBinding ExitCommand}" Header="{CompiledBinding Translation.Close, Mode=OneWay}">
- <MenuItem.Icon>
- <Path
- Data="{StaticResource CloseGeometry}"
- Fill="{StaticResource Brush0}"
- Height="12"
- Stretch="Fill"
- Width="12" />
- </MenuItem.Icon>
- </MenuItem>
- </ContextMenu>
- </UserControl.ContextMenu>
- <Panel x:Name="MainGrid">
- <uc:SpinWaiter
- HorizontalAlignment="Center"
- IsVisible="{CompiledBinding IsLoading,
- Mode=OneWay}"
- VerticalAlignment="Center"
- ZIndex="3" />
- <ContentControl
- ClipToBounds="True"
- Content="{CompiledBinding CurrentView,
- Mode=OneWay}"
- Margin="{CompiledBinding GalleryMargin}" />
- <buttons:ClickArrowRight
- HorizontalAlignment="Right"
- Margin="{CompiledBinding RightControlOffSetMargin}"
- Opacity="0"
- VerticalAlignment="Center"
- x:Name="ClickArrowRight" />
- <buttons:ClickArrowLeft
- HorizontalAlignment="Left"
- Opacity="0"
- VerticalAlignment="Center"
- x:Name="ClickArrowLeft" />
- <StackPanel
- Background="Transparent"
- Height="150"
- HorizontalAlignment="Right"
- IsVisible="{CompiledBinding !IsUIShown}"
- Margin="{CompiledBinding RightControlOffSetMargin}"
- Opacity="0"
- Orientation="Horizontal"
- VerticalAlignment="Top"
- x:Name="AltButtonsPanel">
- <buttons:AltMinimize x:Name="AltMinimize" />
- <buttons:AltRestore x:Name="AltRestore" />
- <buttons:AltClose x:Name="AltClose" />
- </StackPanel>
- <buttons:GalleryShortcut
- HorizontalAlignment="Right"
- Opacity="0"
- VerticalAlignment="Bottom"
- x:Name="GalleryShortcut" />
- <views:GalleryAnimationControlView
- GalleryMode="{CompiledBinding GalleryMode,
- Mode=OneWay}"
- Height="NaN"
- IsVisible="{CompiledBinding IsBottomGalleryShown,
- Mode=OneWay}"
- VerticalAlignment="{CompiledBinding GalleryVerticalAlignment,
- Mode=OneWay}"
- Width="{CompiledBinding GalleryWidth,
- Mode=OneWay}"
- x:Name="GalleryView" />
- <uc:ToolTipMessage
- HorizontalAlignment="Center"
- Opacity="0"
- VerticalAlignment="Center"
- x:Name="ToolTipMessage" />
- </Panel>
- </UserControl>
|