| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340 |
- <Window
- BorderBrush="{DynamicResource SecondaryBackgroundColor}"
- BorderThickness="1"
- CanResize="{Binding MainWindow.CanResize.Value}"
- ExtendClientAreaChromeHints="SystemChrome"
- ExtendClientAreaTitleBarHeightHint="-1"
- MinHeight="{CompiledBinding MainWindow.WindowMinSize.Value}"
- MinWidth="{CompiledBinding MainWindow.WindowMinSize.Value}"
- SizeChanged="Control_OnSizeChanged"
- SizeToContent="{CompiledBinding MainWindow.SizeToContent.Value}"
- Title="{CompiledBinding PicViewer.WindowTitle.Value}"
- x:Class="PicView.Avalonia.MacOS.Views.MacMainWindow"
- x:DataType="viewModels:MainViewModel"
- xmlns="https://github.com/avaloniaui"
- xmlns:converters1="clr-namespace:PicView.Avalonia.Converters;assembly=PicView.Avalonia"
- xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels;assembly=PicView.Avalonia"
- xmlns:views="clr-namespace:PicView.Avalonia.Views;assembly=PicView.Avalonia"
- xmlns:views1="clr-namespace:PicView.Avalonia.MacOS.Views"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Window.Resources>
- <converters1:SortFilesByToBoolConverter x:Key="EnumToBoolConverter" />
- </Window.Resources>
- <NativeMenu.Menu>
- <NativeMenu>
- <NativeMenuItem Header="{CompiledBinding Translation.File.Value}">
- <NativeMenu>
- <NativeMenuItem Command="{CompiledBinding Tools.OpenFileCommand}" Header="{CompiledBinding Translation.Open.Value, Mode=OneWay}" />
- <NativeMenuItem
- Command="{CompiledBinding Tools.OpenWithCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.OpenWith,
- Mode=OneWay}" />
- <NativeMenuItem Command="{CompiledBinding Tools.SaveFileCommand}" Header="{CompiledBinding Translation.Save.Value, Mode=OneWay}" />
- <NativeMenuItem Command="{CompiledBinding Tools.SaveFileAsCommand}" Header="{CompiledBinding Translation.SaveAs.Value, Mode=OneWay}" />
- <NativeMenuItem
- Command="{CompiledBinding Tools.PrintCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.Print.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItem
- Command="{CompiledBinding Tools.LocateOnDiskCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.ShowInFolder.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem
- Command="{CompiledBinding Tools.DeleteFilePermanentlyCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.DeleteFile.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem
- Command="{CompiledBinding Navigation.ReloadCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.Reload.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItem Command="{CompiledBinding Window.NewWindow}" Header="{CompiledBinding Translation.NewWindow.Value, Mode=OneWay}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem
- Command="{CompiledBinding Tools.RenameCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.RenameFile.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding Tools.PasteCommand}" Header="{CompiledBinding Translation.Paste.Value, Mode=OneWay}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem
- Command="{CompiledBinding Tools.CopyFileCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.CopyFile.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItem
- Command="{CompiledBinding Tools.CopyImageCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.CopyImage.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.ImageSource.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItem
- Command="{CompiledBinding Tools.CopyFilePathCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.FileCopyPath.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItem
- Command="{CompiledBinding Tools.DuplicateFileCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.DuplicateFile.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- </NativeMenu>
- </NativeMenuItem>
- <!-- Image -->
- <NativeMenuItem Header="{CompiledBinding Translation.Image.Value, Mode=OneWay}">
- <NativeMenu>
- <NativeMenuItem
- Command="{CompiledBinding RotateLeftCommand}"
- Header="{CompiledBinding Translation.RotateLeft.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItem
- Command="{CompiledBinding RotateRightCommand}"
- Header="{CompiledBinding Translation.RotateRight.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItem
- Command="{CompiledBinding FlipCommand}"
- Header="{CompiledBinding Translation.Flip.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem
- Command="{CompiledBinding CropCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.Crop.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem
- Command="{CompiledBinding Tools.SetAsWallpaperCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.SetAsWallpaper.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding Window.ShowExifWindow}" Header="{CompiledBinding Translation.ImageInfo.Value, Mode=OneWay}" />
- <NativeMenuItem
- Command="{CompiledBinding Tools.FilePropertiesCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.FileProperties.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding Window.ShowSingleImageResizeWindow}" Header="{CompiledBinding Translation.ResizeImage.Value, Mode=OneWay}" />
- <NativeMenuItem Command="{CompiledBinding Window.ShowBatchResizeWindow}" Header="{CompiledBinding Translation.BatchResize.Value, Mode=OneWay}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem
- Command="{CompiledBinding OptimizeImageCommand}"
- CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
- FallbackValue=''}"
- Header="{CompiledBinding Translation.OptimizeImage.Value,
- Mode=OneWay}"
- IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
- Converter={x:Static ObjectConverters.IsNotNull}}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding Window.ShowEffectsWindow}" Header="{CompiledBinding Translation.Effects.Value, Mode=OneWay}" />
- </NativeMenu>
- </NativeMenuItem>
- <!-- Navigation -->
- <NativeMenuItem Header="{CompiledBinding Translation.Navigation.Value, Mode=OneWay}">
- <NativeMenu>
- <NativeMenuItem
- Command="{CompiledBinding Tools.StartSlideShowTask}"
- CommandParameter="-1"
- Header="{CompiledBinding Translation.Slideshow.Value,
- Mode=OneWay}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding Navigation.FirstCommand}" Header="{CompiledBinding Translation.FirstImage.Value, Mode=OneWay}" />
- <NativeMenuItem Command="{CompiledBinding Navigation.LastCommand}" Header="{CompiledBinding Translation.LastImage.Value, Mode=OneWay}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding Navigation.Skip10Command}" Header="{CompiledBinding Translation.AdvanceBy10Images.Value, Mode=OneWay}" />
- <NativeMenuItem Command="{CompiledBinding Navigation.Skip100Command}" Header="{CompiledBinding Translation.AdvanceBy100Images.Value, Mode=OneWay}" />
- <NativeMenuItem Command="{CompiledBinding Navigation.Prev10Command}" Header="{CompiledBinding Translation.GoBackBy10Images.Value, Mode=OneWay}" />
- <NativeMenuItem Command="{CompiledBinding Navigation.Prev100Command}" Header="{CompiledBinding Translation.GoBackBy100Images.Value, Mode=OneWay}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding Navigation.NextFolderCommand}" Header="{CompiledBinding Translation.NextFolder.Value, Mode=OneWay}" />
- <NativeMenuItem Command="{CompiledBinding Navigation.PreviousFolderCommand}" Header="{CompiledBinding Translation.PrevFolder.Value, Mode=OneWay}" />
- </NativeMenu>
- </NativeMenuItem>
- <!-- Interface configuration -->
- <NativeMenuItem Header="{CompiledBinding Translation.InterfaceConfiguration.Value, Mode=OneWay}">
- <NativeMenu>
- <NativeMenuItem Command="{CompiledBinding MainWindow.ToggleFullscreenCommand}" Header="{CompiledBinding Translation.ToggleFullscreen.Value, Mode=OneWay}" />
- <NativeMenuItem
- Command="{CompiledBinding ChangeAutoFitCommand}"
- Header="{CompiledBinding Translation.AutoFitWindow.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding GlobalSettings.IsAutoFit.Value}"
- ToggleType="CheckBox" />
- <NativeMenuItem Command="{CompiledBinding ToggleUICommand}" Header="{CompiledBinding Translation.IsShowingUI.Value, Mode=OneWay}" />
- <NativeMenuItem Command="{CompiledBinding Gallery.ToggleGalleryCommand}" Header="{CompiledBinding Translation.ShowImageGallery.Value, Mode=OneWay}" />
- </NativeMenu>
- </NativeMenuItem>
- <!-- Sort files -->
- <NativeMenuItem Header="{CompiledBinding Translation.SortFilesBy.Value, Mode=OneWay}">
- <NativeMenu>
- <NativeMenuItem
- Command="{CompiledBinding Sorting.SortFilesByNameCommand}"
- Header="{CompiledBinding Translation.FileName.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding Sorting.SortOrder.Value,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=Name}"
- ToggleType="Radio" />
- <NativeMenuItem
- Command="{CompiledBinding Sorting.SortFilesBySizeCommand}"
- Header="{CompiledBinding Translation.FileSize.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding Sorting.SortOrder.Value,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=FileSize}"
- ToggleType="Radio" />
- <NativeMenuItem
- Command="{CompiledBinding Sorting.SortFilesByExtensionCommand}"
- Header="{CompiledBinding Translation.FileExtension.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding Sorting.SortOrder.Value,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=FileExtension}"
- ToggleType="Radio" />
- <NativeMenuItem
- Command="{CompiledBinding Sorting.SortFilesByCreationTimeCommand}"
- Header="{CompiledBinding Translation.Created.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding Sorting.SortOrder.Value,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=Created}"
- ToggleType="Radio" />
- <NativeMenuItem
- Command="{CompiledBinding Sorting.SortFilesByLastAccessTimeCommand}"
- Header="{CompiledBinding Translation.LastAccessTime.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding Sorting.SortOrder.Value,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=LastAccessTime}"
- ToggleType="Radio" />
- <NativeMenuItem
- Command="{CompiledBinding Sorting.SortFilesRandomlyCommand}"
- Header="{CompiledBinding Translation.Random.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding Sorting.SortOrder.Value,
- Converter={StaticResource EnumToBoolConverter},
- ConverterParameter=Random}"
- ToggleType="Radio" />
- </NativeMenu>
- </NativeMenuItem>
- <!-- Settings -->
- <NativeMenuItem Header="{CompiledBinding Translation.Settings.Value, Mode=OneWay}">
- <NativeMenu>
- <NativeMenuItem Command="{CompiledBinding ChangeBackgroundCommand}" Header="{CompiledBinding Translation.ChangeBackground.Value, Mode=OneWay}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem
- Command="{CompiledBinding ToggleLoopingCommand}"
- Header="{CompiledBinding Translation.IsLooping.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding GlobalSettings.IsLooping.Value}"
- ToggleType="CheckBox" />
- <NativeMenuItem
- Command="{CompiledBinding StretchCommand}"
- Header="{CompiledBinding Translation.Stretch.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding GlobalSettings.IsStretched.Value}"
- ToggleType="CheckBox" />
- <NativeMenuItem
- Command="{CompiledBinding ToggleScrollCommand}"
- Header="{CompiledBinding Translation.ToggleScroll.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding GlobalSettings.IsScrollingEnabled.Value}"
- ToggleType="CheckBox" />
- <NativeMenuItemSeparator />
- <NativeMenuItem
- Command="{CompiledBinding ChangeTopMostCommand}"
- Header="{CompiledBinding Translation.StayTopMost.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding GlobalSettings.IsTopMost.Value}"
- ToggleType="CheckBox" />
- <NativeMenuItemSeparator />
- <NativeMenuItem
- Command="{CompiledBinding ToggleSubdirectoriesCommand}"
- Header="{CompiledBinding Translation.SearchSubdirectory.Value,
- Mode=OneWay}"
- IsChecked="{CompiledBinding GlobalSettings.IsIncludingSubdirectories.Value}"
- ToggleType="CheckBox" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding Window.ShowKeybindingsWindow}" Header="{CompiledBinding Translation.ApplicationShortcuts.Value, Mode=OneWay}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding Window.ShowAboutWindow}" Header="{CompiledBinding Translation.About.Value, Mode=OneWay}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding Window.ShowSettingsWindow}" Header="{CompiledBinding Translation.ShowAllSettingsWindow.Value, Mode=OneWay}" />
- </NativeMenu>
- </NativeMenuItem>
- <!-- Window -->
- <NativeMenuItem Header="{CompiledBinding Translation.Window.Value, Mode=OneWay}">
- <NativeMenu>
- <NativeMenuItem Command="{CompiledBinding Window.NewWindow}" Header="{CompiledBinding Translation.NewWindow.Value, Mode=OneWay, Mode=OneWay}" />
- <NativeMenuItemSeparator />
- <NativeMenuItem Command="{CompiledBinding MainWindow.MaximizeCommand}" Header="{CompiledBinding Translation.Maximize.Value, Mode=OneWay}" />
- <NativeMenuItem Command="{CompiledBinding MainWindow.ToggleFullscreenCommand}" Header="{CompiledBinding Translation.Fullscreen.Value, Mode=OneWay}" />
- </NativeMenu>
- </NativeMenuItem>
- </NativeMenu>
- </NativeMenu.Menu>
- <DockPanel LastChildFill="True">
- <views1:MacOSTitlebar DockPanel.Dock="Top" x:Name="Titlebar" />
- <views:BottomBar DockPanel.Dock="Bottom" x:Name="BottomBar" />
- <views:MainView Background="Transparent" x:Name="MainView" />
- </DockPanel>
- </Window>
|