Преглед изворни кода

Refactor to use several view models, rename variables.

Ruben пре 7 месеци
родитељ
комит
1953b753aa
91 измењених фајлова са 1801 додато и 1788 уклоњено
  1. 1 1
      src/PicView.Avalonia.MacOS/Views/AboutWindow.axaml
  2. 1 1
      src/PicView.Avalonia.MacOS/Views/BatchResizeWindow.axaml
  3. 1 1
      src/PicView.Avalonia.MacOS/Views/EffectsWindow.axaml
  4. 8 8
      src/PicView.Avalonia.MacOS/Views/ExifWindow.axaml
  5. 1 1
      src/PicView.Avalonia.MacOS/Views/KeybindingsWindow.axaml
  6. 66 66
      src/PicView.Avalonia.MacOS/Views/MacMainWindow.axaml
  7. 6 6
      src/PicView.Avalonia.MacOS/Views/MacOSTitlebar.axaml
  8. 1 1
      src/PicView.Avalonia.MacOS/Views/SettingsWindow.axaml
  9. 1 1
      src/PicView.Avalonia.MacOS/Views/SingleImageResizeWindow.axaml
  10. 1 1
      src/PicView.Avalonia.Win32/Views/AboutWindow.axaml
  11. 1 1
      src/PicView.Avalonia.Win32/Views/BatchResizeResizeWindow.axaml
  12. 7 7
      src/PicView.Avalonia.Win32/Views/EffectsWindow.axaml
  13. 13 13
      src/PicView.Avalonia.Win32/Views/ExifWindow.axaml
  14. 2 2
      src/PicView.Avalonia.Win32/Views/KeybindingsWindow.axaml
  15. 2 2
      src/PicView.Avalonia.Win32/Views/SettingsWindow.axaml
  16. 1 1
      src/PicView.Avalonia.Win32/Views/SingleImageResizeWindow.axaml
  17. 6 6
      src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml
  18. 3 3
      src/PicView.Avalonia/Clipboard/ClipboardFileOperations.cs
  19. 4 4
      src/PicView.Avalonia/Clipboard/ClipboardImageOperations.cs
  20. 8 8
      src/PicView.Avalonia/Converters/ConversionHelper.cs
  21. 7 7
      src/PicView.Avalonia/Crop/CropDragHandler.cs
  22. 14 12
      src/PicView.Avalonia/Crop/CropFunctions.cs
  23. 4 4
      src/PicView.Avalonia/Crop/CropKeyboardManager.cs
  24. 26 26
      src/PicView.Avalonia/Crop/CropLayoutManager.cs
  25. 5 5
      src/PicView.Avalonia/Crop/CropResizeHandler.cs
  26. 2 2
      src/PicView.Avalonia/CustomControls/PicBox.cs
  27. 3 3
      src/PicView.Avalonia/FileSystem/FileManager.cs
  28. 6 6
      src/PicView.Avalonia/FileSystem/FileSaverHelper.cs
  29. 2 2
      src/PicView.Avalonia/Gallery/GalleryFunctions.cs
  30. 2 2
      src/PicView.Avalonia/ImageEffects/ImageEffectsHelper.cs
  31. 6 6
      src/PicView.Avalonia/ImageHandling/ImageFormatConverter.cs
  32. 2 2
      src/PicView.Avalonia/ImageHandling/ImageOptimizer.cs
  33. 5 5
      src/PicView.Avalonia/ImageTransformations/Rotation.cs
  34. 2 2
      src/PicView.Avalonia/Navigation/ErrorHandling.cs
  35. 64 66
      src/PicView.Avalonia/Navigation/ExifHandling.cs
  36. 3 3
      src/PicView.Avalonia/Navigation/FileListManager.cs
  37. 9 9
      src/PicView.Avalonia/Navigation/ImageIterator.cs
  38. 16 16
      src/PicView.Avalonia/Navigation/NavigationManager.cs
  39. 20 20
      src/PicView.Avalonia/Navigation/UpdateImage.cs
  40. 2 2
      src/PicView.Avalonia/Resizing/AspectRatioHelper.cs
  41. 11 11
      src/PicView.Avalonia/SettingsManagement/LanguageUpdater.cs
  42. 19 19
      src/PicView.Avalonia/SettingsManagement/SettingsUpdater.cs
  43. 7 7
      src/PicView.Avalonia/StartUp/QuickLoad.cs
  44. 2 2
      src/PicView.Avalonia/StartUp/StartUpHelper.cs
  45. 28 28
      src/PicView.Avalonia/UI/FunctionsMapper.cs
  46. 6 6
      src/PicView.Avalonia/UI/HideInterfaceLogic.cs
  47. 16 16
      src/PicView.Avalonia/UI/TitleManager.cs
  48. 294 0
      src/PicView.Avalonia/ViewModels/ExifViewModel.cs
  49. 4 14
      src/PicView.Avalonia/ViewModels/ImageCropperViewModel.cs
  50. 49 450
      src/PicView.Avalonia/ViewModels/MainViewModel.cs
  51. 119 0
      src/PicView.Avalonia/ViewModels/PicViewerModel.cs
  52. 45 32
      src/PicView.Avalonia/ViewModels/TranslationViewModel.cs
  53. 5 5
      src/PicView.Avalonia/Views/AboutView.axaml
  54. 11 11
      src/PicView.Avalonia/Views/AppearanceView.axaml
  55. 70 70
      src/PicView.Avalonia/Views/BatchResizeView.axaml
  56. 2 2
      src/PicView.Avalonia/Views/BatchResizeView.axaml.cs
  57. 23 23
      src/PicView.Avalonia/Views/BottomBar.axaml
  58. 17 17
      src/PicView.Avalonia/Views/EffectsView.axaml
  59. 17 17
      src/PicView.Avalonia/Views/EffectsView.axaml.cs
  60. 163 163
      src/PicView.Avalonia/Views/ExifView.axaml
  61. 16 16
      src/PicView.Avalonia/Views/ExifView.axaml.cs
  62. 20 20
      src/PicView.Avalonia/Views/GallerySettingsView.axaml
  63. 9 9
      src/PicView.Avalonia/Views/GalleryView.axaml
  64. 8 8
      src/PicView.Avalonia/Views/GeneralSettingsView.axaml
  65. 9 9
      src/PicView.Avalonia/Views/ImageSettingsView.axaml
  66. 8 8
      src/PicView.Avalonia/Views/ImageViewer.axaml
  67. 10 10
      src/PicView.Avalonia/Views/ImageViewer.axaml.cs
  68. 135 135
      src/PicView.Avalonia/Views/KeybindingsView.axaml
  69. 1 1
      src/PicView.Avalonia/Views/LanguageView.axaml
  70. 1 1
      src/PicView.Avalonia/Views/LanguageView.axaml.cs
  71. 119 119
      src/PicView.Avalonia/Views/MainView.axaml
  72. 7 7
      src/PicView.Avalonia/Views/MouseWheelView.axaml
  73. 7 7
      src/PicView.Avalonia/Views/NavigationView.axaml
  74. 13 13
      src/PicView.Avalonia/Views/SettingsView.axaml
  75. 12 12
      src/PicView.Avalonia/Views/SingleImageResizeView.axaml
  76. 17 17
      src/PicView.Avalonia/Views/SingleImageResizeView.axaml.cs
  77. 3 3
      src/PicView.Avalonia/Views/SlideshowSettingsView.axaml
  78. 3 3
      src/PicView.Avalonia/Views/StartUpMenu.axaml
  79. 1 1
      src/PicView.Avalonia/Views/UC/Buttons/AltClose.axaml
  80. 11 13
      src/PicView.Avalonia/Views/UC/CropControl.axaml
  81. 6 6
      src/PicView.Avalonia/Views/UC/EditableTitlebar.axaml.cs
  82. 18 18
      src/PicView.Avalonia/Views/UC/GalleryItem.axaml
  83. 34 34
      src/PicView.Avalonia/Views/UC/Menus/FileMenu.axaml
  84. 32 32
      src/PicView.Avalonia/Views/UC/Menus/ImageMenu.axaml
  85. 17 17
      src/PicView.Avalonia/Views/UC/Menus/SettingsMenu.axaml
  86. 14 14
      src/PicView.Avalonia/Views/UC/Menus/ToolsMenu.axaml
  87. 3 3
      src/PicView.Avalonia/Views/UC/PopUps/CloseDialog.axaml
  88. 2 2
      src/PicView.Avalonia/Views/UC/PopUps/DeleteDialog.axaml
  89. 6 6
      src/PicView.Avalonia/Views/ZoomSettingsView.axaml
  90. 3 3
      src/PicView.Avalonia/WindowBehavior/WindowFunctions.cs
  91. 14 14
      src/PicView.Avalonia/WindowBehavior/WindowResizing.cs

+ 1 - 1
src/PicView.Avalonia.MacOS/Views/AboutWindow.axaml

@@ -32,7 +32,7 @@
 
                 <TextBlock
                     Classes="txt"
-                    Text="{CompiledBinding About,
+                    Text="{CompiledBinding Translation.About,
                                            Mode=OneWay}"
                     TextAlignment="Center" />
             </DockPanel>

+ 1 - 1
src/PicView.Avalonia.MacOS/Views/BatchResizeWindow.axaml

@@ -32,7 +32,7 @@
 
                 <TextBlock
                     Classes="txt"
-                    Text="{CompiledBinding ResizeImage,
+                    Text="{CompiledBinding Translation.ResizeImage,
                                            Mode=OneWay}"
                     TextAlignment="Center" />
             </DockPanel>

+ 1 - 1
src/PicView.Avalonia.MacOS/Views/EffectsWindow.axaml

@@ -32,7 +32,7 @@
 
                 <TextBlock
                     Classes="txt"
-                    Text="{CompiledBinding Effects,
+                    Text="{CompiledBinding Translation.Effects,
                                            Mode=OneWay}"
                     TextAlignment="Center" />
             </DockPanel>

+ 8 - 8
src/PicView.Avalonia.MacOS/Views/ExifWindow.axaml

@@ -33,14 +33,14 @@
                 BorderThickness="1,0,1,0"
                 Classes="noBorderHover"
                 Command="{CompiledBinding DuplicateFileCommand}"
-                CommandParameter="{CompiledBinding FileInfo.FullName,
+                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
                 Height="28"
                 Width="135">
                 <TextBlock
                     Classes="txt"
                     HorizontalAlignment="Center"
-                    Text="{CompiledBinding DuplicateFile}"
+                    Text="{CompiledBinding Translation.DuplicateFile}"
                     VerticalAlignment="Center" />
             </Button>
 
@@ -54,7 +54,7 @@
                 <TextBlock
                     Classes="txt"
                     HorizontalAlignment="Center"
-                    Text="{Binding DeleteFile}"
+                    Text="{Binding Translation.DeleteFile}"
                     VerticalAlignment="Center" />
             </Button>
 
@@ -68,7 +68,7 @@
                 <TextBlock
                     Classes="txt"
                     HorizontalAlignment="Center"
-                    Text="{CompiledBinding OptimizeImage}"
+                    Text="{CompiledBinding Translation.OptimizeImage}"
                     VerticalAlignment="Center" />
             </Button>
 
@@ -77,14 +77,14 @@
                 BorderThickness="0,0,1,0"
                 Classes="noBorderHover"
                 Command="{CompiledBinding OpenWithCommand}"
-                CommandParameter="{CompiledBinding FileInfo.FullName,
+                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
                 Height="28"
                 Width="130">
                 <TextBlock
                     Classes="txt"
                     HorizontalAlignment="Center"
-                    Text="{Binding OpenWith}"
+                    Text="{Binding Translation.OpenWith}"
                     VerticalAlignment="Center" />
             </Button>
 
@@ -93,14 +93,14 @@
                 BorderThickness="0,0,1,0"
                 Classes="noBorderHover"
                 Command="{CompiledBinding LocateOnDiskCommand}"
-                CommandParameter="{CompiledBinding FileInfo.FullName,
+                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
                 Height="28"
                 Width="130">
                 <TextBlock
                     Classes="txt"
                     HorizontalAlignment="Center"
-                    Text="{CompiledBinding ShowInFolder}"
+                    Text="{CompiledBinding Translation.ShowInFolder}"
                     VerticalAlignment="Center" />
             </Button>
             <buttons:StarOutlineButtons Margin="10,0,0,0" />

+ 1 - 1
src/PicView.Avalonia.MacOS/Views/KeybindingsWindow.axaml

@@ -33,7 +33,7 @@
 
                 <TextBlock
                     Classes="txt"
-                    Text="{CompiledBinding ApplicationShortcuts}"
+                    Text="{CompiledBinding Translation.ApplicationShortcuts}"
                     TextAlignment="Center" />
             </DockPanel>
 

+ 66 - 66
src/PicView.Avalonia.MacOS/Views/MacMainWindow.axaml

@@ -22,124 +22,124 @@
     </Window.Resources>
     <NativeMenu.Menu>
         <NativeMenu>
-            <NativeMenuItem Header="{CompiledBinding File}">
+            <NativeMenuItem Header="{CompiledBinding Translation.File}">
                 <NativeMenu>
-                    <NativeMenuItem Command="{CompiledBinding OpenFileCommand}" Header="{CompiledBinding Open, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding OpenFileCommand}" Header="{CompiledBinding Translation.Open, Mode=OneWay}" />
                     <NativeMenuItem
                         Command="{CompiledBinding OpenWithCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding OpenWith,
+                        Header="{CompiledBinding Translation.OpenWith,
                                                  Mode=OneWay}" />
-                    <NativeMenuItem Command="{CompiledBinding SaveFileCommand}" Header="{CompiledBinding Save, Mode=OneWay}" />
-                    <NativeMenuItem Command="{CompiledBinding SaveFileAsCommand}" Header="{CompiledBinding SaveAs, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding SaveFileCommand}" Header="{CompiledBinding Translation.Save, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding SaveFileAsCommand}" Header="{CompiledBinding Translation.SaveAs, Mode=OneWay}" />
                     <NativeMenuItem
                         Command="{CompiledBinding PrintCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding Print,
+                        Header="{CompiledBinding Translation.Print,
                                                  Mode=OneWay}" />
                     <NativeMenuItem
                         Command="{CompiledBinding LocateOnDiskCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding ShowInFolder,
+                        Header="{CompiledBinding Translation.ShowInFolder,
                                                  Mode=OneWay}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding DeleteFileCommand}" Header="{CompiledBinding DeleteFile, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding DeleteFileCommand}" Header="{CompiledBinding Translation.DeleteFile, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding ReloadCommand}" Header="{CompiledBinding Reload, Mode=OneWay}" />
-                    <NativeMenuItem Command="{CompiledBinding NewWindowCommand}" Header="{CompiledBinding NewWindow, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding ReloadCommand}" Header="{CompiledBinding Translation.Reload, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding NewWindowCommand}" Header="{CompiledBinding Translation.NewWindow, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding RenameCommand}" Header="{CompiledBinding RenameFile, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding RenameCommand}" Header="{CompiledBinding Translation.RenameFile, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding PasteCommand}" Header="{CompiledBinding FilePaste, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding PasteCommand}" Header="{CompiledBinding Translation.Paste, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItem
                         Command="{CompiledBinding CopyFileCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding CopyFile,
+                        Header="{CompiledBinding Translation.CopyFile,
                                                  Mode=OneWay}" />
-                    <NativeMenuItem Command="{CompiledBinding CopyImageCommand}" Header="{CompiledBinding CopyImage, Mode=OneWay}" />
-                    <NativeMenuItem Command="{CompiledBinding CopyFilePathCommand}" Header="{CompiledBinding FileCopyPath, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding CopyImageCommand}" Header="{CompiledBinding Translation.CopyImage, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding CopyFilePathCommand}" Header="{CompiledBinding Translation.FileCopyPath, Mode=OneWay}" />
                     <NativeMenuItem
                         Command="{CompiledBinding DuplicateFileCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding DuplicateFile,
+                        Header="{CompiledBinding Translation.DuplicateFile,
                                                  Mode=OneWay}" />
-                    <NativeMenuItem Command="{CompiledBinding CutCommand}" Header="{CompiledBinding FileCut, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding CutCommand}" Header="{CompiledBinding Translation.FileCut, Mode=OneWay}" />
                 </NativeMenu>
             </NativeMenuItem>
 
-            <NativeMenuItem Header="{CompiledBinding ImageTxt, Mode=OneWay}">
+            <NativeMenuItem Header="{CompiledBinding Translation.Image, Mode=OneWay}">
                 <NativeMenu>
-                    <NativeMenuItem Command="{CompiledBinding RotateLeftCommand}" Header="{CompiledBinding RotateLeft, Mode=OneWay}" />
-                    <NativeMenuItem Command="{CompiledBinding RotateRightCommand}" Header="{CompiledBinding RotateRight, Mode=OneWay}" />
-                    <NativeMenuItem Command="{CompiledBinding FlipCommand}" Header="{CompiledBinding Flip, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding RotateLeftCommand}" Header="{CompiledBinding Translation.RotateLeft, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding RotateRightCommand}" Header="{CompiledBinding Translation.RotateRight, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding FlipCommand}" Header="{CompiledBinding Translation.Flip, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItem Command="{CompiledBinding CropCommand}" Header="{CompiledBinding Crop, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <!--  TODO Implement setting as wallpaper for macOS  -->
                     <NativeMenuItem
                         Command="{CompiledBinding SetAsWallpaperCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding SetAsWallpaper,
+                        Header="{CompiledBinding Translation.SetAsWallpaper,
                                                  Mode=OneWay}"
                         IsEnabled="False" />
                     <NativeMenuItem
                         Command="{CompiledBinding SetAsLockScreenCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding SetAsLockScreenImage,
+                        Header="{CompiledBinding Translation.SetAsLockScreenImage,
                                                  Mode=OneWay}"
                         IsEnabled="False" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding ShowExifWindowCommand}" Header="{CompiledBinding ImageInfo, Mode=OneWay}" />
-                    <NativeMenuItem Header="{CompiledBinding FileProperties}" />
+                    <NativeMenuItem Command="{CompiledBinding ShowExifWindowCommand}" Header="{CompiledBinding Translation.ImageInfo, Mode=OneWay}" />
+                    <NativeMenuItem Header="{CompiledBinding Translation.FileProperties}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding ShowSingleImageResizeWindowCommand}" Header="{CompiledBinding ResizeImage}" />
-                    <NativeMenuItem Command="{CompiledBinding ShowBatchResizeWindowCommand}" Header="{CompiledBinding BatchResize}" />
+                    <NativeMenuItem Command="{CompiledBinding ShowSingleImageResizeWindowCommand}" Header="{CompiledBinding Translation.ResizeImage}" />
+                    <NativeMenuItem Command="{CompiledBinding ShowBatchResizeWindowCommand}" Header="{CompiledBinding Translation.BatchResize}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding OptimizeImageCommand}" Header="{CompiledBinding OptimizeImage, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding OptimizeImageCommand}" Header="{CompiledBinding Translation.OptimizeImage, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Header="{CompiledBinding Effects}" />
+                    <NativeMenuItem Header="{CompiledBinding Translation.Effects}" />
                 </NativeMenu>
             </NativeMenuItem>
-            <NativeMenuItem Header="{CompiledBinding Navigation}">
+            <NativeMenuItem Header="{CompiledBinding Translation.Navigation}">
                 <NativeMenu>
-                    <NativeMenuItem Command="{CompiledBinding SlideshowCommand}" Header="{CompiledBinding Slideshow}" />
+                    <NativeMenuItem Command="{CompiledBinding SlideshowCommand}" Header="{CompiledBinding Translation.Slideshow}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding Skip10Command}" Header="{CompiledBinding AdvanceBy10Images}" />
-                    <NativeMenuItem Command="{CompiledBinding Skip100Command}" Header="{CompiledBinding AdvanceBy100Images}" />
-                    <NativeMenuItem Command="{CompiledBinding Prev10Command}" Header="{CompiledBinding GoBackBy10Images}" />
-                    <NativeMenuItem Command="{CompiledBinding Prev100Command}" Header="{CompiledBinding GoBackBy100Images}" />
+                    <NativeMenuItem Command="{CompiledBinding Skip10Command}" Header="{CompiledBinding Translation.AdvanceBy10Images}" />
+                    <NativeMenuItem Command="{CompiledBinding Skip100Command}" Header="{CompiledBinding Translation.AdvanceBy100Images}" />
+                    <NativeMenuItem Command="{CompiledBinding Prev10Command}" Header="{CompiledBinding Translation.GoBackBy10Images}" />
+                    <NativeMenuItem Command="{CompiledBinding Prev100Command}" Header="{CompiledBinding Translation.GoBackBy100Images}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding NextFolderCommand}" Header="{CompiledBinding NextFolder}" />
-                    <NativeMenuItem Command="{CompiledBinding PreviousFolderCommand}" Header="{CompiledBinding PrevFolder}" />
+                    <NativeMenuItem Command="{CompiledBinding NextFolderCommand}" Header="{CompiledBinding Translation.NextFolder}" />
+                    <NativeMenuItem Command="{CompiledBinding PreviousFolderCommand}" Header="{CompiledBinding Translation.PrevFolder}" />
                 </NativeMenu>
             </NativeMenuItem>
-            <NativeMenuItem Header="{CompiledBinding InterfaceConfiguration}">
+            <NativeMenuItem Header="{CompiledBinding Translation.InterfaceConfiguration}">
                 <NativeMenu>
-                    <NativeMenuItem Command="{CompiledBinding ToggleFullscreenCommand}" Header="{CompiledBinding ToggleFullscreen, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding ToggleFullscreenCommand}" Header="{CompiledBinding Translation.ToggleFullscreen, Mode=OneWay}" />
                     <NativeMenuItem
                         Command="{CompiledBinding ChangeAutoFitCommand}"
-                        Header="{CompiledBinding AutoFitWindow}"
+                        Header="{CompiledBinding Translation.AutoFitWindow}"
                         IsChecked="{CompiledBinding IsAutoFit}"
                         ToggleType="CheckBox" />
-                    <NativeMenuItem Command="{CompiledBinding ToggleUICommand}" Header="{CompiledBinding GetIsShowingUITranslation, Mode=OneWay}" />
-                    <NativeMenuItem Command="{CompiledBinding ToggleGalleryCommand}" Header="{CompiledBinding ShowImageGallery, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding ToggleUICommand}" Header="{CompiledBinding Translation.IsShowingUI, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding ToggleGalleryCommand}" Header="{CompiledBinding Translation.ShowImageGallery, Mode=OneWay}" />
 
                 </NativeMenu>
             </NativeMenuItem>
 
-            <NativeMenuItem Header="{CompiledBinding SortFilesBy, Mode=OneWay}">
+            <NativeMenuItem Header="{CompiledBinding Translation.SortFilesBy, Mode=OneWay}">
                 <NativeMenu>
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesByNameCommand}"
-                        Header="{CompiledBinding FileName,
+                        Header="{CompiledBinding Translation.FileName,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -147,7 +147,7 @@
                         ToggleType="Radio" />
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesBySizeCommand}"
-                        Header="{CompiledBinding FileSize,
+                        Header="{CompiledBinding Translation.FileSize,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -155,7 +155,7 @@
                         ToggleType="Radio" />
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesByExtensionCommand}"
-                        Header="{CompiledBinding FileExtension,
+                        Header="{CompiledBinding Translation.FileExtension,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -163,7 +163,7 @@
                         ToggleType="Radio" />
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesByCreationTimeCommand}"
-                        Header="{CompiledBinding Created,
+                        Header="{CompiledBinding Translation.Created,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -171,7 +171,7 @@
                         ToggleType="Radio" />
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesByLastAccessTimeCommand}"
-                        Header="{CompiledBinding LastAccessTime,
+                        Header="{CompiledBinding Translation.LastAccessTime,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -179,7 +179,7 @@
                         ToggleType="Radio" />
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesRandomlyCommand}"
-                        Header="{CompiledBinding Random,
+                        Header="{CompiledBinding Translation.Random,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -188,43 +188,43 @@
                 </NativeMenu>
             </NativeMenuItem>
 
-            <NativeMenuItem Header="{CompiledBinding Settings}">
+            <NativeMenuItem Header="{CompiledBinding Translation.Settings}">
                 <NativeMenu>
-                    <NativeMenuItem Command="{CompiledBinding ChangeBackgroundCommand}" Header="{CompiledBinding ChangeBackground, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding ChangeBackgroundCommand}" Header="{CompiledBinding Translation.ChangeBackground, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItem
                         Command="{CompiledBinding ToggleLoopingCommand}"
-                        Header="{CompiledBinding GetIsLoopingTranslation}"
+                        Header="{CompiledBinding Translation.IsLooping}"
                         IsChecked="{CompiledBinding IsLooping}"
                         ToggleType="CheckBox" />
                     <NativeMenuItem
                         Command="{CompiledBinding StretchCommand}"
-                        Header="{CompiledBinding Stretch}"
+                        Header="{CompiledBinding Translation.Stretch}"
                         IsChecked="{CompiledBinding IsStretched}"
                         ToggleType="CheckBox" />
                     <NativeMenuItem
                         Command="{CompiledBinding ToggleScrollCommand}"
-                        Header="{CompiledBinding ToggleScroll}"
+                        Header="{CompiledBinding Translation.ToggleScroll}"
                         IsChecked="{CompiledBinding IsScrollingEnabled}"
                         ToggleType="CheckBox" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItem
                         Command="{CompiledBinding ChangeTopMostCommand}"
-                        Header="{CompiledBinding StayTopMost}"
+                        Header="{CompiledBinding Translation.StayTopMost}"
                         IsChecked="{CompiledBinding IsTopMost}"
                         ToggleType="CheckBox" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItem
                         Command="{CompiledBinding ToggleSubdirectoriesCommand}"
-                        Header="{CompiledBinding SearchSubdirectory}"
+                        Header="{CompiledBinding Translation.SearchSubdirectory}"
                         IsChecked="{CompiledBinding IsIncludingSubdirectories}"
                         ToggleType="CheckBox" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding ShowKeybindingsWindowCommand}" Header="{CompiledBinding ApplicationShortcuts}" />
+                    <NativeMenuItem Command="{CompiledBinding ShowKeybindingsWindowCommand}" Header="{CompiledBinding Translation.ApplicationShortcuts}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding ShowAboutWindowCommand}" Header="{CompiledBinding About}" />
+                    <NativeMenuItem Command="{CompiledBinding ShowAboutWindowCommand}" Header="{CompiledBinding Translation.About}" />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding ShowSettingsWindowCommand}" Header="{CompiledBinding ShowAllSettingsWindow}" />
+                    <NativeMenuItem Command="{CompiledBinding ShowSettingsWindowCommand}" Header="{CompiledBinding Translation.ShowAllSettingsWindow}" />
                 </NativeMenu>
             </NativeMenuItem>
 

+ 6 - 6
src/PicView.Avalonia.MacOS/Views/MacOSTitlebar.axaml

@@ -31,16 +31,16 @@
             Foreground="{DynamicResource MainTextColor}"
             IconHeight="12"
             IconWidth="12"
-            IsEnabled="{CompiledBinding FileInfo,
+            IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                         Converter={x:Static ObjectConverters.IsNotNull}}"
             IsTabStop="False"
             Margin="0"
-            ToolTip.Tip="{CompiledBinding GetIsFlippedTranslation,
+            ToolTip.Tip="{CompiledBinding Translation.IsFlipped,
                                           Mode=OneWay}"
             Width="30"
             x:Name="FlipButton">
             <Button.RenderTransform>
-                <ScaleTransform ScaleX="{CompiledBinding ScaleX}" />
+                <ScaleTransform ScaleX="{CompiledBinding PicViewer.ScaleX}" />
             </Button.RenderTransform>
         </customControls:IconButton>
 
@@ -55,11 +55,11 @@
             Icon="{StaticResource RefreshCcwDot}"
             IconHeight="13"
             IconWidth="13"
-            IsEnabled="{CompiledBinding FileInfo,
+            IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                         Converter={x:Static ObjectConverters.IsNotNull}}"
             IsTabStop="False"
             Margin="0"
-            ToolTip.Tip="{CompiledBinding RotateRight}"
+            ToolTip.Tip="{CompiledBinding Translation.RotateRight}"
             Width="30"
             x:Name="RotateRightButton" />
 
@@ -74,7 +74,7 @@
             Foreground="{DynamicResource MainTextColor}"
             IconHeight="17"
             IconWidth="17"
-            IsEnabled="{CompiledBinding FileInfo,
+            IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                         Converter={x:Static ObjectConverters.IsNotNull}}"
             IsTabStop="False"
             Name="GalleryButton"

+ 1 - 1
src/PicView.Avalonia.MacOS/Views/SettingsWindow.axaml

@@ -30,7 +30,7 @@
                 Classes="txt"
                 Height="28"
                 LineHeight="28"
-                Text="{CompiledBinding Settings,
+                Text="{CompiledBinding Translation.Settings,
                                        Mode=OneWay}"
                 TextAlignment="Center"
                 x:Name="TitleText" />

+ 1 - 1
src/PicView.Avalonia.MacOS/Views/SingleImageResizeWindow.axaml

@@ -32,7 +32,7 @@
 
                 <TextBlock
                     Classes="txt"
-                    Text="{CompiledBinding ResizeImage,
+                    Text="{CompiledBinding Translation.ResizeImage,
                                            Mode=OneWay}"
                     TextAlignment="Center" />
             </DockPanel>

+ 1 - 1
src/PicView.Avalonia.Win32/Views/AboutWindow.axaml

@@ -69,7 +69,7 @@
                     Height="28"
                     LineHeight="28"
                     Padding="30,0,0,0"
-                    Text="{CompiledBinding About}"
+                    Text="{CompiledBinding Translation.About}"
                     TextAlignment="Center"
                     x:Name="TitleText" />
             </DockPanel>

+ 1 - 1
src/PicView.Avalonia.Win32/Views/BatchResizeResizeWindow.axaml

@@ -69,7 +69,7 @@
                     Height="28"
                     LineHeight="28"
                     Padding="30,0,0,0"
-                    Text="{CompiledBinding BatchResize,
+                    Text="{CompiledBinding Translation.BatchResize,
                                            Mode=OneWay}"
                     TextAlignment="Center"
                     x:Name="TitleText" />

+ 7 - 7
src/PicView.Avalonia.Win32/Views/EffectsWindow.axaml

@@ -79,7 +79,7 @@
                     Width="30">
                     <customControls:IconButton.Flyout>
                         <MenuFlyout FlyoutPresenterClasses="noCornerRadius" Placement="Bottom">
-                            <MenuItem Command="{CompiledBinding SaveFileCommand}" Header="{CompiledBinding Save, Mode=OneWay}">
+                            <MenuItem Command="{CompiledBinding SaveFileCommand}" Header="{CompiledBinding Translation.Save, Mode=OneWay}">
                                 <MenuItem.Icon>
                                     <Path
                                         Data="{StaticResource SaveGeometry}"
@@ -89,7 +89,7 @@
                                         Width="12" />
                                 </MenuItem.Icon>
                             </MenuItem>
-                            <MenuItem Command="{CompiledBinding SaveFileAsCommand}" Header="{CompiledBinding SaveAs}">
+                            <MenuItem Command="{CompiledBinding SaveFileAsCommand}" Header="{CompiledBinding Translation.SaveAs}">
                                 <MenuItem.Icon>
                                     <Path
                                         Data="{StaticResource SaveGeometry}"
@@ -99,7 +99,7 @@
                                         Width="12" />
                                 </MenuItem.Icon>
                             </MenuItem>
-                            <MenuItem Command="{CompiledBinding CopyImageCommand}" Header="{CompiledBinding CopyImage, Mode=OneWay}">
+                            <MenuItem Command="{CompiledBinding CopyImageCommand}" Header="{CompiledBinding Translation.CopyImage, Mode=OneWay}">
                                 <MenuItem.Icon>
                                     <Path
                                         Data="{StaticResource CopyGeometry}"
@@ -112,9 +112,9 @@
                             <Separator />
                             <MenuItem
                                 Command="{CompiledBinding SetAsWallpaperFilledCommand}"
-                                CommandParameter="{CompiledBinding FileInfo.FullName,
+                                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                                    FallbackValue=''}"
-                                Header="{CompiledBinding SetAsWallpaper,
+                                Header="{CompiledBinding Translation.SetAsWallpaper,
                                                          Mode=OneWay}">
                                 <MenuItem.Icon>
                                     <Path
@@ -126,7 +126,7 @@
                                 </MenuItem.Icon>
                             </MenuItem>
                             <Separator />
-                            <MenuItem Header="{CompiledBinding ClearEffects}" x:Name="ClearEffectsItem">
+                            <MenuItem Header="{CompiledBinding Translation.ClearEffects}" x:Name="ClearEffectsItem">
                                 <MenuItem.Icon>
                                     <Image
                                         Height="12"
@@ -144,7 +144,7 @@
                     Height="28"
                     LineHeight="28"
                     Padding="30,0,0,0"
-                    Text="{CompiledBinding Effects}"
+                    Text="{CompiledBinding Translation.Effects}"
                     TextAlignment="Center"
                     x:Name="TitleText" />
             </DockPanel>

+ 13 - 13
src/PicView.Avalonia.Win32/Views/ExifWindow.axaml

@@ -78,7 +78,7 @@
                     BorderThickness="0,0,1,0"
                     Classes="noBorderHover"
                     Command="{CompiledBinding SetExifRating0Command}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
                     DockPanel.Dock="Right"
                     Foreground="{DynamicResource MainTextColor}"
@@ -100,7 +100,7 @@
                     Height="28"
                     IconHeight="17"
                     IconWidth="17"
-                    ToolTip.Tip="{CompiledBinding DeleteFile,
+                    ToolTip.Tip="{CompiledBinding Translation.DeleteFile,
                                                   Mode=OneWay}"
                     Width="45"
                     x:Name="RecycleButton" />
@@ -116,7 +116,7 @@
                     Icon="{StaticResource PortalImage}"
                     IconHeight="17"
                     IconWidth="17"
-                    ToolTip.Tip="{CompiledBinding OptimizeImage,
+                    ToolTip.Tip="{CompiledBinding Translation.OptimizeImage,
                                                   Mode=OneWay}"
                     Width="45"
                     x:Name="OptimizeButton" />
@@ -126,7 +126,7 @@
                     BorderThickness="0,0,1,0"
                     Classes="noBorderHover"
                     Command="{CompiledBinding OpenWithCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
                     Data="{StaticResource OpenWithGeometry}"
                     DockPanel.Dock="Right"
@@ -134,7 +134,7 @@
                     Height="28"
                     IconHeight="17"
                     IconWidth="17"
-                    ToolTip.Tip="{CompiledBinding OpenWith,
+                    ToolTip.Tip="{CompiledBinding Translation.OpenWith,
                                                   Mode=OneWay}"
                     Width="45"
                     x:Name="OpenWithButton" />
@@ -144,7 +144,7 @@
                     BorderThickness="0,0,1,0"
                     Classes="noBorderHover"
                     Command="{CompiledBinding PrintCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
                     Data="{StaticResource PrintGeometry}"
                     DockPanel.Dock="Right"
@@ -152,7 +152,7 @@
                     Height="28"
                     IconHeight="17"
                     IconWidth="17"
-                    ToolTip.Tip="{CompiledBinding Print,
+                    ToolTip.Tip="{CompiledBinding Translation.Print,
                                                   Mode=OneWay}"
                     Width="45"
                     x:Name="PrintButton" />
@@ -167,7 +167,7 @@
                     Icon="{StaticResource CopyImages}"
                     IconHeight="17"
                     IconWidth="17"
-                    ToolTip.Tip="{CompiledBinding CopyImage,
+                    ToolTip.Tip="{CompiledBinding Translation.CopyImage,
                                                   Mode=OneWay}"
                     Width="45"
                     x:Name="CopyButton" />
@@ -183,7 +183,7 @@
                     Height="28"
                     IconHeight="17"
                     IconWidth="17"
-                    ToolTip.Tip="{CompiledBinding CopyFile,
+                    ToolTip.Tip="{CompiledBinding Translation.CopyFile,
                                                   Mode=OneWay}"
                     Width="45"
                     x:Name="CopyFileButton" />
@@ -199,7 +199,7 @@
                     Height="28"
                     IconHeight="17"
                     IconWidth="17"
-                    ToolTip.Tip="{CompiledBinding DuplicateFile,
+                    ToolTip.Tip="{CompiledBinding Translation.DuplicateFile,
                                                   Mode=OneWay}"
                     Width="45"
                     x:Name="DuplicateButton" />
@@ -209,7 +209,7 @@
                     BorderThickness="1,0,1,0"
                     Classes="noBorderHover"
                     Command="{CompiledBinding LocateOnDiskCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
                     Data="{StaticResource ShowInFolderGeometry}"
                     DockPanel.Dock="Right"
@@ -217,7 +217,7 @@
                     Height="28"
                     IconHeight="17"
                     IconWidth="17"
-                    ToolTip.Tip="{CompiledBinding ShowInFolder,
+                    ToolTip.Tip="{CompiledBinding Translation.ShowInFolder,
                                                   Mode=OneWay}"
                     Width="45"
                     x:Name="LocateOnDiskButton" />
@@ -227,7 +227,7 @@
                     Classes="txt"
                     DockPanel.Dock="Left"
                     Foreground="{DynamicResource MainTextColor}"
-                    Text="{CompiledBinding ImageInfo}"
+                    Text="{CompiledBinding Translation.ImageInfo}"
                     TextAlignment="Center" />
             </DockPanel>
             <Rectangle

+ 2 - 2
src/PicView.Avalonia.Win32/Views/KeybindingsWindow.axaml

@@ -44,7 +44,7 @@
                     Foreground="{DynamicResource MainTextColor}"
                     IconHeight="10"
                     IconWidth="10"
-                    ToolTip.Tip="{CompiledBinding Close,
+                    ToolTip.Tip="{CompiledBinding Translation.Close,
                                                   Mode=OneWay}"
                     Width="30"
                     x:Name="CloseButton" />
@@ -70,7 +70,7 @@
                     Foreground="{DynamicResource MainTextColor}"
                     LineHeight="28"
                     Padding="30,0,0,0"
-                    Text="{CompiledBinding ApplicationShortcuts}"
+                    Text="{CompiledBinding Translation.ApplicationShortcuts}"
                     TextAlignment="Center"
                     x:Name="TitleText" />
             </DockPanel>

+ 2 - 2
src/PicView.Avalonia.Win32/Views/SettingsWindow.axaml

@@ -49,7 +49,7 @@
                     Foreground="{DynamicResource MainTextColor}"
                     IconHeight="10"
                     IconWidth="10"
-                    ToolTip.Tip="{CompiledBinding Close,
+                    ToolTip.Tip="{CompiledBinding Translation.Close,
                                                   Mode=OneWay}"
                     Width="30"
                     x:Name="CloseButton" />
@@ -75,7 +75,7 @@
                     Foreground="{DynamicResource MainTextColor}"
                     LineHeight="28"
                     Padding="30,0,0,0"
-                    Text="{CompiledBinding Settings,
+                    Text="{CompiledBinding Translation.Settings,
                                            Mode=OneWay}"
                     TextAlignment="Center"
                     x:Name="TitleText" />

+ 1 - 1
src/PicView.Avalonia.Win32/Views/SingleImageResizeWindow.axaml

@@ -70,7 +70,7 @@
                     Height="28"
                     LineHeight="28"
                     Padding="30,0,0,0"
-                    Text="{CompiledBinding ResizeImage,
+                    Text="{CompiledBinding Translation.ResizeImage,
                                            Mode=OneWay}"
                     TextAlignment="Center"
                     x:Name="TitleText" />

+ 6 - 6
src/PicView.Avalonia.Win32/Views/WinTitleBar.axaml

@@ -45,7 +45,7 @@
                 Foreground="{DynamicResource MainTextColor}"
                 IconHeight="17"
                 IconWidth="17"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 Width="30"
                 x:Name="GalleryButton" />
@@ -59,11 +59,11 @@
                 Icon="{StaticResource RefreshCcwDot}"
                 IconHeight="16"
                 IconWidth="16"
-                IsEnabled="{CompiledBinding ImageSource,
+                IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 Margin="0"
                 Name="RotateRightButton"
-                ToolTip.Tip="{CompiledBinding RotateRight,
+                ToolTip.Tip="{CompiledBinding Translation.RotateRight,
                                               Mode=OneWay}"
                 Width="30"
                 x:Name="RotateLeftButton" />
@@ -79,15 +79,15 @@
                 Foreground="{DynamicResource MainTextColor}"
                 IconHeight="16"
                 IconWidth="16"
-                IsEnabled="{CompiledBinding ImageSource,
+                IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 Margin="0"
-                ToolTip.Tip="{CompiledBinding GetIsFlippedTranslation,
+                ToolTip.Tip="{CompiledBinding Translation.IsFlipped,
                                               Mode=OneWay}"
                 Width="30"
                 x:Name="FlipButton">
                 <Button.RenderTransform>
-                    <ScaleTransform ScaleX="{CompiledBinding ScaleX}" />
+                    <ScaleTransform ScaleX="{CompiledBinding PicViewer.ScaleX}" />
                 </Button.RenderTransform>
             </customControls:IconButton>
 

+ 3 - 3
src/PicView.Avalonia/Clipboard/ClipboardFileOperations.cs

@@ -33,7 +33,7 @@ public static class ClipboardFileOperations
         {
             vm.IsLoading = true;
             
-            if (path == vm.FileInfo?.FullName)
+            if (path == vm.PicViewer.FileInfo?.FullName)
             {
                 await DuplicateCurrentFile(vm);
             }
@@ -66,8 +66,8 @@ public static class ClipboardFileOperations
             return;
         }
 
-        var oldPath = vm.FileInfo.FullName;
-        var duplicatedPath = await FileHelper.DuplicateAndReturnFileNameAsync(oldPath, vm.FileInfo);
+        var oldPath = vm.PicViewer.FileInfo.FullName;
+        var duplicatedPath = await FileHelper.DuplicateAndReturnFileNameAsync(oldPath, vm.PicViewer.FileInfo);
 
         if (string.IsNullOrWhiteSpace(duplicatedPath) || !File.Exists(duplicatedPath))
         {

+ 4 - 4
src/PicView.Avalonia/Clipboard/ClipboardImageOperations.cs

@@ -23,7 +23,7 @@ public static class ClipboardImageOperations
     public static async Task<bool> CopyImageToClipboard(MainViewModel vm)
     {
         var clipboard = ClipboardService.GetClipboard();
-        if (clipboard == null || vm.ImageSource is not Bitmap bitmap)
+        if (clipboard == null || vm.PicViewer.ImageSource is not Bitmap bitmap)
         {
             return false;
         }
@@ -97,12 +97,12 @@ public static class ClipboardImageOperations
             return Convert.ToBase64String(await File.ReadAllBytesAsync(path));
         }
 
-        switch (vm.ImageType)
+        switch (vm.PicViewer.ImageType)
         {
             case ImageType.AnimatedGif:
             case ImageType.AnimatedWebp:
             case ImageType.Bitmap:
-                if (vm.ImageSource is not Bitmap bitmap)
+                if (vm.PicViewer.ImageSource is not Bitmap bitmap)
                 {
                     return string.Empty;
                 }
@@ -117,7 +117,7 @@ public static class ClipboardImageOperations
                 return string.Empty;
 
             default:
-                throw new ArgumentOutOfRangeException(nameof(vm.ImageType), $"Unsupported image type: {vm.ImageType}");
+                throw new ArgumentOutOfRangeException(nameof(vm.PicViewer.ImageType), $"Unsupported image type: {vm.PicViewer.ImageType}");
         }
     }
 

+ 8 - 8
src/PicView.Avalonia/Converters/ConversionHelper.cs

@@ -25,7 +25,7 @@ internal static class ConversionHelper
     public static async Task ResizeImageByPercentage(int percentage, MainViewModel vm)
     {
         TitleManager.SetLoadingTitle(vm);
-        var success = await ResizeImageByPercentage(vm.FileInfo, percentage);
+        var success = await ResizeImageByPercentage(vm.PicViewer.FileInfo, percentage);
         if (success)
         {
             await NavigationManager.QuickReload();
@@ -89,12 +89,12 @@ internal static class ConversionHelper
     
     public static async Task ConvertFileExtension(int index, MainViewModel vm)
     {
-        if (vm.FileInfo is null)
+        if (vm.PicViewer.FileInfo is null)
         {
             return;
         }
 
-        var newPath = await ConvertTask(vm.FileInfo, index);
+        var newPath = await ConvertTask(vm.PicViewer.FileInfo, index);
         if (!string.IsNullOrWhiteSpace(newPath))
         {
             await NavigationManager.LoadPicFromStringAsync(newPath, vm);
@@ -103,16 +103,16 @@ internal static class ConversionHelper
     
     public static void DetermineIfOptimizeImageShouldBeEnabled(MainViewModel vm)
     {
-        if (vm.FileInfo is null)
+        if (vm.PicViewer.FileInfo is null)
         {
             vm.ShouldOptimizeImageBeEnabled = false;
             return;
         }
 
-        if (vm.FileInfo.Extension.Equals(".jpg", StringComparison.InvariantCultureIgnoreCase)
-            || vm.FileInfo.Extension.Equals(".jpeg", StringComparison.InvariantCultureIgnoreCase)
-            || vm.FileInfo.Extension.Equals(".png", StringComparison.InvariantCultureIgnoreCase)
-            || vm.FileInfo.Extension.Equals(".gif", StringComparison.InvariantCultureIgnoreCase))
+        if (vm.PicViewer.FileInfo.Extension.Equals(".jpg", StringComparison.InvariantCultureIgnoreCase)
+            || vm.PicViewer.FileInfo.Extension.Equals(".jpeg", StringComparison.InvariantCultureIgnoreCase)
+            || vm.PicViewer.FileInfo.Extension.Equals(".png", StringComparison.InvariantCultureIgnoreCase)
+            || vm.PicViewer.FileInfo.Extension.Equals(".gif", StringComparison.InvariantCultureIgnoreCase))
         {
             vm.ShouldOptimizeImageBeEnabled = true;
         }

+ 7 - 7
src/PicView.Avalonia/Crop/CropDragHandler.cs

@@ -17,7 +17,7 @@ public class CropDragHandler(CropControl control)
     public void OnDragStart(object? sender, PointerPressedEventArgs e)
     {
         if (!e.GetCurrentPoint(control).Properties.IsLeftButtonPressed || 
-            control.DataContext is not ImageCropperViewModel vm)
+            control.DataContext is not MainViewModel vm)
         {
             return;
         }
@@ -39,7 +39,7 @@ public class CropDragHandler(CropControl control)
             currentTop = 0;
         }
 
-        _originalRect = new Rect(currentLeft, currentTop, vm.SelectionWidth, vm.SelectionHeight);
+        _originalRect = new Rect(currentLeft, currentTop, vm.Crop.SelectionWidth, vm.Crop.SelectionHeight);
         _isDragging = true;
     }
 
@@ -50,7 +50,7 @@ public class CropDragHandler(CropControl control)
             return;
         }
 
-        if (control.DataContext is not ImageCropperViewModel vm)
+        if (control.DataContext is not MainViewModel vm)
         {
             return;
         }
@@ -68,8 +68,8 @@ public class CropDragHandler(CropControl control)
         var newTop = _originalRect.Y + delta.Y;
 
         // Clamp the newLeft and newTop values to keep the rectangle within bounds
-        newLeft = Math.Max(0, Math.Min(vm.ImageWidth - vm.SelectionWidth, newLeft));
-        newTop = Math.Max(0, Math.Min(vm.ImageHeight - vm.SelectionHeight, newTop));
+        newLeft = Math.Max(0, Math.Min(vm.PicViewer.ImageWidth - vm.Crop.SelectionWidth, newLeft));
+        newTop = Math.Max(0, Math.Min(vm.PicViewer.ImageHeight - vm.Crop.SelectionHeight, newTop));
 
         // Only proceed if new positions are valid (i.e., not NaN)
         if (double.IsNaN(newLeft) || double.IsNaN(newTop))
@@ -85,8 +85,8 @@ public class CropDragHandler(CropControl control)
         Canvas.SetTop(control.SizeBorder, newTop - control.SizeBorder.Bounds.Height - ButtonTopOffset);
 
         // Update view model values
-        vm.SelectionX = Convert.ToInt32(newLeft);
-        vm.SelectionY = Convert.ToInt32(newTop);
+        vm.Crop.SelectionX = Convert.ToInt32(newLeft);
+        vm.Crop.SelectionY = Convert.ToInt32(newTop);
     }
 
     public void OnDragEnd(object? sender, PointerReleasedEventArgs e)

+ 14 - 12
src/PicView.Avalonia/Crop/CropFunctions.cs

@@ -30,7 +30,7 @@ public static class CropFunctions
         {
             return;
         }
-        if (vm?.ImageSource is not Bitmap bitmap)
+        if (vm?.PicViewer.ImageSource is not Bitmap bitmap)
         {
             return;
         }
@@ -43,16 +43,16 @@ public static class CropFunctions
             WindowResizing.SetSize(vm);
             Settings.Gallery.IsBottomGalleryShown = true;
         }
-        var size = new Size(vm.ImageWidth, vm.ImageHeight);
-        var cropperViewModel = new ImageCropperViewModel(bitmap)
+        var size = new Size(vm.PicViewer.ImageWidth, vm.PicViewer.ImageHeight);
+        vm.Crop = new ImageCropperViewModel(bitmap)
         {
             ImageWidth = size.Width,
             ImageHeight = size.Height,
-            AspectRatio = vm.AspectRatio
+            AspectRatio = vm.PicViewer.AspectRatio
         };
         var cropControl = new CropControl
         {
-            DataContext = cropperViewModel,
+            DataContext = vm,
             Width = size.Width,
             Height = size.Height,
             Margin = new Thickness(0)
@@ -79,17 +79,19 @@ public static class CropFunctions
         TitleManager.SetTitle(vm);
         
         // Reset image type to fix issue with animated images
-        switch (vm.ImageType)
+        switch (vm.PicViewer.ImageType)
         {
             case ImageType.AnimatedWebp:
-                vm.ImageType = ImageType.Bitmap;
-                vm.ImageType = ImageType.AnimatedWebp;
+                vm.PicViewer.ImageType = ImageType.Bitmap;
+                vm.PicViewer.ImageType = ImageType.AnimatedWebp;
                 break;
             case ImageType.AnimatedGif:
-                vm.ImageType = ImageType.Bitmap;
-                vm.ImageType = ImageType.AnimatedGif;
+                vm.PicViewer.ImageType = ImageType.Bitmap;
+                vm.PicViewer.ImageType = ImageType.AnimatedGif;
                 break;
         }
+
+        vm.Crop = null;
     }
 
     public static bool DetermineIfShouldBeEnabled(MainViewModel vm)
@@ -98,7 +100,7 @@ public static class CropFunctions
         {
             return false;
         }
-        if (vm?.ImageSource is not Bitmap)
+        if (vm?.PicViewer.ImageSource is not Bitmap)
         {
             vm.ShouldCropBeEnabled = false;
             return false;
@@ -120,7 +122,7 @@ public static class CropFunctions
             return false;
         }
 
-        if (vm.RotationAngle is 0 && vm.ScaleX is 1)
+        if (vm.RotationAngle is 0 && vm.PicViewer.ScaleX is 1)
         {
             vm.ShouldCropBeEnabled = true;
             return true;

+ 4 - 4
src/PicView.Avalonia/Crop/CropKeyboardManager.cs

@@ -12,7 +12,7 @@ public class CropKeyboardManager(CropControl control)
 {
     public async Task KeyDownHandler(KeyEventArgs e)
     {
-        if (control.DataContext is not ImageCropperViewModel vm)
+        if (control.DataContext is not MainViewModel vm)
         {
             return;
         }
@@ -20,7 +20,7 @@ public class CropKeyboardManager(CropControl control)
         switch (e.Key)
         {
             case Key.Enter:
-                await vm.CropImageCommand.Execute();
+                await vm.Crop.CropImageCommand.Execute();
                 return;
             case Key.Escape:
                 CropFunctions.CloseCropControl(UIHelper.GetMainView.DataContext as MainViewModel);
@@ -85,11 +85,11 @@ public class CropKeyboardManager(CropControl control)
                 case "Save":
                 case "SaveAs":
                 case "GalleryClick":
-                    await vm.CropImageCommand.Execute();
+                    await vm.Crop.CropImageCommand.Execute();
                     return;
                 case "CopyImage":
                 case "CopyFile":
-                    await vm.CopyCropImageCommand.Execute();
+                    await vm.Crop.CopyCropImageCommand.Execute();
                     return;
             }
         }

+ 26 - 26
src/PicView.Avalonia/Crop/CropLayoutManager.cs

@@ -10,39 +10,39 @@ public class CropLayoutManager(CropControl control)
     
     public void InitializeLayout()
     {
-        if (control.DataContext is not ImageCropperViewModel vm)
+        if (control.DataContext is not MainViewModel vm)
         {
             return;
         }
 
         // Ensure image dimensions are valid before proceeding
-        if (vm.ImageWidth <= 0 || vm.ImageHeight <= 0)
+        if (vm.PicViewer.ImageWidth <= 0 || vm.PicViewer.ImageHeight <= 0)
         {
             return;
         }
 
         // Set initial width and height for the crop rectangle
-        var pixelWidth = vm.ImageWidth / vm.AspectRatio;
-        var pixelHeight = vm.ImageHeight / vm.AspectRatio;
+        var pixelWidth = vm.PicViewer.ImageWidth / vm.PicViewer.AspectRatio;
+        var pixelHeight = vm.PicViewer.ImageHeight / vm.PicViewer.AspectRatio;
 
         if (pixelWidth >= DefaultSelectionSize * 2 || pixelHeight >= DefaultSelectionSize * 2)
         {
-            vm.SelectionWidth = DefaultSelectionSize;
-            vm.SelectionHeight = DefaultSelectionSize;
+            vm.Crop.SelectionWidth = DefaultSelectionSize;
+            vm.Crop.SelectionHeight = DefaultSelectionSize;
         }
         else if (pixelWidth <= DefaultSelectionSize || pixelHeight <= DefaultSelectionSize)
         {
-            vm.SelectionWidth = pixelWidth / 2;
-            vm.SelectionHeight = pixelHeight / 2;
+            vm.Crop.SelectionWidth = pixelWidth / 2;
+            vm.Crop.SelectionHeight = pixelHeight / 2;
         }
 
         // Calculate centered position
-        vm.SelectionX = Convert.ToInt32((vm.ImageWidth - vm.SelectionWidth) / 2);
-        vm.SelectionY = Convert.ToInt32((vm.ImageHeight - vm.SelectionHeight) / 2);
+        vm.Crop.SelectionX = Convert.ToInt32((vm.PicViewer.ImageWidth - vm.Crop.SelectionWidth) / 2);
+        vm.Crop.SelectionY = Convert.ToInt32((vm.PicViewer.ImageHeight - vm.Crop.SelectionHeight) / 2);
 
         // Apply the calculated position to the MainRectangle
-        Canvas.SetLeft(control.MainRectangle, vm.SelectionX);
-        Canvas.SetTop(control.MainRectangle, vm.SelectionY);
+        Canvas.SetLeft(control.MainRectangle, vm.Crop.SelectionX);
+        Canvas.SetTop(control.MainRectangle, vm.Crop.SelectionY);
 
         UpdateLayout();
     }
@@ -62,7 +62,7 @@ public class CropLayoutManager(CropControl control)
 
     private void UpdateSurroundingRectangles()
     {
-        if (control.DataContext is not ImageCropperViewModel vm)
+        if (control.DataContext is not MainViewModel vm)
         {
             return;
         }
@@ -70,46 +70,46 @@ public class CropLayoutManager(CropControl control)
         // Converting to int fixes black border
         var left = Convert.ToInt32(Canvas.GetLeft(control.MainRectangle));
         var top = Convert.ToInt32(Canvas.GetTop(control.MainRectangle));
-        var right = Convert.ToInt32(left + vm.SelectionWidth);
-        var bottom = Convert.ToInt32(top + vm.SelectionHeight);
+        var right = Convert.ToInt32(left + vm.Crop.SelectionWidth);
+        var bottom = Convert.ToInt32(top + vm.Crop.SelectionHeight);
 
         // Calculate the positions and sizes for the surrounding rectangles
         // Top Rectangle (above MainRectangle)
-        control.TopRectangle.Width = vm.ImageWidth;
+        control.TopRectangle.Width = vm.PicViewer.ImageWidth;
         control.TopRectangle.Height = top < 0 ? 0 : top;
         Canvas.SetTop(control.TopRectangle, 0);
 
         // Bottom Rectangle (below MainRectangle)
-        control.BottomRectangle.Width = vm.ImageWidth;
-        var newBottomRectangleHeight = vm.ImageHeight - bottom < 0 ? 0 : vm.ImageHeight - bottom;
+        control.BottomRectangle.Width = vm.PicViewer.ImageWidth;
+        var newBottomRectangleHeight = vm.PicViewer.ImageHeight - bottom < 0 ? 0 : vm.PicViewer.ImageHeight - bottom;
         control.BottomRectangle.Height = newBottomRectangleHeight;
         Canvas.SetTop(control.BottomRectangle, bottom);
 
         // Left Rectangle (left of MainRectangle)
         control.LeftRectangle.Width = left < 0 ? 0 : left;
-        control.LeftRectangle.Height = vm.SelectionHeight;
+        control.LeftRectangle.Height = vm.Crop.SelectionHeight;
         Canvas.SetLeft(control.LeftRectangle, 0);
         Canvas.SetTop(control.LeftRectangle, top);
 
         // Right Rectangle (right of MainRectangle)
-        var newRightRectangleWidth = vm.ImageWidth - right < 0 ? 0 : vm.ImageWidth - right;
+        var newRightRectangleWidth = vm.PicViewer.ImageWidth - right < 0 ? 0 : vm.PicViewer.ImageWidth - right;
         control.RightRectangle.Width = newRightRectangleWidth;
-        control.RightRectangle.Height = vm.SelectionHeight;
+        control.RightRectangle.Height = vm.Crop.SelectionHeight;
         Canvas.SetLeft(control.RightRectangle, right);
         Canvas.SetTop(control.RightRectangle, top);
     }
 
     public void UpdateButtonPositions()
     {
-        if (control.DataContext is not ImageCropperViewModel vm)
+        if (control.DataContext is not MainViewModel vm)
         {
             return;
         }
 
-        var selectionX = vm.SelectionX;
-        var selectionY = vm.SelectionY;
-        var selectionWidth = vm.SelectionWidth;
-        var selectionHeight = vm.SelectionHeight;
+        var selectionX = vm.Crop.SelectionX;
+        var selectionY = vm.Crop.SelectionY;
+        var selectionWidth = vm.Crop.SelectionWidth;
+        var selectionHeight = vm.Crop.SelectionHeight;
 
         // Get the bounds of the RootCanvas (the control container)
         const int rootCanvasLeft = 0;

+ 5 - 5
src/PicView.Avalonia/Crop/CropResizeHandler.cs

@@ -15,25 +15,25 @@ public class CropResizeHandler(CropControl control)
     public void OnResizeStart(PointerPressedEventArgs e)
     {
         if (!e.GetCurrentPoint(control).Properties.IsLeftButtonPressed ||
-            control.DataContext is not ImageCropperViewModel vm)
+            control.DataContext is not MainViewModel vm)
         {
             return;
         }
 
         _resizeStart = e.GetPosition(control.RootCanvas);
-        _originalRect = new Rect(Canvas.GetLeft(control.MainRectangle), Canvas.GetTop(control.MainRectangle), vm.SelectionWidth,
-            vm.SelectionHeight);
+        _originalRect = new Rect(Canvas.GetLeft(control.MainRectangle), Canvas.GetTop(control.MainRectangle), vm.Crop.SelectionWidth,
+            vm.Crop.SelectionHeight);
         _isResizing = true;
     }
 
     public void OnResizeMove(object? sender, PointerEventArgs e, CropResizeMode mode)
     {
-        if (!_isResizing || control.DataContext is not ImageCropperViewModel vm)
+        if (!_isResizing || control.DataContext is not MainViewModel vm)
         {
             return;
         }
 
-        CropResizer.Resize(control, e, _resizeStart, _originalRect, vm, mode);
+        CropResizer.Resize(control, e, _resizeStart, _originalRect, vm.Crop, mode);
     }
 
     public void OnResizeEnd(object? sender, PointerReleasedEventArgs e)

+ 2 - 2
src/PicView.Avalonia/CustomControls/PicBox.cs

@@ -284,7 +284,7 @@ public class PicBox : Control, IDisposable
             return new Size(preloadValue.ImageModel.PixelWidth, preloadValue.ImageModel.PixelHeight);
         }
 
-        if (vm.FileInfo?.Exists != true)
+        if (vm.PicViewer.FileInfo?.Exists != true)
         {
             return new Size();
         }
@@ -292,7 +292,7 @@ public class PicBox : Control, IDisposable
         try
         {
             using var magickImage = new MagickImage();
-            magickImage.Ping(vm.FileInfo);
+            magickImage.Ping(vm.PicViewer.FileInfo);
             return new Size(magickImage.Width, magickImage.Height);
         }
         catch (Exception exception)

+ 3 - 3
src/PicView.Avalonia/FileSystem/FileManager.cs

@@ -15,7 +15,7 @@ public static class FileManager
     /// </summary>
     public static async Task DeleteFile(bool recycle, MainViewModel vm)
     {
-        if (vm.FileInfo is null)
+        if (vm.PicViewer.FileInfo is null)
         {
             return;
         }
@@ -27,13 +27,13 @@ public static class FileManager
             if (!recycle)
             {
                 var prompt = TranslationManager.GetTranslation("DeleteFilePermanently");
-                var deleteDialog = new DeleteDialog(prompt, vm.FileInfo.FullName);
+                var deleteDialog = new DeleteDialog(prompt, vm.PicViewer.FileInfo.FullName);
                 UIHelper.GetMainView.MainGrid.Children.Add(deleteDialog);
                 // Dialog handles the deletion
             }
             else
             {
-                errorMsg = await Task.FromResult(FileDeletionHelper.DeleteFileWithErrorMsg(vm.FileInfo.FullName, recycle));
+                errorMsg = await Task.FromResult(FileDeletionHelper.DeleteFileWithErrorMsg(vm.PicViewer.FileInfo.FullName, recycle));
             }
     
             if (!string.IsNullOrEmpty(errorMsg))

+ 6 - 6
src/PicView.Avalonia/FileSystem/FileSaverHelper.cs

@@ -15,13 +15,13 @@ public static class FileSaverHelper
             return;
         }
         
-        if (vm.FileInfo is null)
+        if (vm.PicViewer.FileInfo is null)
         {
             await SaveFileAs(vm);
         }
         else
         {
-            await SaveFileAsync(vm.FileInfo.FullName, vm.FileInfo.FullName, vm);
+            await SaveFileAsync(vm.PicViewer.FileInfo.FullName, vm.PicViewer.FileInfo.FullName, vm);
         }
         
         //TODO: Add visual design to tell the user that file was saved
@@ -35,14 +35,14 @@ public static class FileSaverHelper
         }
         
         // Suggest random filename for saving, if it is not an existing file
-        var fileName = vm.FileInfo is null ? Path.GetRandomFileName() : vm.FileInfo.Name;
+        var fileName = vm.PicViewer.FileInfo is null ? Path.GetRandomFileName() : vm.PicViewer.FileInfo.Name;
 
         await FilePicker.PickAndSaveFileAsAsync(fileName, vm);
     }
 
     public static async Task SaveFileAsync(string? filename, string destination, MainViewModel vm)
     {
-        if (vm.EffectConfig is not null)
+        if (vm.PicViewer.EffectConfig is not null)
         {
             await SaveImageFromBitmap();
         }
@@ -74,13 +74,13 @@ public static class FileSaverHelper
             
             try
             {
-                switch (vm.ImageType)
+                switch (vm.PicViewer.ImageType)
                 {
                     case ImageType.AnimatedGif: // TODO: Add animated GIF support
                     case ImageType.AnimatedWebp: // TODO: Add animated WebP support
                     case ImageType.Bitmap:
                     {
-                        if (vm.ImageSource is not Bitmap bitmap)
+                        if (vm.PicViewer.ImageSource is not Bitmap bitmap)
                         {
                             throw new InvalidOperationException("No bitmap available for saving.");
                         }

+ 2 - 2
src/PicView.Avalonia/Gallery/GalleryFunctions.cs

@@ -337,7 +337,7 @@ public static class GalleryFunctions
         if (Settings.Gallery.IsBottomGalleryShown)
         {
             vm.GalleryMode = GalleryMode.BottomToClosed;
-            vm.GetIsShowingBottomGalleryTranslation = TranslationManager.Translation.ShowBottomGallery;
+            vm.Translation.IsShowingBottomGallery = TranslationManager.Translation.ShowBottomGallery;
             Settings.Gallery.IsBottomGalleryShown = false;
             IsFullGalleryOpen = false;
             IsBottomGalleryOpen = false;
@@ -352,7 +352,7 @@ public static class GalleryFunctions
             vm.GalleryMode = GalleryMode.ClosedToBottom;
         }
 
-        vm.GetIsShowingBottomGalleryTranslation = TranslationManager.Translation.HideBottomGallery;
+        vm.Translation.IsShowingBottomGallery = TranslationManager.Translation.HideBottomGallery;
         if (!NavigationManager.CanNavigate(vm))
         {
             return;

+ 2 - 2
src/PicView.Avalonia/ImageEffects/ImageEffectsHelper.cs

@@ -34,10 +34,10 @@ public static class ImageEffectsHelper
         {
             await Task.Run(async () =>
             {
-                using var magick = await LoadImage(vm.FileInfo, cancellationToken);
+                using var magick = await LoadImage(vm.PicViewer.FileInfo, cancellationToken);
                 ApplyImageEffects(magick, config, cancellationToken);
                 var bitmap = magick.ToWriteableBitmap();
-                vm.ImageSource = bitmap;
+                vm.PicViewer.ImageSource = bitmap;
             }, cancellationToken).ConfigureAwait(false);
         }
         catch (OperationCanceledException)

+ 6 - 6
src/PicView.Avalonia/ImageHandling/ImageFormatConverter.cs

@@ -26,9 +26,9 @@ public static class ImageFormatConverter
         Bitmap? source = null;
 
         // Primary case: Handle effect applied or empty path by saving current ImageSource
-        if (vm.EffectConfig is not null || string.IsNullOrWhiteSpace(path))
+        if (vm.PicViewer.EffectConfig is not null || string.IsNullOrWhiteSpace(path))
         {
-            if (vm.ImageSource is Bitmap bmp)
+            if (vm.PicViewer.ImageSource is Bitmap bmp)
             {
                 source = bmp;
             }
@@ -36,15 +36,15 @@ public static class ImageFormatConverter
         else if (NavigationManager.CanNavigate(vm) && !string.IsNullOrEmpty(path))
         {
             // Handle effects for the current file
-            if (vm.EffectConfig is not null && vm.FileInfo?.FullName == path)
+            if (vm.PicViewer.EffectConfig is not null && vm.PicViewer.FileInfo?.FullName == path)
             {
-                if (vm.ImageSource is Bitmap bmp)
+                if (vm.PicViewer.ImageSource is Bitmap bmp)
                 {
                     source = bmp;
                 }
             }
             // Current path that's already in common format
-            else if (path == vm.FileInfo?.FullName)
+            else if (path == vm.PicViewer.FileInfo?.FullName)
             {
                 if (path.IsCommon())
                 {
@@ -52,7 +52,7 @@ public static class ImageFormatConverter
                     return path;
                 }
 
-                if (vm.ImageSource is Bitmap bmp && vm.FileInfo.FullName.IsSupported())
+                if (vm.PicViewer.ImageSource is Bitmap bmp && vm.PicViewer.FileInfo.FullName.IsSupported())
                 {
                     source = bmp;
                 }

+ 2 - 2
src/PicView.Avalonia/ImageHandling/ImageOptimizer.cs

@@ -18,7 +18,7 @@ public static class ImageOptimizer
     {
         ArgumentNullException.ThrowIfNull(vm);
 
-        if (!NavigationManager.CanNavigate(vm) || vm.FileInfo == null)
+        if (!NavigationManager.CanNavigate(vm) || vm.PicViewer.FileInfo == null)
         {
             return;
         }
@@ -31,7 +31,7 @@ public static class ImageOptimizer
                 {
                     OptimalCompression = true
                 };
-                optimizer.LosslessCompress(vm.FileInfo.FullName);
+                optimizer.LosslessCompress(vm.PicViewer.FileInfo.FullName);
             }
             catch (Exception ex)
             {

+ 5 - 5
src/PicView.Avalonia/ImageTransformations/Rotation.cs

@@ -119,15 +119,15 @@ public static class Rotation
     
     public static void Flip(MainViewModel vm)
     {
-        if (vm.ScaleX == 1)
+        if (vm.PicViewer.ScaleX == 1)
         {
-            vm.ScaleX = -1;
-            vm.GetIsFlippedTranslation = vm.UnFlip;
+            vm.PicViewer.ScaleX = -1;
+            vm.Translation.IsFlipped = vm.Translation.UnFlip;
         }
         else
         {
-            vm.ScaleX = 1;
-            vm.GetIsFlippedTranslation = vm.Flip;
+            vm.PicViewer.ScaleX = 1;
+            vm.Translation.IsFlipped = vm.Translation.Flip;
         }
 
         Dispatcher.UIThread.Invoke(() => { vm.ImageViewer.Flip(true); });

+ 2 - 2
src/PicView.Avalonia/Navigation/ErrorHandling.cs

@@ -66,7 +66,7 @@ public static class ErrorHandling
     {
         vm.IsLoading = true;
         
-        if (vm.ImageSource is null)
+        if (vm.PicViewer.ImageSource is null)
         {
             await Dispatcher.UIThread.InvokeAsync(() =>
             {
@@ -81,7 +81,7 @@ public static class ErrorHandling
             return;
         }
         
-        if (vm.ImageSource is null || !NavigationManager.CanNavigate(vm))
+        if (vm.PicViewer.ImageSource is null || !NavigationManager.CanNavigate(vm))
         {
             await Dispatcher.UIThread.InvokeAsync(() =>
             {

+ 64 - 66
src/PicView.Avalonia/Navigation/ExifHandling.cs

@@ -14,7 +14,7 @@ public static class ExifHandling
 {
     public static void UpdateExifValues(MainViewModel vm)
     {
-        if (vm.FileInfo is null || vm is { PixelWidth: <= 0, PixelHeight: <= 0 })
+        if (vm.PicViewer?.FileInfo is null || vm.PicViewer is { PixelWidth: <= 0, PixelHeight: <= 0 })
         {
             return;
         }
@@ -22,39 +22,39 @@ public static class ExifHandling
         
         try
         {
-            if (!vm.FileInfo.Exists)
+            if (!vm.PicViewer.FileInfo.Exists)
             {
                 return;
             }
-            magick.Ping(vm.FileInfo);
+            magick.Ping(vm.PicViewer.FileInfo);
             var profile = magick.GetExifProfile();
 
             if (profile != null)
             {
-                vm.DpiY = profile?.GetValue(ExifTag.YResolution)?.Value.ToDouble() ?? 0;
-                vm.DpiX = profile?.GetValue(ExifTag.XResolution)?.Value.ToDouble() ?? 0;
+                vm.Exif.DpiY = profile?.GetValue(ExifTag.YResolution)?.Value.ToDouble() ?? 0;
+                vm.Exif.DpiX = profile?.GetValue(ExifTag.XResolution)?.Value.ToDouble() ?? 0;
                 var depth = profile?.GetValue(ExifTag.BitsPerSample)?.Value;
                 if (depth is not null)
                 {
                     var x = depth.Aggregate(0, (current, value) => current + value);
-                    vm.GetBitDepth = x.ToString();
+                    vm.Exif.BitDepth = x.ToString();
                 }
                 else
                 {
-                    vm.GetBitDepth = (magick.Depth * 3).ToString();
+                    vm.Exif.BitDepth = (magick.Depth * 3).ToString();
                 }
             }
 
-            if (vm.DpiX is 0 && vm.ImageType is ImageType.Bitmap or ImageType.AnimatedGif or ImageType.AnimatedWebp)
+            if (vm.Exif.DpiX is 0 && vm.PicViewer.ImageType is ImageType.Bitmap or ImageType.AnimatedGif or ImageType.AnimatedWebp)
             {
-                if (vm.ImageSource is Bitmap bmp)
+                if (vm.PicViewer.ImageSource is Bitmap bmp)
                 {
-                    vm.DpiX = bmp?.Dpi.X ?? 0;
-                    vm.DpiY = bmp?.Dpi.Y ?? 0;
+                    vm.Exif.DpiX = bmp?.Dpi.X ?? 0;
+                    vm.Exif.DpiY = bmp?.Dpi.Y ?? 0;
                 }
             }
 
-            vm.GetOrientation = vm.ExifOrientation switch
+            vm.Exif.Orientation = vm.PicViewer.ExifOrientation switch
             {
                 EXIFHelper.EXIFOrientation.Horizontal => TranslationManager.Translation.Normal,
                 EXIFHelper.EXIFOrientation.MirrorHorizontal => TranslationManager.Translation.Flipped,
@@ -72,34 +72,34 @@ public static class ExifHandling
 
             var meter = TranslationManager.Translation.Meter;
 
-            if (string.IsNullOrEmpty(vm.GetBitDepth))
+            if (string.IsNullOrEmpty(vm.Exif.BitDepth))
             {
-                vm.GetBitDepth = (magick.Depth * 3).ToString();
+                vm.Exif.BitDepth = (magick.Depth * 3).ToString();
             }
 
-            if (vm.DpiX == 0 || vm.DpiY == 0) // Check for zero before division
+            if (vm.Exif.DpiX == 0 || vm.Exif.DpiY == 0) // Check for zero before division
             {
-                vm.GetPrintSizeCm = vm.GetPrintSizeInch = vm.GetSizeMp = vm.GetResolution = string.Empty;
+                vm.Exif.PrintSizeCm = vm.Exif.PrintSizeInch = vm.Exif.SizeMp = vm.Exif.Resolution = string.Empty;
             }
             else 
             {
-                var printSizes = AspectRatioHelper.GetPrintSizes( vm.PixelWidth, vm.PixelHeight, vm.DpiX, vm.DpiY);
+                var printSizes = AspectRatioHelper.GetPrintSizes( vm.PicViewer.PixelWidth, vm.PicViewer.PixelHeight, vm.Exif.DpiX, vm.Exif.DpiY);
 
-                vm.GetPrintSizeCm = printSizes.PrintSizeCm;
-                vm.GetPrintSizeInch = printSizes.PrintSizeInch;
-                vm.GetSizeMp = printSizes.SizeMp;
+                vm.Exif.PrintSizeCm = printSizes.PrintSizeCm;
+                vm.Exif.PrintSizeInch = printSizes.PrintSizeInch;
+                vm.Exif.SizeMp = printSizes.SizeMp;
 
-                vm.GetResolution = $"{vm.DpiX} x {vm.DpiY} {TranslationManager.Translation.Dpi}";
+                vm.Exif.Resolution = $"{vm.Exif.DpiX} x {vm.Exif.DpiY} {TranslationManager.Translation.Dpi}";
             }
 
-            var gcd = ImageTitleFormatter.GCD(vm.PixelWidth, vm.PixelHeight);
+            var gcd = ImageTitleFormatter.GCD(vm.PicViewer.PixelWidth, vm.PicViewer.PixelHeight);
             if (gcd != 0) // Check for zero before division
             {
-                vm.GetAspectRatio = AspectRatioHelper.GetFormattedAspectRatio(gcd, vm.PixelWidth, vm.PixelHeight);
+                vm.Exif.AspectRatio = AspectRatioHelper.GetFormattedAspectRatio(gcd, vm.PicViewer.PixelWidth, vm.PicViewer.PixelHeight);
             }
             else
             {
-                vm.GetAspectRatio = string.Empty; // Handle cases where gcd is 0
+                vm.Exif.AspectRatio = string.Empty; // Handle cases where gcd is 0
             }
 
             vm.EXIFRating = profile?.GetValue(ExifTag.Rating)?.Value ?? 0;
@@ -108,58 +108,56 @@ public static class ExifHandling
 
             if (gpsValues is not null)
             {
-                vm.GetLatitude = gpsValues[0];
-                vm.GetLongitude = gpsValues[1];
+                vm.Exif.Latitude = gpsValues[0];
+                vm.Exif.Longitude = gpsValues[1];
 
-                vm.GoogleLink = gpsValues[2];
-                vm.BingLink = gpsValues[3];
+                vm.Exif.GoogleLink = gpsValues[2];
+                vm.Exif.BingLink = gpsValues[3];
             }
             else
             {
-                vm.GetLatitude = vm.GetLongitude = vm.GoogleLink = vm.BingLink = string.Empty;
+                vm.Exif.Latitude = vm.Exif.Longitude = vm.Exif.GoogleLink = vm.Exif.BingLink = string.Empty;
             }
 
             var altitude = profile?.GetValue(ExifTag.GPSAltitude)?.Value;
-            vm.GetAltitude = altitude.HasValue
+            vm.Exif.Altitude = altitude.HasValue
                 ? $"{altitude.Value.ToDouble()} {meter}"
                 : string.Empty;
             var getAuthors = profile?.GetValue(ExifTag.Artist)?.Value;
-            vm.GetAuthors = getAuthors ?? string.Empty;
-            vm.GetDateTaken = EXIFHelper.GetDateTaken(profile);
-            vm.GetCopyright = profile?.GetValue(ExifTag.Copyright)?.Value ?? string.Empty;
-            vm.GetTitle = EXIFHelper.GetTitle(profile);
-            vm.GetSubject = EXIFHelper.GetSubject(profile);
-            vm.GetSoftware = profile?.GetValue(ExifTag.Software)?.Value ?? string.Empty;
-            vm.GetResolutionUnit = EXIFHelper.GetResolutionUnit(profile);
-            vm.GetColorRepresentation = EXIFHelper.GetColorSpace(profile);
-            vm.GetCompression = profile?.GetValue(ExifTag.Compression)?.Value.ToString() ?? string.Empty;
-            vm.GetCompressedBitsPixel = profile?.GetValue(ExifTag.CompressedBitsPerPixel)?.Value.ToString() ??
-                                        string.Empty;
-            vm.GetCameraMaker = profile?.GetValue(ExifTag.Make)?.Value ?? string.Empty;
-            vm.GetCameraModel = profile?.GetValue(ExifTag.Model)?.Value ?? string.Empty;
-            vm.GetExposureProgram = EXIFHelper.GetExposureProgram(profile);
-            vm.GetExposureTime = profile?.GetValue(ExifTag.ExposureTime)?.Value.ToString() ?? string.Empty;
-            vm.GetFNumber = profile?.GetValue(ExifTag.FNumber)?.Value.ToString() ?? string.Empty;
-            vm.GetMaxAperture = profile?.GetValue(ExifTag.MaxApertureValue)?.Value.ToString() ?? string.Empty;
-            vm.GetExposureBias = profile?.GetValue(ExifTag.ExposureBiasValue)?.Value.ToString() ?? string.Empty;
-            vm.GetDigitalZoom = profile?.GetValue(ExifTag.DigitalZoomRatio)?.Value.ToString() ?? string.Empty;
-            vm.GetFocalLength35Mm = profile?.GetValue(ExifTag.FocalLengthIn35mmFilm)?.Value.ToString() ??
-                                    string.Empty;
-            vm.GetFocalLength = profile?.GetValue(ExifTag.FocalLength)?.Value.ToString() ?? string.Empty;
-            vm.GetISOSpeed = EXIFHelper.GetISOSpeed(profile);
-            vm.GetMeteringMode = profile?.GetValue(ExifTag.MeteringMode)?.Value.ToString() ?? string.Empty;
-            vm.GetContrast = EXIFHelper.GetContrast(profile);
-            vm.GetSaturation = EXIFHelper.GetSaturation(profile);
-            vm.GetSharpness = EXIFHelper.GetSharpness(profile);
-            vm.GetWhiteBalance = EXIFHelper.GetWhiteBalance(profile);
-            vm.GetFlashMode = EXIFHelper.GetFlashMode(profile);
-            vm.GetFlashEnergy = profile?.GetValue(ExifTag.FlashEnergy)?.Value.ToString() ?? string.Empty;
-            vm.GetLightSource = EXIFHelper.GetLightSource(profile);
-            vm.GetBrightness = profile?.GetValue(ExifTag.BrightnessValue)?.Value.ToString() ?? string.Empty;
-            vm.GetPhotometricInterpretation = EXIFHelper.GetPhotometricInterpretation(profile);
-            vm.GetExifVersion = EXIFHelper.GetExifVersion(profile);
-            vm.GetLensModel = profile?.GetValue(ExifTag.LensModel)?.Value ?? string.Empty;
-            vm.GetLensMaker = profile?.GetValue(ExifTag.LensMake)?.Value ?? string.Empty;
+            vm.Exif.Authors = getAuthors ?? string.Empty;
+            vm.Exif.DateTaken = EXIFHelper.GetDateTaken(profile);
+            vm.Exif.Copyright = profile?.GetValue(ExifTag.Copyright)?.Value ?? string.Empty;
+            vm.Exif.Title = EXIFHelper.GetTitle(profile);
+            vm.Exif.Subject = EXIFHelper.GetSubject(profile);
+            vm.Exif.Software = profile?.GetValue(ExifTag.Software)?.Value ?? string.Empty;
+            vm.Exif.ResolutionUnit = EXIFHelper.GetResolutionUnit(profile);
+            vm.Exif.ColorRepresentation = EXIFHelper.GetColorSpace(profile);
+            vm.Exif.Compression = profile?.GetValue(ExifTag.Compression)?.Value.ToString() ?? string.Empty;
+            vm.Exif.CompressedBitsPixel = profile?.GetValue(ExifTag.CompressedBitsPerPixel)?.Value.ToString() ?? string.Empty;
+            vm.Exif.CameraMaker = profile?.GetValue(ExifTag.Make)?.Value ?? string.Empty;
+            vm.Exif.CameraModel = profile?.GetValue(ExifTag.Model)?.Value ?? string.Empty;
+            vm.Exif.ExposureProgram = EXIFHelper.GetExposureProgram(profile);
+            vm.Exif.ExposureTime = profile?.GetValue(ExifTag.ExposureTime)?.Value.ToString() ?? string.Empty;
+            vm.Exif.FNumber = profile?.GetValue(ExifTag.FNumber)?.Value.ToString() ?? string.Empty;
+            vm.Exif.MaxAperture = profile?.GetValue(ExifTag.MaxApertureValue)?.Value.ToString() ?? string.Empty;
+            vm.Exif.ExposureBias = profile?.GetValue(ExifTag.ExposureBiasValue)?.Value.ToString() ?? string.Empty;
+            vm.Exif.DigitalZoom = profile?.GetValue(ExifTag.DigitalZoomRatio)?.Value.ToString() ?? string.Empty;
+            vm.Exif.FocalLength35Mm = profile?.GetValue(ExifTag.FocalLengthIn35mmFilm)?.Value.ToString() ?? string.Empty;
+            vm.Exif.FocalLength = profile?.GetValue(ExifTag.FocalLength)?.Value.ToString() ?? string.Empty;
+            vm.Exif.ISOSpeed = EXIFHelper.GetISOSpeed(profile);
+            vm.Exif.MeteringMode = profile?.GetValue(ExifTag.MeteringMode)?.Value.ToString() ?? string.Empty;
+            vm.Exif.Contrast = EXIFHelper.GetContrast(profile);
+            vm.Exif.Saturation = EXIFHelper.GetSaturation(profile);
+            vm.Exif.Sharpness = EXIFHelper.GetSharpness(profile);
+            vm.Exif.WhiteBalance = EXIFHelper.GetWhiteBalance(profile);
+            vm.Exif.FlashMode = EXIFHelper.GetFlashMode(profile);
+            vm.Exif.FlashEnergy = profile?.GetValue(ExifTag.FlashEnergy)?.Value.ToString() ?? string.Empty;
+            vm.Exif.LightSource = EXIFHelper.GetLightSource(profile);
+            vm.Exif.Brightness = profile?.GetValue(ExifTag.BrightnessValue)?.Value.ToString() ?? string.Empty;
+            vm.Exif.PhotometricInterpretation = EXIFHelper.GetPhotometricInterpretation(profile);
+            vm.Exif.ExifVersion = EXIFHelper.GetExifVersion(profile);
+            vm.Exif.LensModel = profile?.GetValue(ExifTag.LensModel)?.Value ?? string.Empty;
+            vm.Exif.LensMaker = profile?.GetValue(ExifTag.LensMake)?.Value ?? string.Empty;
         }
         catch (Exception e)
         {

+ 3 - 3
src/PicView.Avalonia/Navigation/FileListManager.cs

@@ -101,13 +101,13 @@ public static class FileListManager
         {
             try
             {
-                var files = platformSpecificService.GetFiles(vm.FileInfo);
+                var files = platformSpecificService.GetFiles(vm.PicViewer.FileInfo);
                 if (files is not { Count: > 0 })
                 {
                     return false;
                 }
 
-                NavigationManager.UpdateFileListAndIndex(files, files.IndexOf(vm.FileInfo.FullName));
+                NavigationManager.UpdateFileListAndIndex(files, files.IndexOf(vm.PicViewer.FileInfo.FullName));
                 TitleManager.SetTitle(vm);
                 return true;
             }
@@ -135,7 +135,7 @@ public static class FileListManager
 
         if (!_cancellationTokenSource.IsCancellationRequested)
         {
-            await GalleryLoad.ReloadGalleryAsync(vm, vm.FileInfo.DirectoryName);
+            await GalleryLoad.ReloadGalleryAsync(vm, vm.PicViewer.FileInfo.DirectoryName);
         }
     }
 }

+ 9 - 9
src/PicView.Avalonia/Navigation/ImageIterator.cs

@@ -249,7 +249,7 @@ public class ImageIterator : IAsyncDisposable
                 PreLoader.Resynchronize(ImagePaths);
                 var newIndex = GetIteration(index, NavigateTo.Previous);
                 Interlocked.Exchange(ref _currentIndex, newIndex);
-                _vm.FileInfo = new FileInfo(ImagePaths[CurrentIndex]);
+                _vm.PicViewer.FileInfo = new FileInfo(ImagePaths[CurrentIndex]);
                 await IterateToIndex(CurrentIndex, new CancellationTokenSource());
             }
             else
@@ -269,7 +269,7 @@ public class ImageIterator : IAsyncDisposable
                     }
                 }
 
-                var indexOf = ImagePaths.IndexOf(_vm.FileInfo.FullName);
+                var indexOf = ImagePaths.IndexOf(_vm.PicViewer.FileInfo.FullName);
                 _vm.SelectedGalleryItemIndex = indexOf;// Fixes deselection bug 
                 Interlocked.Exchange(ref _currentIndex, indexOf);
                 if (isSameFile)
@@ -353,7 +353,7 @@ public class ImageIterator : IAsyncDisposable
         
             if (sameFile)
             {
-                _vm.FileInfo = fileInfo;
+                _vm.PicViewer.FileInfo = fileInfo;
             }
 
             TitleManager.SetTitle(_vm);
@@ -411,10 +411,10 @@ public class ImageIterator : IAsyncDisposable
         await PreLoader.GetAsync(index, ImagePaths);
 
     public PreLoadValue? GetCurrentPreLoadValue() =>
-        IsRunning ? PreLoader.Get(_vm.FileInfo.FullName, ImagePaths) : PreLoader.Get(CurrentIndex, ImagePaths);
+        IsRunning ? PreLoader.Get(_vm.PicViewer.FileInfo.FullName, ImagePaths) : PreLoader.Get(CurrentIndex, ImagePaths);
 
     public async Task<PreLoadValue?> GetCurrentPreLoadValueAsync() =>
-         IsRunning ? await PreLoader.GetAsync(_vm.FileInfo.FullName, ImagePaths) : await PreLoader.GetAsync(CurrentIndex, ImagePaths);
+         IsRunning ? await PreLoader.GetAsync(_vm.PicViewer.FileInfo.FullName, ImagePaths) : await PreLoader.GetAsync(CurrentIndex, ImagePaths);
 
     public PreLoadValue? GetNextPreLoadValue()
     {
@@ -442,7 +442,7 @@ public class ImageIterator : IAsyncDisposable
     public async Task ReloadFileListAsync()
     {
         ImagePaths = await Task.FromResult(_vm.PlatformService.GetFiles(InitialFileInfo)).ConfigureAwait(false);
-        Interlocked.Exchange(ref _currentIndex, ImagePaths.IndexOf(_vm.FileInfo.FullName));
+        Interlocked.Exchange(ref _currentIndex, ImagePaths.IndexOf(_vm.PicViewer.FileInfo.FullName));
 
         InitiateFileSystemWatcher(InitialFileInfo);
     }
@@ -728,7 +728,7 @@ public class ImageIterator : IAsyncDisposable
 
             if (!Settings.ImageScaling.ShowImageSideBySide)
             {
-                _vm.ImageSource = thumb;
+                _vm.PicViewer.ImageSource = thumb;
             }
             else
             {
@@ -737,8 +737,8 @@ public class ImageIterator : IAsyncDisposable
                 {
                     return;
                 }
-                _vm.ImageSource = thumb;
-                _vm.SecondaryImageSource = secondaryThumb;
+                _vm.PicViewer.ImageSource = thumb;
+                _vm.PicViewer.SecondaryImageSource = secondaryThumb;
             }
         }
     }

+ 16 - 16
src/PicView.Avalonia/Navigation/NavigationManager.cs

@@ -45,7 +45,7 @@ public static class NavigationManager
     {
         return _imageIterator?.ImagePaths is not null &&
                _imageIterator.ImagePaths.Count > 0 && !CropFunctions.IsCropping &&
-               !DialogManager.IsDialogOpen && vm is { IsEditableTitlebarOpen: false, FileInfo: not null };
+               !DialogManager.IsDialogOpen && vm is { IsEditableTitlebarOpen: false, PicViewer.FileInfo: not null };
         // TODO: should probably turn this into CanExecute observable for ReactiveUI
     }
 
@@ -59,10 +59,10 @@ public static class NavigationManager
     {
         if (!CanNavigate(vm))
         {
-            if (vm.FileInfo is null && _imageIterator is not null)
+            if (vm.PicViewer.FileInfo is null && _imageIterator is not null)
             {
                 // Fixes issue that shouldn't happen. Should investigate.
-                vm.FileInfo = new FileInfo(_imageIterator.ImagePaths[0]);
+                vm.PicViewer.FileInfo = new FileInfo(_imageIterator.ImagePaths[0]);
             }
             else
             {
@@ -141,7 +141,7 @@ public static class NavigationManager
             }
             else
             {
-                await UpdateImage.SetTiffImageAsync(TiffNavigationInfo, _imageIterator.CurrentIndex, vm.FileInfo, vm);
+                await UpdateImage.SetTiffImageAsync(TiffNavigationInfo, _imageIterator.CurrentIndex, vm.PicViewer.FileInfo, vm);
             }
         }
         return;
@@ -584,8 +584,8 @@ public static class NavigationManager
         await UpdateImage.SetSingleImageAsync(imageModel.Image, imageModel.ImageType, url, vm);
 
         vm.IsLoading = false;
-        vm.FileInfo = fileInfo;
-        vm.ExifOrientation = imageModel.EXIFOrientation;
+        vm.PicViewer.FileInfo = fileInfo;
+        vm.PicViewer.ExifOrientation = imageModel.EXIFOrientation;
         FileHistory.Add(url);
 
         await DisposeImageIteratorAsync();
@@ -602,8 +602,8 @@ public static class NavigationManager
     {
         TitleManager.SetLoadingTitle(vm);
         vm.IsLoading = true;
-        vm.ImageSource = null;
-        vm.FileInfo = null;
+        vm.PicViewer.ImageSource = null;
+        vm.PicViewer.FileInfo = null;
         
         if (_cancellationTokenSource is not null)
         {
@@ -637,9 +637,9 @@ public static class NavigationManager
 #if DEBUG
                 Console.WriteLine("LoadPicFromBase64Async exception = \n" + e.Message);
 #endif
-                if (vm.FileInfo is not null && vm.FileInfo.Exists)
+                if (vm.PicViewer.FileInfo is not null && vm.PicViewer.FileInfo.Exists)
                 {
-                    await LoadPicFromFile(vm.FileInfo.FullName, vm, vm.FileInfo);
+                    await LoadPicFromFile(vm.PicViewer.FileInfo.FullName, vm, vm.PicViewer.FileInfo);
                 }
                 else
                 {
@@ -720,7 +720,7 @@ public static class NavigationManager
 
     public static void InitializeImageIterator(MainViewModel vm)
     {
-        _imageIterator ??= new ImageIterator(vm.FileInfo, vm);
+        _imageIterator ??= new ImageIterator(vm.PicViewer.FileInfo, vm);
     }
     
     public static async Task DisposeImageIteratorAsync()
@@ -810,7 +810,7 @@ public static class NavigationManager
     
     public static async Task FullReload(MainViewModel vm)
     {
-        if (vm.ImageSource is null)
+        if (vm.PicViewer.ImageSource is null)
         {
             return;
         }
@@ -831,7 +831,7 @@ public static class NavigationManager
 
         var index = _imageIterator.CurrentIndex;
         await _imageIterator.DisposeAsync().ConfigureAwait(false);
-        _imageIterator = new ImageIterator(vm.FileInfo, vm);
+        _imageIterator = new ImageIterator(vm.PicViewer.FileInfo, vm);
         await Navigate(index, vm).ConfigureAwait(false);
     }
 
@@ -916,8 +916,8 @@ public static class NavigationManager
     {
         var imageModel = await GetImageModel.GetImageModelAsync(fileInfo).ConfigureAwait(false);
         ImageModel? nextImageModel = null;
-        vm.ImageSource = imageModel.Image;
-        vm.ImageType = imageModel.ImageType;
+        vm.PicViewer.ImageSource = imageModel.Image;
+        vm.PicViewer.ImageType = imageModel.ImageType;
         if (!Settings.ImageScaling.ShowImageSideBySide)
         {
             await Dispatcher.UIThread.InvokeAsync(() =>
@@ -942,7 +942,7 @@ public static class NavigationManager
         if (Settings.ImageScaling.ShowImageSideBySide)
         {
             nextImageModel = (await _imageIterator.GetNextPreLoadValueAsync()).ImageModel;
-            vm.SecondaryImageSource = nextImageModel.Image;
+            vm.PicViewer.SecondaryImageSource = nextImageModel.Image;
             await Dispatcher.UIThread.InvokeAsync(() =>
             {
                 WindowResizing.SetSize(imageModel.PixelWidth, imageModel.PixelHeight, nextImageModel.PixelWidth,

+ 20 - 20
src/PicView.Avalonia/Navigation/UpdateImage.cs

@@ -79,10 +79,10 @@ public static class UpdateImage
             vm.ImageViewer.SetTransform(preLoadValue.ImageModel.EXIFOrientation);
             if (Settings.ImageScaling.ShowImageSideBySide && nextPreloadValue is { ImageModel: not null })
             {
-                vm.SecondaryImageSource = nextPreloadValue.ImageModel.Image;
+                vm.PicViewer.SecondaryImageSource = nextPreloadValue.ImageModel.Image;
                 if (preLoadValue is { ImageModel: not null})
                 {
-                    vm.ImageSource = preLoadValue.ImageModel.Image;
+                    vm.PicViewer.ImageSource = preLoadValue.ImageModel.Image;
                 }
             }
             else if (preLoadValue is { ImageModel: not null})
@@ -92,9 +92,9 @@ public static class UpdateImage
                     vm.ImageViewer.MainImage.InitialAnimatedSource = preLoadValue.ImageModel.FileInfo.FullName;
                 }
                 
-                vm.ImageSource = preLoadValue.ImageModel.Image;
-                vm.SecondaryImageSource = null;
-                vm.ImageType = preLoadValue.ImageModel.ImageType;
+                vm.PicViewer.ImageSource = preLoadValue.ImageModel.Image;
+                vm.PicViewer.SecondaryImageSource = null;
+                vm.PicViewer.ImageType = preLoadValue.ImageModel.ImageType;
             }
             else
             {
@@ -201,9 +201,9 @@ public static class UpdateImage
         MainViewModel vm)
     {
         var source = await Task.Run( () => tiffNavigationInfo.Pages[tiffNavigationInfo.CurrentPage].ToWriteableBitmap()).ConfigureAwait(false);
-        vm.ImageSource = source;
-        vm.SecondaryImageSource = null;
-        vm.ImageType = ImageType.Bitmap;
+        vm.PicViewer.ImageSource = source;
+        vm.PicViewer.SecondaryImageSource = null;
+        vm.PicViewer.ImageType = ImageType.Bitmap;
         var width = source?.PixelSize.Width ?? 0;
         var height = source?.PixelSize.Height ?? 0;
         
@@ -294,21 +294,21 @@ public static class UpdateImage
             var path = source as string;
             using var magickImage = new MagickImage();
             magickImage.Ping(path);
-            vm.ImageSource = source;
-            vm.ImageType = ImageType.Svg;
+            vm.PicViewer.ImageSource = source;
+            vm.PicViewer.ImageType = ImageType.Svg;
             width = (int)magickImage.Width;
             height = (int)magickImage.Height;
         }
         else
         {
             var bitmap = source as Bitmap;
-            vm.ImageSource = source;
-            vm.ImageType = imageType == ImageType.Invalid ? ImageType.Bitmap : imageType;
+            vm.PicViewer.ImageSource = source;
+            vm.PicViewer.ImageType = imageType == ImageType.Invalid ? ImageType.Bitmap : imageType;
             width = bitmap?.PixelSize.Width ?? 0;
             height = bitmap?.PixelSize.Height ?? 0;
         }
 
-        vm.FileInfo = null;
+        vm.PicViewer.FileInfo = null;
 
         await dispatchAction(() => { WindowResizing.SetSize(width, height, 0, 0, 0, vm); }, DispatcherPriority.Send);
 
@@ -319,8 +319,8 @@ public static class UpdateImage
 
         vm.PlatformService.StopTaskbarProgress();
 
-        vm.PixelWidth = width;
-        vm.PixelHeight = height;
+        vm.PicViewer.PixelWidth = width;
+        vm.PicViewer.PixelHeight = height;
 
         if (Settings.Gallery.IsBottomGalleryShown)
         {
@@ -338,11 +338,11 @@ public static class UpdateImage
 
     public static void SetStats(MainViewModel vm, int index, ImageModel imageModel)
     {
-        vm.PixelWidth = imageModel.PixelWidth;
-        vm.PixelHeight = imageModel.PixelHeight;
+        vm.PicViewer.PixelWidth = imageModel.PixelWidth;
+        vm.PicViewer.PixelHeight = imageModel.PixelHeight;
         vm.GetIndex = index + 1;
-        vm.ExifOrientation = imageModel.EXIFOrientation;
-        vm.FileInfo = imageModel.FileInfo;
+        vm.PicViewer.ExifOrientation = imageModel.EXIFOrientation;
+        vm.PicViewer.FileInfo = imageModel.FileInfo;
         vm.ZoomValue = 1;
 
         if (Settings.ImageScaling.ShowImageSideBySide)
@@ -353,7 +353,7 @@ public static class UpdateImage
         }
 
         // Reset effects
-        vm.EffectConfig = null;
+        vm.PicViewer.EffectConfig = null;
     }
 
     #endregion

+ 2 - 2
src/PicView.Avalonia/Resizing/AspectRatioHelper.cs

@@ -14,8 +14,8 @@ public static class AspectRatioHelper
         var percentage = isWidth ? widthTextBox.Text.GetPercentage() : heightTextBox.Text.GetPercentage();
         if (percentage > 0)
         {
-            var newWidth = Convert.ToUInt32(vm.PixelWidth * (percentage / 100));
-            var newHeight = Convert.ToUInt32(vm.PixelHeight * (percentage / 100));
+            var newWidth = Convert.ToUInt32(vm.PicViewer.PixelWidth * (percentage / 100));
+            var newHeight = Convert.ToUInt32(vm.PicViewer.PixelHeight * (percentage / 100));
 
             widthTextBox.Text = newWidth.ToString("# ", CultureInfo.CurrentCulture);
             heightTextBox.Text = newHeight.ToString("# ", CultureInfo.CurrentCulture);

+ 11 - 11
src/PicView.Avalonia/SettingsManagement/LanguageUpdater.cs

@@ -5,7 +5,7 @@ namespace PicView.Avalonia.SettingsManagement;
 
 public static class LanguageUpdater
 {
-    public static async Task UpdateLanguageAsync(MainViewModel vm, bool settingsExists)
+    public static async Task UpdateLanguageAsync(TranslationViewModel translationViewModel, PicViewerModel picViewerModel, bool settingsExists)
     {
         if (settingsExists)
         {
@@ -16,36 +16,36 @@ public static class LanguageUpdater
             await TranslationManager.DetermineAndLoadLanguage().ConfigureAwait(false);
         }
 
-        vm.UpdateLanguage();
+        translationViewModel.UpdateLanguage();
 
-        vm.GetIsFlippedTranslation = vm.ScaleX == 1 ? vm.Flip : vm.UnFlip;
+        translationViewModel.IsFlipped = picViewerModel.ScaleX == 1 ? translationViewModel.Flip : translationViewModel.UnFlip;
         
-        vm.GetIsShowingUITranslation = !Settings.UIProperties.ShowInterface ? vm.ShowUI : vm.HideUI;
+        translationViewModel.IsShowingUI = !Settings.UIProperties.ShowInterface ? translationViewModel.ShowUI : translationViewModel.HideUI;
         
-        vm.GetIsScrollingTranslation = Settings.Zoom.ScrollEnabled ?
+        translationViewModel.IsScrolling = Settings.Zoom.ScrollEnabled ?
             TranslationManager.Translation.ScrollingEnabled : TranslationManager.Translation.ScrollingDisabled;
         
-        vm.GetIsShowingBottomGalleryTranslation = Settings.Gallery.IsBottomGalleryShown ?
+        translationViewModel.IsShowingBottomGallery = Settings.Gallery.IsBottomGalleryShown ?
             TranslationManager.Translation.HideBottomGallery :
             TranslationManager.Translation.ShowBottomGallery;
         
-        vm.GetIsLoopingTranslation = Settings.UIProperties.Looping
+        translationViewModel.IsLooping = Settings.UIProperties.Looping
             ? TranslationManager.Translation.LoopingEnabled
             : TranslationManager.Translation.LoopingDisabled;
         
-        vm.GetIsCtrlZoomTranslation = Settings.Zoom.CtrlZoom
+        translationViewModel.IsCtrlToZoom = Settings.Zoom.CtrlZoom
             ? TranslationManager.Translation.CtrlToZoom
             : TranslationManager.Translation.ScrollToZoom;
         
-        vm.GetIsShowingBottomToolbarTranslation = Settings.UIProperties.ShowBottomNavBar
+        translationViewModel.IsShowingBottomToolbar = Settings.UIProperties.ShowBottomNavBar
             ? TranslationManager.Translation.HideBottomToolbar
             : TranslationManager.Translation.ShowBottomToolbar;
         
-        vm.GetIsShowingFadingUIButtonsTranslation = Settings.UIProperties.ShowAltInterfaceButtons
+        translationViewModel.IsShowingFadingUIButtons = Settings.UIProperties.ShowAltInterfaceButtons
             ? TranslationManager.Translation.DisableFadeInButtonsOnHover
             : TranslationManager.Translation.ShowFadeInButtonsOnHover;
         
-        vm.GetIsUsingTouchpadTranslation = Settings.Zoom.IsUsingTouchPad
+        translationViewModel.IsUsingTouchpad = Settings.Zoom.IsUsingTouchPad
             ? TranslationManager.Translation.UsingTouchpad
             : TranslationManager.Translation.UsingMouse;
     }

+ 19 - 19
src/PicView.Avalonia/SettingsManagement/SettingsUpdater.cs

@@ -94,14 +94,14 @@ public static class SettingsUpdater
     public static void TurnOffUsingTouchpad(MainViewModel vm)
     {
         Settings.Zoom.IsUsingTouchPad = false;
-        vm.GetIsUsingTouchpadTranslation = TranslationManager.Translation.UsingMouse;
+        vm.Translation.IsUsingTouchpad = TranslationManager.Translation.UsingMouse;
         vm.IsUsingTouchpad = false;
     }
     
     public static void TurnOnUsingTouchpad(MainViewModel vm)
     {
         Settings.Zoom.IsUsingTouchPad = true;
-        vm.GetIsUsingTouchpadTranslation = TranslationManager.Translation.UsingTouchpad;
+        vm.Translation.IsUsingTouchpad = TranslationManager.Translation.UsingTouchpad;
         vm.IsUsingTouchpad = true;
     }
     
@@ -186,8 +186,8 @@ public static class SettingsUpdater
     public static void TurnOffSideBySide(MainViewModel vm)
     {
         Settings.ImageScaling.ShowImageSideBySide = false;
-        vm.IsShowingSideBySide = false;
-        vm.SecondaryImageSource = null;
+        vm.PicViewer.IsShowingSideBySide = false;
+        vm.PicViewer.SecondaryImageSource = null;
         WindowResizing.SetSize(vm);
         TitleManager.SetTitle(vm);
     }
@@ -195,7 +195,7 @@ public static class SettingsUpdater
     public static async Task TurnOnSideBySide(MainViewModel vm)
     {
         Settings.ImageScaling.ShowImageSideBySide = true;
-        vm.IsShowingSideBySide = true;
+        vm.PicViewer.IsShowingSideBySide = true;
         if (NavigationManager.CanNavigate(vm))
         {
             var preloadValue = await NavigationManager.GetNextPreLoadValueAsync();
@@ -206,15 +206,15 @@ public static class SettingsUpdater
 #endif
                 return;
             }
-            vm.SecondaryImageSource = preloadValue.ImageModel.Image;
+            vm.PicViewer.SecondaryImageSource = preloadValue.ImageModel.Image;
             var imageModel1 = new ImageModel
             {
-                FileInfo = vm.FileInfo,
-                PixelWidth = (int)vm.ImageWidth,
-                PixelHeight = (int)vm.ImageHeight,
-                ImageType = vm.ImageType,
-                Image = vm.ImageSource,
-                EXIFOrientation = vm.ExifOrientation
+                FileInfo = vm.PicViewer.FileInfo,
+                PixelWidth = (int)vm.PicViewer.ImageWidth,
+                PixelHeight = (int)vm.PicViewer.ImageHeight,
+                ImageType = vm.PicViewer.ImageType,
+                Image = vm.PicViewer.ImageSource,
+                EXIFOrientation = vm.PicViewer.ExifOrientation
             };
             var imageModel2 = new ImageModel
             {
@@ -227,7 +227,7 @@ public static class SettingsUpdater
             };
             await Dispatcher.UIThread.InvokeAsync(() =>
             {
-                WindowResizing.SetSize(vm.ImageWidth, vm.ImageHeight, preloadValue.ImageModel.PixelWidth,
+                WindowResizing.SetSize(vm.PicViewer.ImageWidth, vm.PicViewer.ImageHeight, preloadValue.ImageModel.PixelWidth,
                     preloadValue.ImageModel.PixelHeight, vm.RotationAngle, vm);
                 TitleManager.SetSideBySideTitle(vm, imageModel1, imageModel2);
             });
@@ -258,7 +258,7 @@ public static class SettingsUpdater
     public static void TurnOffScroll(MainViewModel vm)
     {
         vm.ToggleScrollBarVisibility = ScrollBarVisibility.Disabled;
-        vm.GetIsScrollingTranslation = TranslationManager.Translation.ScrollingDisabled;
+        vm.Translation.IsScrolling = TranslationManager.Translation.ScrollingDisabled;
         vm.IsScrollingEnabled = false;
         Settings.Zoom.ScrollEnabled = false;
         try
@@ -277,7 +277,7 @@ public static class SettingsUpdater
     public static void TurnOnScroll(MainViewModel vm)
     {
         vm.ToggleScrollBarVisibility = ScrollBarVisibility.Visible;
-        vm.GetIsScrollingTranslation = TranslationManager.Translation.ScrollingEnabled;
+        vm.Translation.IsScrolling = TranslationManager.Translation.ScrollingEnabled;
         vm.IsScrollingEnabled = true;
         Settings.Zoom.ScrollEnabled = true;
         try
@@ -301,7 +301,7 @@ public static class SettingsUpdater
         }
         
         Settings.Zoom.CtrlZoom = !Settings.Zoom.CtrlZoom;
-        vm.GetIsCtrlZoomTranslation = Settings.Zoom.CtrlZoom
+        vm.Translation.IsCtrlToZoom = Settings.Zoom.CtrlZoom
             ? TranslationManager.Translation.CtrlToZoom
             : TranslationManager.Translation.ScrollToZoom;
         
@@ -322,7 +322,7 @@ public static class SettingsUpdater
     public static void TurnOffCtrlZoom(MainViewModel vm)
     {
         Settings.Zoom.CtrlZoom = false;
-        vm.GetIsCtrlZoomTranslation = TranslationManager.Translation.ScrollToZoom;
+        vm.Translation.IsCtrlToZoom = TranslationManager.Translation.ScrollToZoom;
         if (!Application.Current.TryGetResource("ScanEyeImage", Application.Current.RequestedThemeVariant, out var scanEyeImage ))
         {
             return;
@@ -341,7 +341,7 @@ public static class SettingsUpdater
         
         var value = !Settings.UIProperties.Looping;
         Settings.UIProperties.Looping = value;
-        vm.GetIsLoopingTranslation = value
+        vm.Translation.IsLooping = value
             ? TranslationManager.Translation.LoopingEnabled
             : TranslationManager.Translation.LoopingDisabled;
         vm.IsLooping = value;
@@ -357,7 +357,7 @@ public static class SettingsUpdater
     public static void TurnOffLooping(MainViewModel vm)
     {
         Settings.UIProperties.Looping = false;
-        vm.GetIsLoopingTranslation = TranslationManager.Translation.LoopingDisabled;
+        vm.Translation.IsLooping = TranslationManager.Translation.LoopingDisabled;
         vm.IsLooping = false;
     }
     

+ 7 - 7
src/PicView.Avalonia/StartUp/QuickLoad.cs

@@ -29,7 +29,7 @@ public static class QuickLoad
             await NavigationManager.LoadPicFromArchiveAsync(file, vm).ConfigureAwait(false);
             return;
         }
-        vm.FileInfo = fileInfo;
+        vm.PicViewer.FileInfo = fileInfo;
         
         var imageModel = await GetImageModel.GetImageModelAsync(fileInfo).ConfigureAwait(false);
         
@@ -37,17 +37,17 @@ public static class QuickLoad
         {
             vm.ImageViewer.MainImage.InitialAnimatedSource = file;
         }
-        vm.ImageSource = imageModel.Image;
-        vm.ImageType = imageModel.ImageType;
+        vm.PicViewer.ImageSource = imageModel.Image;
+        vm.PicViewer.ImageType = imageModel.ImageType;
         vm.ZoomValue = 1;
-        vm.PixelWidth = imageModel.PixelWidth;
-        vm.PixelHeight = imageModel.PixelHeight;
+        vm.PicViewer.PixelWidth = imageModel.PixelWidth;
+        vm.PicViewer.PixelHeight = imageModel.PixelHeight;
         PreLoadValue? secondaryPreloadValue = null;
         if (Settings.ImageScaling.ShowImageSideBySide)
         {
             NavigationManager.InitializeImageIterator(vm);
             secondaryPreloadValue = await NavigationManager.GetNextPreLoadValueAsync();
-            vm.SecondaryImageSource = secondaryPreloadValue?.ImageModel?.Image;
+            vm.PicViewer.SecondaryImageSource = secondaryPreloadValue?.ImageModel?.Image;
         }
         
         // When width and height are the same, it renders image incorrectly at startup,
@@ -147,7 +147,7 @@ public static class QuickLoad
             await Dispatcher.UIThread.InvokeAsync(SetSize, DispatcherPriority.Send);
         }
 
-        vm.ExifOrientation = imageModel.EXIFOrientation;
+        vm.PicViewer.ExifOrientation = imageModel.EXIFOrientation;
         vm.GetIndex = NavigationManager.GetNonZeroIndex;
         
         // Add recent files, except when browsing archive

+ 2 - 2
src/PicView.Avalonia/StartUp/StartUpHelper.cs

@@ -81,7 +81,7 @@ public static class StartUpHelper
         
         ResourceLimits.LimitMemory(new Percentage(90));
 
-        Task.Run(() => LanguageUpdater.UpdateLanguageAsync(vm, settingsExists));
+        Task.Run(() => LanguageUpdater.UpdateLanguageAsync(vm.Translation, vm.PicViewer, settingsExists));
         if (settingsExists)
         {
             Task.Run(() => KeybindingManager.LoadKeybindings(vm.PlatformService));
@@ -309,7 +309,7 @@ public static class StartUpHelper
         vm.GetNavSpeed = Settings.UIProperties.NavSpeed;
         vm.GetSlideshowSpeed = Settings.UIProperties.SlideShowTimer;
         vm.GetZoomSpeed = Settings.Zoom.ZoomSpeed;
-        vm.IsShowingSideBySide = Settings.ImageScaling.ShowImageSideBySide;
+        vm.PicViewer.IsShowingSideBySide = Settings.ImageScaling.ShowImageSideBySide;
         vm.IsBottomGalleryShown = Settings.Gallery.IsBottomGalleryShown;
         vm.IsBottomGalleryShownInHiddenUI = Settings.Gallery.ShowBottomGalleryInHiddenUI;
         vm.IsAvoidingZoomingOut  = Settings.Zoom.AvoidZoomingOut;

+ 28 - 28
src/PicView.Avalonia/UI/FunctionsMapper.cs

@@ -523,11 +523,11 @@ public static class FunctionsMapper
 
     /// <inheritdoc cref="FileManager.OpenWith(string, MainViewModel)" />
     public static async Task OpenWith() =>
-        await Task.Run(() => Vm?.PlatformService?.OpenWith(Vm.FileInfo?.FullName)).ConfigureAwait(false);
+        await Task.Run(() => Vm?.PlatformService?.OpenWith(Vm.PicViewer.FileInfo?.FullName)).ConfigureAwait(false);
     
     /// <inheritdoc cref="FileManager.LocateOnDisk(string, MainViewModel)" />
     public static async Task OpenInExplorer()=>
-        await Task.Run(() => Vm?.PlatformService?.LocateOnDisk(Vm.FileInfo?.FullName)).ConfigureAwait(false);
+        await Task.Run(() => Vm?.PlatformService?.LocateOnDisk(Vm.PicViewer.FileInfo?.FullName)).ConfigureAwait(false);
 
     /// <inheritdoc cref="FileSaverHelper.SaveCurrentFile(MainViewModel)" />
     public static async Task Save() =>
@@ -556,7 +556,7 @@ public static class FunctionsMapper
     
     /// <inheritdoc cref="FileManager.ShowFileProperties(string, MainViewModel)" />
     public static async Task ShowFileProperties() =>
-        await Task.Run(() => Vm?.PlatformService?.ShowFileProperties(Vm.FileInfo?.FullName)).ConfigureAwait(false);
+        await Task.Run(() => Vm?.PlatformService?.ShowFileProperties(Vm.PicViewer.FileInfo?.FullName)).ConfigureAwait(false);
     
     #endregion
 
@@ -564,11 +564,11 @@ public static class FunctionsMapper
 
     /// <inheritdoc cref="ClipboardFileOperations.CopyFileToClipboard(string, MainViewModel)" />
     public static async Task CopyFile() =>
-        await ClipboardFileOperations.CopyFileToClipboard(Vm?.FileInfo?.FullName, Vm).ConfigureAwait(false);
+        await ClipboardFileOperations.CopyFileToClipboard(Vm?.PicViewer.FileInfo?.FullName, Vm).ConfigureAwait(false);
     
     /// <inheritdoc cref="ClipboardTextOperations.CopyTextToClipboard(string)" />
     public static async Task CopyFilePath() => 
-        await ClipboardTextOperations.CopyTextToClipboard(Vm?.FileInfo?.FullName).ConfigureAwait(false);
+        await ClipboardTextOperations.CopyTextToClipboard(Vm?.PicViewer.FileInfo?.FullName).ConfigureAwait(false);
 
     /// <inheritdoc cref="ClipboardImageOperations.CopyImageToClipboard(MainViewModel)" />
     public static async Task CopyImage() => 
@@ -576,15 +576,15 @@ public static class FunctionsMapper
 
     /// <inheritdoc cref="ClipboardImageOperations.CopyBase64ToClipboard(string, MainViewModel)" />
     public static async Task CopyBase64() =>
-        await ClipboardImageOperations.CopyBase64ToClipboard(Vm.FileInfo?.FullName, vm: Vm).ConfigureAwait(false);
+        await ClipboardImageOperations.CopyBase64ToClipboard(Vm.PicViewer.FileInfo?.FullName, vm: Vm).ConfigureAwait(false);
 
     /// <inheritdoc cref="ClipboardFileOperations.Duplicate(string, MainViewModel)" />
     public static async Task DuplicateFile() => 
-        await ClipboardFileOperations.Duplicate(Vm.FileInfo?.FullName, Vm).ConfigureAwait(false);
+        await ClipboardFileOperations.Duplicate(Vm.PicViewer.FileInfo?.FullName, Vm).ConfigureAwait(false);
 
     /// <inheritdoc cref="ClipboardFileOperations.CutFile(string, MainViewModel)" />
     public static async Task CutFile() =>
-        await ClipboardFileOperations.CutFile(Vm.FileInfo.FullName, Vm).ConfigureAwait(false);
+        await ClipboardFileOperations.CutFile(Vm.PicViewer.FileInfo.FullName, Vm).ConfigureAwait(false);
 
     /// <inheritdoc cref="ClipboardPasteOperations.Paste(MainViewModel)" />
     public static async Task Paste() =>
@@ -684,7 +684,7 @@ public static class FunctionsMapper
             return;
         }
 
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 0); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 0); });
         Vm.EXIFRating = 0;
     }
 
@@ -696,7 +696,7 @@ public static class FunctionsMapper
             return;
         }
 
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 1); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 1); });
         Vm.EXIFRating = 1;
     }
 
@@ -707,7 +707,7 @@ public static class FunctionsMapper
         {
             return;
         }
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 2); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 2); });
         Vm.EXIFRating = 2;
     }
 
@@ -718,7 +718,7 @@ public static class FunctionsMapper
         {
             return;
         }
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 3); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 3); });
         Vm.EXIFRating = 3;
     }
 
@@ -729,7 +729,7 @@ public static class FunctionsMapper
         {
             return;
         }
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 4); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 4); });
         Vm.EXIFRating = 4;
     }
 
@@ -740,7 +740,7 @@ public static class FunctionsMapper
         {
             return;
         }
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 5); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 5); });
         Vm.EXIFRating = 5;
     }
 
@@ -755,12 +755,12 @@ public static class FunctionsMapper
         {
             return;
         }
-        if (string.IsNullOrEmpty(Vm.GoogleLink))
+        if (string.IsNullOrEmpty(Vm.Exif.GoogleLink))
         {
             return;
         }
 
-        await Task.Run(() => ProcessHelper.OpenLink(Vm.GoogleLink));
+        await Task.Run(() => ProcessHelper.OpenLink(Vm.Exif.GoogleLink));
     }
     
     public static async Task OpenBingMaps()
@@ -770,12 +770,12 @@ public static class FunctionsMapper
         {
             return;
         }
-        if (string.IsNullOrEmpty(Vm.BingLink))
+        if (string.IsNullOrEmpty(Vm.Exif.BingLink))
         {
             return;
         }
 
-        await Task.Run(() => ProcessHelper.OpenLink(Vm.BingLink));
+        await Task.Run(() => ProcessHelper.OpenLink(Vm.Exif.BingLink));
     }
 
     #endregion
@@ -786,25 +786,25 @@ public static class FunctionsMapper
         await SetAsWallpaperFilled();
 
     public static async Task SetAsWallpaperTiled() =>
-        await Task.Run(() => Vm.PlatformService.SetAsWallpaper(Vm.FileInfo.FullName, 0)).ConfigureAwait(false);
+        await Task.Run(() => Vm.PlatformService.SetAsWallpaper(Vm.PicViewer.FileInfo.FullName, 0)).ConfigureAwait(false);
     
     public static async Task SetAsWallpaperCentered() =>
-        await Task.Run(() => Vm.PlatformService.SetAsWallpaper(Vm.FileInfo.FullName, 1)).ConfigureAwait(false);
+        await Task.Run(() => Vm.PlatformService.SetAsWallpaper(Vm.PicViewer.FileInfo.FullName, 1)).ConfigureAwait(false);
     
     public static async Task SetAsWallpaperStretched() =>
-        await Task.Run(() => Vm.PlatformService.SetAsWallpaper(Vm.FileInfo.FullName, 2)).ConfigureAwait(false);
+        await Task.Run(() => Vm.PlatformService.SetAsWallpaper(Vm.PicViewer.FileInfo.FullName, 2)).ConfigureAwait(false);
     
     public static async Task SetAsWallpaperFitted() =>
-        await Task.Run(() => Vm.PlatformService.SetAsWallpaper(Vm.FileInfo.FullName, 3)).ConfigureAwait(false);
+        await Task.Run(() => Vm.PlatformService.SetAsWallpaper(Vm.PicViewer.FileInfo.FullName, 3)).ConfigureAwait(false);
     
     public static async Task SetAsWallpaperFilled() =>
-        await Task.Run(() => Vm.PlatformService.SetAsWallpaper(Vm.FileInfo.FullName, 4)).ConfigureAwait(false);
+        await Task.Run(() => Vm.PlatformService.SetAsWallpaper(Vm.PicViewer.FileInfo.FullName, 4)).ConfigureAwait(false);
     
     public static async Task SetAsLockscreenCentered() =>
-        await Task.Run(() => Vm.PlatformService.SetAsLockScreen(Vm.FileInfo.FullName)).ConfigureAwait(false);
+        await Task.Run(() => Vm.PlatformService.SetAsLockScreen(Vm.PicViewer.FileInfo.FullName)).ConfigureAwait(false);
     
     public static async Task SetAsLockScreen() =>
-        await Task.Run(() => Vm.PlatformService.SetAsLockScreen(Vm.FileInfo.FullName)).ConfigureAwait(false);
+        await Task.Run(() => Vm.PlatformService.SetAsLockScreen(Vm.PicViewer.FileInfo.FullName)).ConfigureAwait(false);
 
     #endregion
 
@@ -819,11 +819,11 @@ public static class FunctionsMapper
         // TODO: Needs refactoring into its own method
         var openFile = string.Empty;
         var getFromArgs = false;
-        if (Vm?.FileInfo is not null)
+        if (Vm?.PicViewer.FileInfo is not null)
         {
-            if (Vm.FileInfo.Exists)
+            if (Vm.PicViewer.FileInfo.Exists)
             {
-                openFile = Vm.FileInfo.FullName;
+                openFile = Vm.PicViewer.FileInfo.FullName;
             }
             else
             {

+ 6 - 6
src/PicView.Avalonia/UI/HideInterfaceLogic.cs

@@ -26,7 +26,7 @@ public static class HideInterfaceLogic
             Settings.UIProperties.ShowInterface = false;
             vm.IsTopToolbarShown = false;
             vm.IsBottomToolbarShown = false;
-            vm.GetIsShowingUITranslation = TranslationManager.Translation.ShowUI;
+            vm.Translation.IsShowingUI = TranslationManager.Translation.ShowUI;
             if (!GalleryFunctions.IsFullGalleryOpen)
             {
                 if (!Settings.Gallery.ShowBottomGalleryInHiddenUI)
@@ -51,7 +51,7 @@ public static class HideInterfaceLogic
         {
             vm.IsUIShown = true;
             vm.IsTopToolbarShown = true;
-            vm.GetIsShowingUITranslation = TranslationManager.Translation.HideUI;
+            vm.Translation.IsShowingUI = TranslationManager.Translation.HideUI;
             if (Settings.UIProperties.ShowBottomNavBar)
             {
                 vm.IsBottomToolbarShown = true;
@@ -73,7 +73,7 @@ public static class HideInterfaceLogic
                                 GalleryFunctions.OpenBottomGallery(vm);
                             }
                         });
-                        _ = GalleryLoad.LoadGallery(vm, vm.FileInfo.DirectoryName);
+                        _ = GalleryLoad.LoadGallery(vm, vm.PicViewer.FileInfo.DirectoryName);
                     }
 
                     vm.IsBottomGalleryShown = true;
@@ -100,14 +100,14 @@ public static class HideInterfaceLogic
         {
             vm.IsBottomToolbarShown = false;
             Settings.UIProperties.ShowBottomNavBar = false;
-            vm.GetIsShowingBottomToolbarTranslation = TranslationManager.Translation.ShowBottomToolbar;
+            vm.Translation.IsShowingBottomToolbar = TranslationManager.Translation.ShowBottomToolbar;
         }
         else
         {
             vm.IsBottomToolbarShown = true;
             Settings.UIProperties.ShowBottomNavBar = true;
             vm.BottombarHeight = SizeDefaults.BottombarHeight;
-            vm.GetIsShowingBottomToolbarTranslation = TranslationManager.Translation.HideBottomToolbar;
+            vm.Translation.IsShowingBottomToolbar = TranslationManager.Translation.HideBottomToolbar;
         }
         await Dispatcher.UIThread.InvokeAsync(() =>
         {
@@ -287,7 +287,7 @@ public static class HideInterfaceLogic
         Settings.UIProperties.ShowAltInterfaceButtons = !Settings
             .UIProperties.ShowAltInterfaceButtons;
         
-        vm.GetIsShowingFadingUIButtonsTranslation = Settings.UIProperties.ShowAltInterfaceButtons
+        vm.Translation.IsShowingFadingUIButtons = Settings.UIProperties.ShowAltInterfaceButtons
             ? TranslationManager.Translation.DisableFadeInButtonsOnHover
             : TranslationManager.Translation.ShowFadeInButtonsOnHover;
         

+ 16 - 16
src/PicView.Avalonia/UI/TitleManager.cs

@@ -37,7 +37,7 @@ public static class TitleManager
             }
 
             var singleImageWindowTitles =
-                ImageTitleFormatter.GenerateTitleForSingleImage(vm.PixelWidth, vm.PixelWidth, title, vm.ZoomValue);
+                ImageTitleFormatter.GenerateTitleForSingleImage(vm.PicViewer.PixelWidth, vm.PicViewer.PixelWidth, title, vm.ZoomValue);
             vm.WindowTitle = singleImageWindowTitles.BaseTitle;
             vm.Title = singleImageWindowTitles.TitleWithAppName;
             vm.TitleTooltip = singleImageWindowTitles.TitleWithAppName;
@@ -46,8 +46,8 @@ public static class TitleManager
 
         if (NavigationManager.TiffNavigationInfo is not null)
         {
-            SetTiffTitle(NavigationManager.TiffNavigationInfo, vm.PixelWidth, vm.PixelHeight,
-                NavigationManager.GetCurrentIndex, vm.FileInfo, vm);
+            SetTiffTitle(NavigationManager.TiffNavigationInfo, vm.PicViewer.PixelWidth, vm.PicViewer.PixelHeight,
+                NavigationManager.GetCurrentIndex, vm.PicViewer.FileInfo, vm);
             return;
         }
 
@@ -55,9 +55,9 @@ public static class TitleManager
         {
             var imageModel1 = new ImageModel
             {
-                FileInfo = vm.FileInfo,
-                PixelWidth = vm.PixelWidth,
-                PixelHeight = vm.PixelHeight
+                FileInfo = vm.PicViewer.FileInfo,
+                PixelWidth = vm.PicViewer.PixelWidth,
+                PixelHeight = vm.PicViewer.PixelHeight
             };
             var nextFileName = NavigationManager.GetNextFileName;
             using var magickImage = new MagickImage();
@@ -72,9 +72,9 @@ public static class TitleManager
             return;
         }
 
-        var windowTitles = ImageTitleFormatter.GenerateTitleStrings(vm.PixelWidth, vm.PixelHeight,
+        var windowTitles = ImageTitleFormatter.GenerateTitleStrings(vm.PicViewer.PixelWidth, vm.PicViewer.PixelHeight,
             NavigationManager.GetCurrentIndex,
-            vm.FileInfo, vm.ZoomValue, NavigationManager.GetCollection);
+            vm.PicViewer.FileInfo, vm.ZoomValue, NavigationManager.GetCollection);
         vm.WindowTitle = windowTitles.TitleWithAppName;
         vm.Title = windowTitles.BaseTitle;
         vm.TitleTooltip = windowTitles.FilePathTitle;
@@ -102,16 +102,16 @@ public static class TitleManager
     {
         if (!ValidateImageModel(imageModel, vm))
         {
-            if (vm.FileInfo is null)
+            if (vm.PicViewer.FileInfo is null)
             {
                 ReturnError(vm);
                 return;
             }
             imageModel = new ImageModel
             {
-                FileInfo = vm.FileInfo,
-                PixelWidth = vm.PixelWidth,
-                PixelHeight = vm.PixelHeight
+                FileInfo = vm.PicViewer.FileInfo,
+                PixelWidth = vm.PicViewer.PixelWidth,
+                PixelHeight = vm.PicViewer.PixelHeight
             };
         }
 
@@ -200,15 +200,15 @@ public static class TitleManager
         // Fix image models, which can be null caused by race conditions?
         if (!ValidateImageModel(imageModel1, vm))
         {
-            if (vm.FileInfo is null)
+            if (vm.PicViewer.FileInfo is null)
             {
                 return;
             }
             imageModel1 = new ImageModel
             {
-                FileInfo = vm.FileInfo,
-                PixelWidth = vm.PixelWidth,
-                PixelHeight = vm.PixelHeight
+                FileInfo = vm.PicViewer.FileInfo,
+                PixelWidth = vm.PicViewer.PixelWidth,
+                PixelHeight = vm.PicViewer.PixelHeight
             };
         }
         if (!ValidateImageModel(imageModel2, vm))

+ 294 - 0
src/PicView.Avalonia/ViewModels/ExifViewModel.cs

@@ -0,0 +1,294 @@
+using ReactiveUI;
+
+namespace PicView.Avalonia.ViewModels;
+
+public class ExifViewModel : ReactiveObject
+{
+    public double DpiX
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public double DpiY
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+    
+    public string? PrintSizeInch
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? PrintSizeCm
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? SizeMp
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Resolution
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? BitDepth
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? AspectRatio
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Latitude
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Longitude
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Altitude
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? GoogleLink
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? BingLink
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Authors
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? DateTaken
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Copyright
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Title
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Subject
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Software
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? ResolutionUnit
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? ColorRepresentation
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Compression
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? CompressedBitsPixel
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? CameraMaker
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? CameraModel
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? ExposureProgram
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? ExposureTime
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? ExposureBias
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? FNumber
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? MaxAperture
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? DigitalZoom
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? FocalLength35Mm
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? FocalLength
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? ISOSpeed
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? MeteringMode
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Contrast
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Saturation
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Sharpness
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? WhiteBalance
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? FlashMode
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? FlashEnergy
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? LightSource
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Brightness
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? PhotometricInterpretation
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? Orientation
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? ExifVersion
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? LensModel
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public string? LensMaker
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }    
+}

+ 4 - 14
src/PicView.Avalonia/ViewModels/ImageCropperViewModel.cs

@@ -13,13 +13,12 @@ using ReactiveUI;
 
 namespace PicView.Avalonia.ViewModels;
 
-public class ImageCropperViewModel : ViewModelBase
+public class ImageCropperViewModel : ReactiveObject
 {
     public ImageCropperViewModel(Bitmap bitmap)
     {
         Bitmap = bitmap;
         InitializeCommands();
-        InitializeTranslations();
     }
 
     private void InitializeCommands()
@@ -28,15 +27,6 @@ public class ImageCropperViewModel : ViewModelBase
         CopyCropImageCommand = ReactiveCommand.CreateFromTask(CopyCroppedImageAsync);
         CloseCropCommand = ReactiveCommand.Create(HandleCloseCrop);
     }
-
-    private void InitializeTranslations()
-    {
-        Crop = TranslationManager.Translation.CropPicture;
-        Copy = TranslationManager.Translation.CopyImage;
-        Close = TranslationManager.Translation.Close;
-        Width = TranslationManager.Translation.Width;
-        Height = TranslationManager.Translation.Height;
-    }
     
     public ReactiveCommand<Unit, Unit>? CropImageCommand { get; private set; }
     public ReactiveCommand<Unit, Unit>? CopyCropImageCommand { get; private set; }
@@ -136,7 +126,7 @@ public class ImageCropperViewModel : ViewModelBase
         
         CropFunctions.CloseCropControl(vm);
 
-        if (vm.FileInfo.FullName == saveFileDialog)
+        if (vm.PicViewer.FileInfo.FullName == saveFileDialog)
         {
             await ErrorHandling.ReloadAsync(vm);
         }
@@ -145,7 +135,7 @@ public class ImageCropperViewModel : ViewModelBase
     private async Task CopyCroppedImageAsync()
     {
         if (UIHelper.GetMainView.DataContext is not MainViewModel vm) return;
-        if (vm.ImageSource is not Bitmap sourceBitmap) return;
+        if (vm.PicViewer.ImageSource is not Bitmap sourceBitmap) return;
 
         var x = Convert.ToInt32(SelectionX / AspectRatio);
         var y = Convert.ToInt32(SelectionY / AspectRatio);
@@ -161,7 +151,7 @@ public class ImageCropperViewModel : ViewModelBase
     }
 
     private (string fileName, FileInfo fileInfo, Bitmap? bitmap) PrepareCropData(MainViewModel vm)
-      => NavigationManager.IsCollectionEmpty ? CreateNewCroppedImage() : (vm.FileInfo.FullName, vm.FileInfo, null);
+      => NavigationManager.IsCollectionEmpty ? CreateNewCroppedImage() : (vm.PicViewer.FileInfo.FullName, vm.PicViewer.FileInfo, null);
 
     private (string fileName, FileInfo fileInfo, Bitmap bitmap) CreateNewCroppedImage()
     {

+ 49 - 450
src/PicView.Avalonia/ViewModels/MainViewModel.cs

@@ -8,11 +8,10 @@ using PicView.Avalonia.Clipboard;
 using PicView.Avalonia.Converters;
 using PicView.Avalonia.FileSystem;
 using PicView.Avalonia.Gallery;
-using PicView.Avalonia.ImageEffects;
-using PicView.Avalonia.ImageHandling;
 using PicView.Avalonia.ImageTransformations;
 using PicView.Avalonia.Interfaces;
 using PicView.Avalonia.LockScreen;
+using PicView.Avalonia.Navigation;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.Wallpaper;
 using PicView.Avalonia.WindowBehavior;
@@ -26,9 +25,16 @@ using ImageViewer = PicView.Avalonia.Views.ImageViewer;
 
 namespace PicView.Avalonia.ViewModels;
 
-public class MainViewModel : ViewModelBase
+public class MainViewModel : ReactiveObject
 {
     public readonly IPlatformSpecificService? PlatformService;
+    public ImageCropperViewModel? Crop { get; set; }
+    
+    public TranslationViewModel Translation { get; } = new();
+    
+    public PicViewerModel PicViewer { get; } = new();
+    
+    public ExifViewModel Exif { get; } = new();
 
     public MainViewModel(IPlatformSpecificService? platformSpecificService)
     {
@@ -285,82 +291,6 @@ public class MainViewModel : ViewModelBase
         // Only use for unit test
     }
 
-    #region Image
-
-    public object? ImageSource
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public object? SecondaryImageSource
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public ImageType ImageType
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public double ImageWidth
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public double ImageHeight
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public double SecondaryImageWidth
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public Brush? ImageBackground
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public bool IsShowingSideBySide
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public double ScrollViewerWidth
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    } = double.NaN;
-
-    public double ScrollViewerHeight
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    } = double.NaN;
-
-    public double AspectRatio
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public ImageEffectConfig? EffectConfig
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    #endregion
-
     #region Gallery
 
     public Thickness GalleryMargin
@@ -427,19 +357,19 @@ public class MainViewModel : ViewModelBase
     {
         get
         {
-            if (!SettingsManager.Settings.Gallery.IsBottomGalleryShown)
+            if (!Settings.Gallery.IsBottomGalleryShown)
             {
                 return 0;
             }
 
-            if (SettingsManager.Settings.WindowProperties.Fullscreen)
+            if (Settings.WindowProperties.Fullscreen)
             {
-                return SettingsManager.Settings.Gallery.IsBottomGalleryShown
+                return Settings.Gallery.IsBottomGalleryShown
                     ? GetBottomGalleryItemHeight + SizeDefaults.ScrollbarSize
                     : 0;
             }
 
-            if (!SettingsManager.Settings.Gallery.ShowBottomGalleryInHiddenUI && !IsUIShown)
+            if (!Settings.Gallery.ShowBottomGalleryInHiddenUI && !IsUIShown)
             {
                 return 0;
             }
@@ -739,6 +669,22 @@ public class MainViewModel : ViewModelBase
     #endregion Commands
 
     #region Fields
+    
+    #region Sorting Order
+
+    public FileListHelper.SortFilesBy SortOrder
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public bool IsAscending
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    #endregion Sorting Order
 
     #region Booleans
 
@@ -759,7 +705,7 @@ public class MainViewModel : ViewModelBase
         get;
         set
         {
-            SettingsManager.Settings.Zoom.AvoidZoomingOut = value;
+            Settings.Zoom.AvoidZoomingOut = value;
             this.RaiseAndSetIfChanged(ref field, value);
         }
     }
@@ -858,7 +804,7 @@ public class MainViewModel : ViewModelBase
         set
         {
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.ImageScaling.StretchImage = value;
+            Settings.ImageScaling.StretchImage = value;
             WindowResizing.SetSize(this);
         }
     }
@@ -881,7 +827,7 @@ public class MainViewModel : ViewModelBase
         set
         {
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.WindowProperties.KeepCentered = value;
+            Settings.WindowProperties.KeepCentered = value;
         }
     }
 
@@ -891,7 +837,7 @@ public class MainViewModel : ViewModelBase
         set
         {
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.UIProperties.OpenInSameWindow = value;
+            Settings.UIProperties.OpenInSameWindow = value;
         }
     }
 
@@ -901,7 +847,7 @@ public class MainViewModel : ViewModelBase
         set
         {
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.UIProperties.ShowConfirmationOnEsc = value;
+            Settings.UIProperties.ShowConfirmationOnEsc = value;
         }
     }
 
@@ -917,11 +863,17 @@ public class MainViewModel : ViewModelBase
         set
         {
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.Zoom.IsUsingTouchPad = value;
+            Settings.Zoom.IsUsingTouchPad = value;
         }
     }
 
     #endregion Booleans
+    
+    public Brush? ImageBackground
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
 
     public Thickness TopScreenMargin
     {
@@ -964,13 +916,6 @@ public class MainViewModel : ViewModelBase
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
 
-    // Used to flip the flip button
-    public int ScaleX
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    } = 1;
-
     public UserControl? CurrentView
     {
         get;
@@ -998,7 +943,7 @@ public class MainViewModel : ViewModelBase
         {
             var roundedValue = Math.Round(value, 2);
             this.RaiseAndSetIfChanged(ref field, roundedValue);
-            SettingsManager.Settings.UIProperties.SlideShowTimer = roundedValue;
+            Settings.UIProperties.SlideShowTimer = roundedValue;
         }
     }
 
@@ -1008,7 +953,7 @@ public class MainViewModel : ViewModelBase
         set
         {
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.UIProperties.NavSpeed = value;
+            Settings.UIProperties.NavSpeed = value;
         }
     }
 
@@ -1019,344 +964,10 @@ public class MainViewModel : ViewModelBase
         {
             var roundedValue = Math.Round(value, 2);
             this.RaiseAndSetIfChanged(ref field, roundedValue);
-            SettingsManager.Settings.Zoom.ZoomSpeed = roundedValue;
+            Settings.Zoom.ZoomSpeed = roundedValue;
         }
     }
-
-    #region strings
-
-    public string? GetIsShowingUITranslation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetIsShowingBottomToolbarTranslation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetIsShowingFadingUIButtonsTranslation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetIsUsingTouchpadTranslation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetIsFlippedTranslation
-    {
-        get => ScaleX == -1 ? UnFlip : Flip;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetIsShowingBottomGalleryTranslation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetIsLoopingTranslation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetIsScrollingTranslation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetIsCtrlZoomTranslation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetPrintSizeInch
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetPrintSizeCm
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetSizeMp
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetResolution
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetBitDepth
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetAspectRatio
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetLatitude
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetLongitude
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetAltitude
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GoogleLink
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? BingLink
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetAuthors
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetDateTaken
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetCopyright
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetTitle
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetSubject
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetSoftware
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetResolutionUnit
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetColorRepresentation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetCompression
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetCompressedBitsPixel
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetCameraMaker
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetCameraModel
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetExposureProgram
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetExposureTime
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetExposureBias
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetFNumber
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetMaxAperture
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetDigitalZoom
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetFocalLength35Mm
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetFocalLength
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetISOSpeed
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetMeteringMode
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetContrast
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetSaturation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetSharpness
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetWhiteBalance
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetFlashMode
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetFlashEnergy
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetLightSource
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetBrightness
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetPhotometricInterpretation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetOrientation
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetExifVersion
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetLensModel
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public string? GetLensMaker
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    #endregion strings
-
+    
     #region Window Properties
 
     public string? Title
@@ -1455,21 +1066,7 @@ public class MainViewModel : ViewModelBase
 
     #region Methods
 
-    #region Sorting Order
-
-    public FileListHelper.SortFilesBy SortOrder
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    public bool IsAscending
-    {
-        get;
-        set => this.RaiseAndSetIfChanged(ref field, value);
-    }
-
-    #endregion Sorting Order
+    #region Tasks
 
     private async Task ResizeImageByPercentage(int percentage) =>
         await ConversionHelper.ResizeImageByPercentage(percentage, this).ConfigureAwait(false);
@@ -1534,7 +1131,9 @@ public class MainViewModel : ViewModelBase
     private void SetGalleryItemStretch(string value) => GalleryHelper.SetGalleryItemStretch(value, this);
 
     public async Task StartSlideShowTask(int milliseconds) =>
-        await Avalonia.Navigation.Slideshow.StartSlideshow(this, milliseconds);
+        await Slideshow.StartSlideshow(this, milliseconds);
+    
+    #endregion
 
     #endregion Methods
 }

+ 119 - 0
src/PicView.Avalonia/ViewModels/PicViewerModel.cs

@@ -0,0 +1,119 @@
+using PicView.Avalonia.ImageEffects;
+using PicView.Avalonia.ImageHandling;
+using PicView.Core.ImageDecoding;
+using ReactiveUI;
+
+namespace PicView.Avalonia.ViewModels;
+
+public class PicViewerModel : ReactiveObject
+{
+    public FileInfo? FileInfo
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+    
+    /// <summary>
+    /// The image's pixel width
+    /// </summary>
+    public int PixelWidth
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    /// <summary>
+    /// The image's pixel height
+    /// </summary>
+    public int PixelHeight
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+    
+    
+    public object? ImageSource
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public object? SecondaryImageSource
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public ImageType ImageType
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    /// <summary>
+    /// The width to scale the image to
+    /// </summary>
+    public double ImageWidth
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    /// <summary>
+    /// The height to scale the image to
+    /// </summary>
+    public double ImageHeight
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public double SecondaryImageWidth
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public bool IsShowingSideBySide
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public double ScrollViewerWidth
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    } = double.NaN;
+
+    public double ScrollViewerHeight
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    } = double.NaN;
+
+    public double AspectRatio
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public ImageEffectConfig? EffectConfig
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+
+    public EXIFHelper.EXIFOrientation? ExifOrientation
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+    
+    // Used to flip the flip button
+    public int ScaleX
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    } = 1;
+}

+ 45 - 32
src/PicView.Avalonia/ViewModels/ViewModelBase.cs → src/PicView.Avalonia/ViewModels/TranslationViewModel.cs

@@ -1,20 +1,17 @@
 using PicView.Core.Extensions;
-using PicView.Core.ImageDecoding;
 using PicView.Core.Localization;
 using ReactiveUI;
 
 namespace PicView.Avalonia.ViewModels;
 
-public class ViewModelBase : ReactiveObject
+public class TranslationViewModel : ReactiveObject
 {
-    #region Localization
-
     public void UpdateLanguage()
     {
         File = TranslationManager.Translation.File;
         SelectFile = TranslationManager.Translation.OpenFileDialog;
         OpenLastFile = TranslationManager.Translation.OpenLastFile;
-        FilePaste = TranslationManager.Translation.FilePaste;
+        Paste = TranslationManager.Translation.FilePaste;
         Copy = TranslationManager.Translation.Copy;
         Reload = TranslationManager.Translation.Reload;
         Print = TranslationManager.Translation.Print;
@@ -98,7 +95,7 @@ public class ViewModelBase : ReactiveObject
         CompressedBitsPixel = TranslationManager.Translation.CompressedBitsPixel;
         Compression = TranslationManager.Translation.Compression;
         ExposureTime = TranslationManager.Translation.ExposureTime;
-        XPTitle = TranslationManager.Translation.Title;
+        Title = TranslationManager.Translation.Title;
         Subject = TranslationManager.Translation.Subject;
         Software = TranslationManager.Translation.Software;
         CameraMaker = TranslationManager.Translation.CameraMaker;
@@ -135,7 +132,7 @@ public class ViewModelBase : ReactiveObject
         RecentFiles = TranslationManager.Translation.RecentFiles;
         SetAsWallpaper = TranslationManager.Translation.SetAsWallpaper;
         SetAsLockScreenImage = TranslationManager.Translation.SetAsLockScreenImage;
-        ImageTxt = TranslationManager.Translation.Image;
+        Image = TranslationManager.Translation.Image;
         CopyImage = TranslationManager.Translation.CopyImage;
         FileCopyPath = TranslationManager.Translation.FileCopyPath;
         FileCut = TranslationManager.Translation.Cut;
@@ -184,7 +181,7 @@ public class ViewModelBase : ReactiveObject
         InterfaceConfiguration = TranslationManager.Translation.InterfaceConfiguration;
         FileManagement = TranslationManager.Translation.FileManagement;
         ToggleFullscreen = TranslationManager.Translation.ToggleFullscreen;
-        FullscreenTxt = TranslationManager.Translation.Fullscreen;
+        Fullscreen = TranslationManager.Translation.Fullscreen;
         ShowImageGallery = TranslationManager.Translation.ShowImageGallery;
         WindowManagement = TranslationManager.Translation.WindowManagement;
         CenterWindow = TranslationManager.Translation.CenterWindow;
@@ -270,7 +267,7 @@ public class ViewModelBase : ReactiveObject
         Maximize = TranslationManager.Translation.Maximize;
     }
 
-    #region Strings
+    #region Static Translation Strings
     
     public string? Maximize
     {
@@ -548,7 +545,7 @@ public class ViewModelBase : ReactiveObject
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
 
-    public string? FullscreenTxt
+    public string? Fullscreen
     {
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
@@ -1070,7 +1067,7 @@ public class ViewModelBase : ReactiveObject
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
 
-    public string? ImageTxt
+    public string? Image
     {
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
@@ -1286,7 +1283,7 @@ public class ViewModelBase : ReactiveObject
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
 
-    public string? XPTitle
+    public string? Title
     {
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
@@ -1388,7 +1385,7 @@ public class ViewModelBase : ReactiveObject
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
 
-    public string? FilePaste
+    public string? Paste
     {
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
@@ -1826,47 +1823,63 @@ public class ViewModelBase : ReactiveObject
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
 
-    #endregion Strings
-
-    #endregion Localization
-
-    #region Image
-
-    public FileInfo? FileInfo
+    #endregion strings
+    
+    #region Dynamic Translation strings
+    
+    public string? IsFlipped
     {
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
-
-    public int PixelWidth
+    
+    public string? IsShowingUI
     {
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
-
-    public int PixelHeight
+    
+    public string? IsScrolling
     {
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
-
-    public double DpiX
+    
+    public string? IsCtrlToZoom
     {
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
-
-    public double DpiY
+    
+    public string? IsLooping
     {
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
-
-    public EXIFHelper.EXIFOrientation? ExifOrientation
+    
+    public string? IsShowingBottomGallery
     {
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
-
-    #endregion Image
+    
+    public string? IsShowingBottomToolbar
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+    
+    public string? IsShowingFadingUIButtons
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+    
+    public string? IsUsingTouchpad
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
+    
+    #endregion
 }

+ 5 - 5
src/PicView.Avalonia/Views/AboutView.axaml

@@ -131,7 +131,7 @@
                     <TextBlock
                         Classes="txt"
                         Foreground="{StaticResource SecondaryTextColor}"
-                        Text="{CompiledBinding GithubRepo}" />
+                        Text="{CompiledBinding Translation.GithubRepo}" />
                     <Path
                         Data="M256,32C132.3,32,32,134.9,32,261.7c0,101.5,64.2,187.5,153.2,217.9a17.56,17.56,0,0,0,3.8.4c8.3,0,11.5-6.1,11.5-11.4,0-5.5-.2-19.9-.3-39.1a102.4,102.4,0,0,1-22.6,2.7c-43.1,0-52.9-33.5-52.9-33.5-10.2-26.5-24.9-33.6-24.9-33.6-19.5-13.7-.1-14.1,1.4-14.1h.1c22.5,2,34.3,23.8,34.3,23.8,11.2,19.6,26.2,25.1,39.6,25.1a63,63,0,0,0,25.6-6c2-14.8,7.8-24.9,14.2-30.7-49.7-5.8-102-25.5-102-113.5,0-25.1,8.7-45.6,23-61.6-2.3-5.8-10-29.2,2.2-60.8a18.64,18.64,0,0,1,5-.5c8.1,0,26.4,3.1,56.6,24.1a208.21,208.21,0,0,1,112.2,0c30.2-21,48.5-24.1,56.6-24.1a18.64,18.64,0,0,1,5,.5c12.2,31.6,4.5,55,2.2,60.8,14.3,16.1,23,36.6,23,61.6,0,88.2-52.4,107.6-102.3,113.3,8,7.1,15.2,21.1,15.2,42.5,0,30.7-.3,55.5-.3,63,0,5.4,3.1,11.5,11.4,11.5a19.35,19.35,0,0,0,4-.4C415.9,449.2,480,363.1,480,261.7,480,134.9,379.7,32,256,32Z"
                         Fill="{StaticResource SecondaryTextColor}"
@@ -164,7 +164,7 @@
                 HorizontalAlignment="Center"
                 Margin="0,2,0,2"
                 NavigateUri="https://github.com/Ruben2776/PicView?tab=License-1-ov-file#readme"
-                ToolTip.Tip="{CompiledBinding ViewLicenseFile}">
+                ToolTip.Tip="{CompiledBinding Translation.ViewLicenseFile}">
                 <TextBlock
                     Classes="txt"
                     Foreground="{StaticResource SecondaryTextColor}"
@@ -176,7 +176,7 @@
                 Foreground="{StaticResource SecondaryTextColor}"
                 HorizontalAlignment="Center"
                 Margin="0,25,0,10">
-                <Run FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto" Text="{CompiledBinding Version}" />
+                <Run FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto" Text="{CompiledBinding Translation.Version}" />
                 <Run Text="" x:Name="AppVersion" />
             </TextBlock>
 
@@ -185,7 +185,7 @@
                 HorizontalAlignment="Center"
                 Margin="0,10,0,15"
                 x:Name="UpdateButton">
-                <TextBlock Classes="txt" Text="{CompiledBinding CheckForUpdates}" />
+                <TextBlock Classes="txt" Text="{CompiledBinding Translation.CheckForUpdates}" />
             </Button>
 
             <HyperlinkButton
@@ -203,7 +203,7 @@
                 Foreground="{StaticResource SecondaryTextColor}"
                 HorizontalAlignment="Center"
                 Margin="0,5,0,5"
-                Text="{CompiledBinding Credits}" />
+                Text="{CompiledBinding Translation.Credits}" />
 
             <HyperlinkButton
                 HorizontalAlignment="Center"

+ 11 - 11
src/PicView.Avalonia/Views/AppearanceView.axaml

@@ -20,7 +20,7 @@
             FontSize="14"
             Foreground="{StaticResource SecondaryTextColor}"
             Margin="0,20,0,20"
-            Text="{CompiledBinding Theme,
+            Text="{CompiledBinding Translation.Theme,
                                    Mode=OneWay}" />
 
         <ComboBox
@@ -33,9 +33,9 @@
             Padding="5,7,0,7"
             Width="300"
             x:Name="ThemeBox">
-            <ComboBoxItem Content="{CompiledBinding DarkTheme, Mode=OneWay}" x:Name="DarkThemeBox" />
-            <ComboBoxItem Content="{CompiledBinding LightTheme, Mode=OneWay}" x:Name="LightThemeBox" />
-            <ComboBoxItem Content="{CompiledBinding GlassTheme, Mode=OneWay}" x:Name="GlassThemeBox" />
+            <ComboBoxItem Content="{CompiledBinding Translation.DarkTheme, Mode=OneWay}" x:Name="DarkThemeBox" />
+            <ComboBoxItem Content="{CompiledBinding Translation.LightTheme, Mode=OneWay}" x:Name="LightThemeBox" />
+            <ComboBoxItem Content="{CompiledBinding Translation.GlassTheme, Mode=OneWay}" x:Name="GlassThemeBox" />
         </ComboBox>
 
         <Button
@@ -47,7 +47,7 @@
                 FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
                 Foreground="{StaticResource SecondaryTextColor}"
                 Padding="5"
-                Text="{CompiledBinding ChangingThemeRequiresRestart,
+                Text="{CompiledBinding Translation.ChangingThemeRequiresRestart,
                                        Mode=OneWay}" />
         </Button>
 
@@ -57,7 +57,7 @@
             FontSize="14"
             Foreground="{StaticResource SecondaryTextColor}"
             Margin="0,5,0,20"
-            Text="{CompiledBinding HighlightColor,
+            Text="{CompiledBinding Translation.HighlightColor,
                                    Mode=OneWay}" />
 
         <WrapPanel
@@ -164,7 +164,7 @@
             FontSize="14"
             Foreground="{StaticResource SecondaryTextColor}"
             Margin="0,20,0,10"
-            Text="{CompiledBinding ChangeBackground,
+            Text="{CompiledBinding Translation.ChangeBackground,
                                    Mode=OneWay}" />
 
         <WrapPanel
@@ -272,7 +272,7 @@
             FontSize="14"
             Foreground="{StaticResource SecondaryTextColor}"
             Margin="0,20,0,10"
-            Text="{CompiledBinding InterfaceConfiguration,
+            Text="{CompiledBinding Translation.InterfaceConfiguration,
                                    Mode=OneWay}" />
 
 
@@ -331,7 +331,7 @@
                     Margin="0"
                     MaxWidth="240"
                     Padding="0,1,5,0"
-                    Text="{CompiledBinding GetIsShowingBottomToolbarTranslation,
+                    Text="{CompiledBinding Translation.IsShowingBottomToolbar,
                                            Mode=OneWay}" />
             </StackPanel>
         </Button>
@@ -439,7 +439,7 @@
                     Margin="0"
                     MaxWidth="240"
                     Padding="0,1,5,0"
-                    Text="{CompiledBinding GetIsShowingUITranslation,
+                    Text="{CompiledBinding Translation.IsShowingUI,
                                            Mode=OneWay}" />
             </StackPanel>
         </Button>
@@ -491,7 +491,7 @@
                     Margin="0"
                     MaxWidth="240"
                     Padding="0,1,5,0"
-                    Text="{CompiledBinding GetIsShowingFadingUIButtonsTranslation,
+                    Text="{CompiledBinding Translation.IsShowingFadingUIButtons,
                                            Mode=OneWay}" />
             </StackPanel>
         </Button>

+ 70 - 70
src/PicView.Avalonia/Views/BatchResizeView.axaml

@@ -24,7 +24,7 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding SourceFolder}"
+                    Text="{CompiledBinding Translation.SourceFolder}"
                     Width="130" />
                 <customControls:FuncTextBox
                     Classes="hover TStyle"
@@ -45,7 +45,7 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding OutputFolder}"
+                    Text="{CompiledBinding Translation.OutputFolder}"
                     Width="130" />
                 <customControls:FuncTextBox
                     Classes="hover TStyle"
@@ -66,7 +66,7 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding ConvertTo,
+                    Text="{CompiledBinding Translation.ConvertTo,
                                            Mode=OneWay}"
                     Width="130" />
                 <ComboBox
@@ -82,7 +82,7 @@
                     SelectedItem="NoConversion"
                     Width="195"
                     x:Name="ConversionComboBox">
-                    <ComboBoxItem Content="{CompiledBinding NoConversion, Mode=OneWay}" x:Name="NoConversion" />
+                    <ComboBoxItem Content="{CompiledBinding Translation.NoConversion, Mode=OneWay}" x:Name="NoConversion" />
                     <ComboBoxItem Content=".png" x:Name="PngItem" />
                     <ComboBoxItem Content=".jpg" x:Name="JpgItem" />
                     <ComboBoxItem Content=".webp" x:Name="WebpItem" />
@@ -96,7 +96,7 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding Compression,
+                    Text="{CompiledBinding Translation.Compression,
                                            Mode=OneWay}"
                     Width="130" />
                 <ComboBox
@@ -112,9 +112,9 @@
                     SelectedItem="Lossless"
                     Width="195"
                     x:Name="CompressionComboBox">
-                    <ComboBoxItem Content="{CompiledBinding Lossless, Mode=OneWay}" x:Name="Lossless" />
-                    <ComboBoxItem Content="{CompiledBinding Lossy, Mode=OneWay}" x:Name="Lossy" />
-                    <ComboBoxItem Content="{CompiledBinding None, Mode=OneWay}" x:Name="None" />
+                    <ComboBoxItem Content="{CompiledBinding Translation.Lossless, Mode=OneWay}" x:Name="Lossless" />
+                    <ComboBoxItem Content="{CompiledBinding Translation.Lossy, Mode=OneWay}" x:Name="Lossy" />
+                    <ComboBoxItem Content="{CompiledBinding Translation.None, Mode=OneWay}" x:Name="None" />
                 </ComboBox>
             </StackPanel>
 
@@ -123,7 +123,7 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding Quality,
+                    Text="{CompiledBinding Translation.Quality,
                                            Mode=OneWay}"
                     Width="130" />
 
@@ -153,7 +153,7 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding Resize,
+                    Text="{CompiledBinding Translation.Resize,
                                            Mode=OneWay}"
                     Width="130"
                     x:Name="ResizeTextBlock" />
@@ -170,11 +170,11 @@
                     SelectedItem="NoResizeBox"
                     Width="195"
                     x:Name="ResizeComboBox">
-                    <ComboBoxItem Content="{CompiledBinding NoResize}" x:Name="NoResizeBox" />
-                    <ComboBoxItem Content="{CompiledBinding Width}" x:Name="WidthResizeBox" />
-                    <ComboBoxItem Content="{CompiledBinding Height}" x:Name="HeightResizeBox" />
-                    <ComboBoxItem Content="{CompiledBinding WidthAndHeight}" x:Name="WidthAndHeightResizeBox" />
-                    <ComboBoxItem Content="{CompiledBinding Percentage}" x:Name="PercentageResizeBox" />
+                    <ComboBoxItem Content="{CompiledBinding Translation.NoResize}" x:Name="NoResizeBox" />
+                    <ComboBoxItem Content="{CompiledBinding Translation.Width}" x:Name="WidthResizeBox" />
+                    <ComboBoxItem Content="{CompiledBinding Translation.Height}" x:Name="HeightResizeBox" />
+                    <ComboBoxItem Content="{CompiledBinding Translation.WidthAndHeight}" x:Name="WidthAndHeightResizeBox" />
+                    <ComboBoxItem Content="{CompiledBinding Translation.Percentage}" x:Name="PercentageResizeBox" />
                 </ComboBox>
             </StackPanel>
 
@@ -186,14 +186,14 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding Width}"
+                    Text="{CompiledBinding Translation.Width}"
                     Width="130"
                     x:Name="WidthTextBlock" />
 
                 <customControls:NumTextBox
                     Classes="hover TStyle"
                     Margin="11,0,10,0"
-                    Text="{CompiledBinding PixelWidth,
+                    Text="{CompiledBinding PicViewer.PixelWidth,
                                            Mode=OneTime}"
                     Width="195"
                     x:Name="WidthValueBox" />
@@ -207,14 +207,14 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding Height}"
+                    Text="{CompiledBinding Translation.Height}"
                     Width="130"
                     x:Name="HeightTextBlock" />
 
                 <customControls:NumTextBox
                     Classes="hover TStyle"
                     Margin="11,0,10,0"
-                    Text="{CompiledBinding PixelHeight,
+                    Text="{CompiledBinding PicViewer.PixelHeight,
                                            Mode=OneTime}"
                     Width="195"
                     x:Name="HeightValueBox" />
@@ -228,14 +228,14 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding Width}"
+                    Text="{CompiledBinding Translation.Width}"
                     Width="130"
                     x:Name="WidthAndHeightWidthTextBlock" />
 
                 <customControls:NumTextBox
                     Classes="hover TStyle"
                     Margin="11,0,10,0"
-                    Text="{CompiledBinding PixelWidth,
+                    Text="{CompiledBinding PicViewer.PixelWidth,
                                            Mode=OneTime}"
                     Width="195"
                     x:Name="WidthAndHeightWidthValueBox" />
@@ -362,14 +362,14 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding Height}"
+                    Text="{CompiledBinding Translation.Height}"
                     Width="130"
                     x:Name="WidthAndHeightHeightTextBlock" />
 
                 <customControls:NumTextBox
                     Classes="hover TStyle"
                     Margin="11,0,10,0"
-                    Text="{CompiledBinding PixelHeight,
+                    Text="{CompiledBinding PicViewer.PixelHeight,
                                            Mode=OneTime}"
                     Width="195"
                     x:Name="WidthAndHeightHeightValueBox" />
@@ -383,7 +383,7 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding Percentage}"
+                    Text="{CompiledBinding Translation.Percentage}"
                     Width="130"
                     x:Name="PercentageTextBlock" />
 
@@ -405,7 +405,7 @@
                 <TextBlock
                     Classes="txt"
                     Margin="5,0,0,0"
-                    Text="{CompiledBinding GenerateThumbnails,
+                    Text="{CompiledBinding Translation.GenerateThumbnails,
                                            Mode=OneWay}"
                     Width="130"
                     x:Name="GenerateThumbnailsTextBlock" />
@@ -422,7 +422,7 @@
                     SelectedItem="NoThumbnailsItem"
                     Width="195"
                     x:Name="ThumbnailsComboBox">
-                    <ComboBoxItem Content="{CompiledBinding None}" x:Name="NoThumbnailsItem" />
+                    <ComboBoxItem Content="{CompiledBinding Translation.None}" x:Name="NoThumbnailsItem" />
                     <ComboBoxItem Content="1" />
                     <ComboBoxItem Content="2" />
                     <ComboBoxItem Content="3" />
@@ -448,10 +448,10 @@
                             Classes="txt"
                             Margin="8,0,0,0"
                             Width="130">
-                            <Run Text="{CompiledBinding Thumbnail}" />
+                            <Run Text="{CompiledBinding Translation.Thumbnail}" />
                             <Run Text=" 1" />
                             <LineBreak />
-                            <Run Text="{CompiledBinding OutputFolder}" />
+                            <Run Text="{CompiledBinding Translation.OutputFolder}" />
                         </TextBlock>
                         <customControls:FuncTextBox
                             Classes="hover TStyle"
@@ -469,7 +469,7 @@
                         <TextBlock
                             Classes="txt"
                             Margin="8,0,0,0"
-                            Text="{CompiledBinding Resize}"
+                            Text="{CompiledBinding Translation.Resize}"
                             Width="125" />
 
                         <ComboBox
@@ -485,9 +485,9 @@
                             SelectedItem="Thumb1PercentageItem"
                             Width="195"
                             x:Name="Thumb1ComboBox">
-                            <ComboBoxItem Content="{CompiledBinding Percentage}" x:Name="Thumb1PercentageItem" />
-                            <ComboBoxItem Content="{CompiledBinding Width}" x:Name="Thumb1WidthItem" />
-                            <ComboBoxItem Content="{CompiledBinding Height}" x:Name="Thumb1HeightItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Percentage}" x:Name="Thumb1PercentageItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Width}" x:Name="Thumb1WidthItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Height}" x:Name="Thumb1HeightItem" />
                         </ComboBox>
 
                         <customControls:FuncTextBox
@@ -514,10 +514,10 @@
                             Classes="txt"
                             Margin="8,0,0,0"
                             Width="130">
-                            <Run Text="{CompiledBinding Thumbnail}" />
+                            <Run Text="{CompiledBinding Translation.Thumbnail}" />
                             <Run Text=" 2" />
                             <LineBreak />
-                            <Run Text="{CompiledBinding OutputFolder}" />
+                            <Run Text="{CompiledBinding Translation.OutputFolder}" />
                         </TextBlock>
                         <customControls:FuncTextBox
                             Classes="hover TStyle"
@@ -535,7 +535,7 @@
                         <TextBlock
                             Classes="txt"
                             Margin="8,0,0,0"
-                            Text="{CompiledBinding Resize}"
+                            Text="{CompiledBinding Translation.Resize}"
                             Width="125" />
 
                         <ComboBox
@@ -551,9 +551,9 @@
                             SelectedItem="Thumb2PercentageItem"
                             Width="195"
                             x:Name="Thumb2ComboBox">
-                            <ComboBoxItem Content="{CompiledBinding Percentage}" x:Name="Thumb2PercentageItem" />
-                            <ComboBoxItem Content="{CompiledBinding Width}" x:Name="Thumb2WidthItem" />
-                            <ComboBoxItem Content="{CompiledBinding Height}" x:Name="Thumb2HeightItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Percentage}" x:Name="Thumb2PercentageItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Width}" x:Name="Thumb2WidthItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Height}" x:Name="Thumb2HeightItem" />
                         </ComboBox>
 
                         <customControls:FuncTextBox
@@ -580,10 +580,10 @@
                             Classes="txt"
                             Margin="8,0,0,0"
                             Width="130">
-                            <Run Text="{CompiledBinding Thumbnail}" />
+                            <Run Text="{CompiledBinding Translation.Thumbnail}" />
                             <Run Text=" 3" />
                             <LineBreak />
-                            <Run Text="{CompiledBinding OutputFolder}" />
+                            <Run Text="{CompiledBinding Translation.OutputFolder}" />
                         </TextBlock>
                         <customControls:FuncTextBox
                             Classes="hover TStyle"
@@ -601,7 +601,7 @@
                         <TextBlock
                             Classes="txt"
                             Margin="8,0,0,0"
-                            Text="{CompiledBinding Resize}"
+                            Text="{CompiledBinding Translation.Resize}"
                             Width="125" />
 
                         <ComboBox
@@ -617,9 +617,9 @@
                             SelectedItem="Thumb3PercentageItem"
                             Width="195"
                             x:Name="Thumb3ComboBox">
-                            <ComboBoxItem Content="{CompiledBinding Percentage}" x:Name="Thumb3PercentageItem" />
-                            <ComboBoxItem Content="{CompiledBinding Width}" x:Name="Thumb3WidthItem" />
-                            <ComboBoxItem Content="{CompiledBinding Height}" x:Name="Thumb3HeightItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Percentage}" x:Name="Thumb3PercentageItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Width}" x:Name="Thumb3WidthItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Height}" x:Name="Thumb3HeightItem" />
                         </ComboBox>
 
                         <customControls:FuncTextBox
@@ -646,10 +646,10 @@
                             Classes="txt"
                             Margin="8,0,0,0"
                             Width="130">
-                            <Run Text="{CompiledBinding Thumbnail}" />
+                            <Run Text="{CompiledBinding Translation.Thumbnail}" />
                             <Run Text=" 4" />
                             <LineBreak />
-                            <Run Text="{CompiledBinding OutputFolder}" />
+                            <Run Text="{CompiledBinding Translation.OutputFolder}" />
                         </TextBlock>
                         <customControls:FuncTextBox
                             Classes="hover TStyle"
@@ -667,7 +667,7 @@
                         <TextBlock
                             Classes="txt"
                             Margin="8,0,0,0"
-                            Text="{CompiledBinding Resize}"
+                            Text="{CompiledBinding Translation.Resize}"
                             Width="125" />
 
                         <ComboBox
@@ -683,9 +683,9 @@
                             SelectedItem="Thumb4PercentageItem"
                             Width="195"
                             x:Name="Thumb4ComboBox">
-                            <ComboBoxItem Content="{CompiledBinding Percentage}" x:Name="Thumb4PercentageItem" />
-                            <ComboBoxItem Content="{CompiledBinding Width}" x:Name="Thumb4WidthItem" />
-                            <ComboBoxItem Content="{CompiledBinding Height}" x:Name="Thumb4HeightItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Percentage}" x:Name="Thumb4PercentageItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Width}" x:Name="Thumb4WidthItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Height}" x:Name="Thumb4HeightItem" />
                         </ComboBox>
 
                         <customControls:FuncTextBox
@@ -711,10 +711,10 @@
                             Classes="txt"
                             Margin="8,0,0,0"
                             Width="130">
-                            <Run Text="{CompiledBinding Thumbnail}" />
+                            <Run Text="{CompiledBinding Translation.Thumbnail}" />
                             <Run Text=" 5" />
                             <LineBreak />
-                            <Run Text="{CompiledBinding OutputFolder}" />
+                            <Run Text="{CompiledBinding Translation.OutputFolder}" />
                         </TextBlock>
                         <customControls:FuncTextBox
                             Classes="hover TStyle"
@@ -732,7 +732,7 @@
                         <TextBlock
                             Classes="txt"
                             Margin="8,0,0,0"
-                            Text="{CompiledBinding Resize}"
+                            Text="{CompiledBinding Translation.Resize}"
                             Width="125" />
 
                         <ComboBox
@@ -748,9 +748,9 @@
                             SelectedItem="Thumb5PercentageItem"
                             Width="195"
                             x:Name="Thumb5ComboBox">
-                            <ComboBoxItem Content="{CompiledBinding Percentage}" x:Name="Thumb5PercentageItem" />
-                            <ComboBoxItem Content="{CompiledBinding Width}" x:Name="Thumb5WidthItem" />
-                            <ComboBoxItem Content="{CompiledBinding Height}" x:Name="Thumb5HeightItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Percentage}" x:Name="Thumb5PercentageItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Width}" x:Name="Thumb5WidthItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Height}" x:Name="Thumb5HeightItem" />
                         </ComboBox>
 
                         <customControls:FuncTextBox
@@ -776,10 +776,10 @@
                             Classes="txt"
                             Margin="8,0,0,0"
                             Width="130">
-                            <Run Text="{CompiledBinding Thumbnail}" />
+                            <Run Text="{CompiledBinding Translation.Thumbnail}" />
                             <Run Text=" 6" />
                             <LineBreak />
-                            <Run Text="{CompiledBinding OutputFolder}" />
+                            <Run Text="{CompiledBinding Translation.OutputFolder}" />
                         </TextBlock>
                         <customControls:FuncTextBox
                             Classes="hover TStyle"
@@ -797,7 +797,7 @@
                         <TextBlock
                             Classes="txt"
                             Margin="8,0,0,0"
-                            Text="{CompiledBinding Resize}"
+                            Text="{CompiledBinding Translation.Resize}"
                             Width="125" />
 
                         <ComboBox
@@ -813,9 +813,9 @@
                             SelectedItem="Thumb6PercentageItem"
                             Width="195"
                             x:Name="Thumb6ComboBox">
-                            <ComboBoxItem Content="{CompiledBinding Percentage}" x:Name="Thumb6PercentageItem" />
-                            <ComboBoxItem Content="{CompiledBinding Width}" x:Name="Thumb61WidthItem" />
-                            <ComboBoxItem Content="{CompiledBinding Height}" x:Name="Thumb6HeightItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Percentage}" x:Name="Thumb6PercentageItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Width}" x:Name="Thumb61WidthItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Height}" x:Name="Thumb6HeightItem" />
                         </ComboBox>
 
                         <customControls:FuncTextBox
@@ -842,10 +842,10 @@
                             Classes="txt"
                             Margin="8,0,0,0"
                             Width="130">
-                            <Run Text="{CompiledBinding Thumbnail}" />
+                            <Run Text="{CompiledBinding Translation.Thumbnail}" />
                             <Run Text=" 7" />
                             <LineBreak />
-                            <Run Text="{CompiledBinding OutputFolder}" />
+                            <Run Text="{CompiledBinding Translation.OutputFolder}" />
                         </TextBlock>
                         <customControls:FuncTextBox
                             Classes="hover TStyle"
@@ -863,7 +863,7 @@
                         <TextBlock
                             Classes="txt"
                             Margin="8,0,0,0"
-                            Text="{CompiledBinding Resize}"
+                            Text="{CompiledBinding Translation.Resize}"
                             Width="125" />
 
                         <ComboBox
@@ -879,9 +879,9 @@
                             SelectedItem="Thumb7PercentageItem"
                             Width="195"
                             x:Name="Thumb7ComboBox">
-                            <ComboBoxItem Content="{CompiledBinding Percentage}" x:Name="Thumb7PercentageItem" />
-                            <ComboBoxItem Content="{CompiledBinding Width}" x:Name="Thumb7WidthItem" />
-                            <ComboBoxItem Content="{CompiledBinding Height}" x:Name="Thumb7HeightItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Percentage}" x:Name="Thumb7PercentageItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Width}" x:Name="Thumb7WidthItem" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.Height}" x:Name="Thumb7HeightItem" />
                         </ComboBox>
 
                         <customControls:FuncTextBox
@@ -937,7 +937,7 @@
                 <TextBlock
                     Classes="txt"
                     Padding="15,0"
-                    Text="{CompiledBinding Reset,
+                    Text="{CompiledBinding Translation.Reset,
                                            Mode=OneWay}"
                     TextAlignment="Center"
                     x:Name="CancelButtonTextBlock" />
@@ -952,7 +952,7 @@
                 <TextBlock
                     Classes="txt"
                     Padding="15,0"
-                    Text="{CompiledBinding Start,
+                    Text="{CompiledBinding Translation.Start,
                                            Mode=OneWay}"
                     TextAlignment="Center" />
             </Button>

+ 2 - 2
src/PicView.Avalonia/Views/BatchResizeView.axaml.cs

@@ -111,7 +111,7 @@ public partial class BatchResizeView : UserControl
                 return;
             }
 
-            SourceFolderTextBox.Text = vm.FileInfo?.DirectoryName ?? string.Empty;
+            SourceFolderTextBox.Text = vm.PicViewer.FileInfo?.DirectoryName ?? string.Empty;
         };
     }
 
@@ -157,7 +157,7 @@ public partial class BatchResizeView : UserControl
             return;
         }
 
-        SourceFolderTextBox.Text = vm.FileInfo?.DirectoryName ?? string.Empty;
+        SourceFolderTextBox.Text = vm.PicViewer.FileInfo?.DirectoryName ?? string.Empty;
     }
 
     private void ResetProgress()

+ 23 - 23
src/PicView.Avalonia/Views/BottomBar.axaml

@@ -16,9 +16,9 @@
             <!--  Next  -->
             <MenuItem
                 Command="{CompiledBinding NextCommand}"
-                Header="{CompiledBinding NextImage,
+                Header="{CompiledBinding Translation.NextImage,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 StaysOpenOnClick="True">
                 <MenuItem.Icon>
@@ -32,9 +32,9 @@
             <!--  Prev  -->
             <MenuItem
                 Command="{CompiledBinding PreviousCommand}"
-                Header="{CompiledBinding PrevImage,
+                Header="{CompiledBinding Translation.PrevImage,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 StaysOpenOnClick="True">
                 <MenuItem.Icon>
@@ -51,9 +51,9 @@
             <!--  Next 10  -->
             <MenuItem
                 Command="{CompiledBinding Skip10Command}"
-                Header="{CompiledBinding AdvanceBy10Images,
+                Header="{CompiledBinding Translation.AdvanceBy10Images,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 StaysOpenOnClick="True">
                 <MenuItem.Icon>
@@ -67,9 +67,9 @@
             <!--  Next 100  -->
             <MenuItem
                 Command="{CompiledBinding Skip100Command}"
-                Header="{CompiledBinding AdvanceBy100Images,
+                Header="{CompiledBinding Translation.AdvanceBy100Images,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 StaysOpenOnClick="True">
                 <MenuItem.Icon>
@@ -83,9 +83,9 @@
             <!--  Prev 10  -->
             <MenuItem
                 Command="{CompiledBinding Prev10Command}"
-                Header="{CompiledBinding GoBackBy10Images,
+                Header="{CompiledBinding Translation.GoBackBy10Images,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 StaysOpenOnClick="True">
                 <MenuItem.Icon>
@@ -99,9 +99,9 @@
             <!--  Prev 100  -->
             <MenuItem
                 Command="{CompiledBinding Prev100Command}"
-                Header="{CompiledBinding GoBackBy100Images,
+                Header="{CompiledBinding Translation.GoBackBy100Images,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 StaysOpenOnClick="True">
                 <MenuItem.Icon>
@@ -117,8 +117,8 @@
             <!--  First Image  -->
             <MenuItem
                 Command="{CompiledBinding FirstCommand}"
-                Header="{CompiledBinding FirstImage}"
-                IsEnabled="{CompiledBinding FileInfo,
+                Header="{CompiledBinding Translation.FirstImage}"
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Image
@@ -131,9 +131,9 @@
             <!--  Last Image  -->
             <MenuItem
                 Command="{CompiledBinding LastCommand}"
-                Header="{CompiledBinding LastImage,
+                Header="{CompiledBinding Translation.LastImage,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Image
@@ -148,9 +148,9 @@
             <!--  Next folder  -->
             <MenuItem
                 Command="{CompiledBinding NextFolderCommand}"
-                Header="{CompiledBinding NextFolder,
+                Header="{CompiledBinding Translation.NextFolder,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Image
@@ -163,9 +163,9 @@
             <!--  Prev folder  -->
             <MenuItem
                 Command="{CompiledBinding PreviousFolderCommand}"
-                Header="{CompiledBinding PrevFolder,
+                Header="{CompiledBinding Translation.PrevFolder,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Image
@@ -178,7 +178,7 @@
             <Separator />
 
             <!--  Hide bottom bar  -->
-            <MenuItem Command="{CompiledBinding ToggleBottomNavBarCommand}" Header="{CompiledBinding HideBottomToolbar, Mode=OneWay}">
+            <MenuItem Command="{CompiledBinding ToggleBottomNavBarCommand}" Header="{CompiledBinding Translation.HideBottomToolbar, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Image
                         Height="12"
@@ -270,7 +270,7 @@
                     Height="25"
                     IconHeight="20"
                     IconWidth="17"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     IsTabStop="False"
                     Width="90"
@@ -288,7 +288,7 @@
                     Height="25"
                     IconHeight="20"
                     IconWidth="17"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     IsTabStop="False"
                     Width="90"

+ 17 - 17
src/PicView.Avalonia/Views/EffectsView.axaml

@@ -17,7 +17,7 @@
     </UserControl.Styles>
     <UserControl.ContextMenu>
         <ContextMenu x:Name="ContextMenu">
-            <MenuItem Command="{CompiledBinding SaveFileCommand}" Header="{CompiledBinding Save, Mode=OneWay}">
+            <MenuItem Command="{CompiledBinding SaveFileCommand}" Header="{CompiledBinding Translation.Save, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
                         Data="{StaticResource SaveGeometry}"
@@ -27,7 +27,7 @@
                         Width="12" />
                 </MenuItem.Icon>
             </MenuItem>
-            <MenuItem Command="{CompiledBinding SaveFileAsCommand}" Header="{CompiledBinding SaveAs}">
+            <MenuItem Command="{CompiledBinding SaveFileAsCommand}" Header="{CompiledBinding Translation.SaveAs}">
                 <MenuItem.Icon>
                     <Path
                         Data="{StaticResource SaveGeometry}"
@@ -37,7 +37,7 @@
                         Width="12" />
                 </MenuItem.Icon>
             </MenuItem>
-            <MenuItem Command="{CompiledBinding CopyImageCommand}" Header="{CompiledBinding CopyImage, Mode=OneWay}">
+            <MenuItem Command="{CompiledBinding CopyImageCommand}" Header="{CompiledBinding Translation.CopyImage, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
                         Data="{StaticResource CopyGeometry}"
@@ -50,9 +50,9 @@
             <Separator />
             <MenuItem
                 Command="{CompiledBinding SetAsWallpaperFilledCommand}"
-                CommandParameter="{CompiledBinding FileInfo.FullName,
+                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
-                Header="{CompiledBinding SetAsWallpaper,
+                Header="{CompiledBinding Translation.SetAsWallpaper,
                                          Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
@@ -64,7 +64,7 @@
                 </MenuItem.Icon>
             </MenuItem>
             <Separator />
-            <MenuItem Header="{CompiledBinding ClearEffects}" x:Name="ClearEffectsItem">
+            <MenuItem Header="{CompiledBinding Translation.ClearEffects}" x:Name="ClearEffectsItem">
                 <MenuItem.Icon>
                     <Image
                         Height="12"
@@ -91,7 +91,7 @@
                         FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
                         FontSize="14"
                         Padding="10,5"
-                        Text="{CompiledBinding Lighting}" />
+                        Text="{CompiledBinding Translation.Lighting}" />
                 </Expander.Header>
                 <StackPanel Margin="15,20">
 
@@ -100,7 +100,7 @@
                         <TextBlock
                             Classes="txt"
                             HorizontalAlignment="Left"
-                            Text="{CompiledBinding Brightness}"
+                            Text="{CompiledBinding Translation.Brightness}"
                             VerticalAlignment="Center" />
 
                         <Rectangle
@@ -158,7 +158,7 @@
                         <TextBlock
                             Classes="txt"
                             HorizontalAlignment="Left"
-                            Text="{CompiledBinding Contrast}"
+                            Text="{CompiledBinding Translation.Contrast}"
                             VerticalAlignment="Center" />
 
                         <Rectangle
@@ -228,7 +228,7 @@
                         FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
                         FontSize="14"
                         Padding="10,5"
-                        Text="{CompiledBinding Effects}" />
+                        Text="{CompiledBinding Translation.Effects}" />
                 </Expander.Header>
                 <StackPanel Margin="15,0">
 
@@ -237,7 +237,7 @@
                         <TextBlock
                             Classes="txt"
                             HorizontalAlignment="Left"
-                            Text="{CompiledBinding Blur}"
+                            Text="{CompiledBinding Translation.Blur}"
                             VerticalAlignment="Center" />
                     </Panel>
 
@@ -279,7 +279,7 @@
                         <TextBlock
                             Classes="txt"
                             HorizontalAlignment="Left"
-                            Text="{CompiledBinding PencilSketch}"
+                            Text="{CompiledBinding Translation.PencilSketch}"
                             VerticalAlignment="Center" />
                     </Panel>
 
@@ -322,7 +322,7 @@
                         <TextBlock
                             Classes="txt"
                             HorizontalAlignment="Left"
-                            Text="{CompiledBinding Posterize}"
+                            Text="{CompiledBinding Translation.Posterize}"
                             VerticalAlignment="Center" />
                     </Panel>
 
@@ -365,7 +365,7 @@
                         <TextBlock
                             Classes="txt"
                             HorizontalAlignment="Left"
-                            Text="{CompiledBinding Solarize}"
+                            Text="{CompiledBinding Translation.Solarize}"
                             VerticalAlignment="Center" />
                     </Panel>
 
@@ -413,7 +413,7 @@
                         <TextBlock
                             Classes="txt"
                             HorizontalAlignment="Left"
-                            Text="{CompiledBinding BlackAndWhite}"
+                            Text="{CompiledBinding Translation.BlackAndWhite}"
                             VerticalAlignment="Center" />
                     </ToggleButton>
 
@@ -425,7 +425,7 @@
                         <TextBlock
                             Classes="txt"
                             HorizontalAlignment="Left"
-                            Text="{CompiledBinding NegativeColors}"
+                            Text="{CompiledBinding Translation.NegativeColors}"
                             VerticalAlignment="Center" />
                     </ToggleButton>
 
@@ -437,7 +437,7 @@
                         <TextBlock
                             Classes="txt"
                             HorizontalAlignment="Left"
-                            Text="{CompiledBinding OldMovie}"
+                            Text="{CompiledBinding Translation.OldMovie}"
                             VerticalAlignment="Center" />
                     </ToggleButton>
 

+ 17 - 17
src/PicView.Avalonia/Views/EffectsView.axaml.cs

@@ -43,18 +43,18 @@ public partial class EffectsView : UserControl
     private void InitializeViewModel(MainViewModel vm)
     {
         // Reset on file change
-        vm.ObservableForProperty(v => v.FileInfo)
+        vm.ObservableForProperty(v => v.PicViewer.FileInfo)
             .ObserveOn(RxApp.MainThreadScheduler)
             .Subscribe(_ => Reset())
             .DisposeWith(_disposables);
 
-        if (vm.EffectConfig is null)
+        if (vm.PicViewer.EffectConfig is null)
         {
-            vm.EffectConfig = new ImageEffectConfig();
+            vm.PicViewer.EffectConfig = new ImageEffectConfig();
         }
         else
         {
-            ApplyEffectConfig(vm.EffectConfig);
+            ApplyEffectConfig(vm.PicViewer.EffectConfig);
         }
     }
 
@@ -71,51 +71,51 @@ public partial class EffectsView : UserControl
 
         BrightnessSlider.ValueChanged += (s, e) =>
         {
-            vm.EffectConfig ??= new ImageEffectConfig();
+            vm.PicViewer.EffectConfig ??= new ImageEffectConfig();
             UpdateEffectConfig(vm, config => config.Brightness = new Percentage(e.NewValue));
         };
         ContrastSlider.ValueChanged += (s, e) =>
         {
-            vm.EffectConfig ??= new ImageEffectConfig();
+            vm.PicViewer.EffectConfig ??= new ImageEffectConfig();
             UpdateEffectConfig(vm, config => config.Contrast = new Percentage(e.NewValue));
         };
         PencilSketchSlider.ValueChanged += (s, e) =>
         {
-            vm.EffectConfig ??= new ImageEffectConfig();
+            vm.PicViewer.EffectConfig ??= new ImageEffectConfig();
             UpdateEffectConfig(vm, config => config.SketchStrokeWidth = e.NewValue);
         };
         PosterizeSlider.ValueChanged += (s, e) =>
         {
-            vm.EffectConfig ??= new ImageEffectConfig();
+            vm.PicViewer.EffectConfig ??= new ImageEffectConfig();
             UpdateEffectConfig(vm, config => config.PosterizeLevel = (int)e.NewValue == 1 ? 2 : (int)e.NewValue);  
         };
         SolarizeSlider.ValueChanged += (s, e) =>
         {
-            vm.EffectConfig ??= new ImageEffectConfig();
+            vm.PicViewer.EffectConfig ??= new ImageEffectConfig();
             UpdateEffectConfig(vm, config => config.Solarize = new Percentage(e.NewValue));
         };
         BlurSlider.ValueChanged += (s, e) =>
         {
-            vm.EffectConfig ??= new ImageEffectConfig();
+            vm.PicViewer.EffectConfig ??= new ImageEffectConfig();
             UpdateEffectConfig(vm, config => config.BlurLevel = e.NewValue);
         };
 
         BlackAndWhiteToggleButton.Click += async delegate
         {
             var isBlackAndWhite = BlackAndWhiteToggleButton.IsChecked.HasValue && BlackAndWhiteToggleButton.IsChecked.Value;
-            vm.EffectConfig ??= new ImageEffectConfig();
+            vm.PicViewer.EffectConfig ??= new ImageEffectConfig();
             await UpdateToggleEffect(vm, BlackAndWhiteToggleButton, config => config.BlackAndWhite = isBlackAndWhite);
         };
         NegativeToggleButton.Click += async delegate
         {
             var isNegative = NegativeToggleButton.IsChecked.HasValue && NegativeToggleButton.IsChecked.Value;
-            vm.EffectConfig ??= new ImageEffectConfig();
+            vm.PicViewer.EffectConfig ??= new ImageEffectConfig();
             await UpdateToggleEffect(vm, NegativeToggleButton, config => config.Negative = isNegative);
         };
         OldMovieToggleButton.Click += async delegate
         {
             var isOldMovie = OldMovieToggleButton.IsChecked.HasValue && OldMovieToggleButton.IsChecked.Value;
-            vm.EffectConfig ??= new ImageEffectConfig();
+            vm.PicViewer.EffectConfig ??= new ImageEffectConfig();
             await UpdateToggleEffect(vm, OldMovieToggleButton, config => config.OldMovie = isOldMovie);
         };
     }
@@ -156,7 +156,7 @@ public partial class EffectsView : UserControl
         MainViewModel? vm = null;
         await Dispatcher.UIThread.InvokeAsync(() => { vm = DataContext as MainViewModel; });
         
-        await ImageEffectsHelper.ApplyEffects(vm, vm.EffectConfig, _cancellationTokenSource.Token).ConfigureAwait(false);
+        await ImageEffectsHelper.ApplyEffects(vm, vm.PicViewer.EffectConfig, _cancellationTokenSource.Token).ConfigureAwait(false);
     }
 
     public async Task RemoveEffects(MainViewModel vm)
@@ -186,7 +186,7 @@ public partial class EffectsView : UserControl
         BlurSlider.Value = 0;
         if (DataContext is MainViewModel vm)
         {
-            vm.EffectConfig = new ImageEffectConfig();
+            vm.PicViewer.EffectConfig = new ImageEffectConfig();
         }
     }
 
@@ -206,7 +206,7 @@ public partial class EffectsView : UserControl
 
     private void UpdateEffectConfig(MainViewModel vm, Action<ImageEffectConfig> updateAction)
     {
-        updateAction(vm.EffectConfig);
+        updateAction(vm.PicViewer.EffectConfig);
         DebounceSliderChange();
     }
 
@@ -218,7 +218,7 @@ public partial class EffectsView : UserControl
         {
             return;
         }
-        updateAction(vm.EffectConfig);
+        updateAction(vm.PicViewer.EffectConfig);
         await ApplyEffectsDebounced();
     }
 

Разлика између датотеке није приказан због своје велике величине
+ 163 - 163
src/PicView.Avalonia/Views/ExifView.axaml


+ 16 - 16
src/PicView.Avalonia/Views/ExifView.axaml.cs

@@ -56,18 +56,18 @@ public partial class ExifView : UserControl
             
             ExifHandling.UpdateExifValues(vm);
             
-            _imageUpdateSubscription = vm.WhenAnyValue(x => x.FileInfo).Select(x => x is not null).Subscribe(_ =>
+            _imageUpdateSubscription = vm.PicViewer.WhenAnyValue(x => x.FileInfo).Select(x => x is not null).Subscribe(_ =>
             {
                 ExifHandling.UpdateExifValues(vm);
             });
             ResetButton.Click += (_, _) =>
             {
-                PixelWidthTextBox.Text = vm.PixelWidth.ToString();
-                PixelHeightTextBox.Text = vm.PixelHeight.ToString();
+                PixelWidthTextBox.Text = vm.PicViewer.PixelWidth.ToString();
+                PixelHeightTextBox.Text = vm.PicViewer.PixelHeight.ToString();
                 AdjustAspectRatio(PixelWidthTextBox);
-                FullPathTextBox.Text = vm.FileInfo?.FullName ?? "";
-                DirectoryNameTextBox.Text = vm.FileInfo?.DirectoryName ?? "";
-                FileNameTextBox.Text = vm.FileInfo?.Name ?? ""; 
+                FullPathTextBox.Text = vm.PicViewer.FileInfo?.FullName ?? "";
+                DirectoryNameTextBox.Text = vm.PicViewer.FileInfo?.DirectoryName ?? "";
+                FileNameTextBox.Text = vm.PicViewer.FileInfo?.Name ?? ""; 
             };
             
             SaveButton.Click += async (_, _) =>
@@ -75,20 +75,20 @@ public partial class ExifView : UserControl
                 var ext = GetExtension();
                 var location = FullPathTextBox.Text; // TODO check if this is a valid path
                                                      // and sync with file name/directory text boxes
-                await SendToImageSaver(vm.FileInfo?.FullName, location, PixelWidthTextBox.Text, PixelHeightTextBox.Text, ext).ConfigureAwait(false);
+                await SendToImageSaver(vm.PicViewer.FileInfo?.FullName, location, PixelWidthTextBox.Text, PixelHeightTextBox.Text, ext).ConfigureAwait(false);
             };
 
             SaveAsButton.Click += async (_, _) =>
             {
-                var fileInfoFullName = vm.FileInfo.FullName;
+                var fileInfoFullName = vm.PicViewer.FileInfo.FullName;
                 var ext = DetermineFileExtension(vm, ref fileInfoFullName);
         
-                var file = await FilePicker.PickFileForSavingAsync(vm.FileInfo?.FullName, ext);
+                var file = await FilePicker.PickFileForSavingAsync(vm.PicViewer.FileInfo?.FullName, ext);
                 if (file is null)
                 {
                     return;
                 }
-                await SendToImageSaver( vm.FileInfo?.FullName, file, PixelWidthTextBox.Text, PixelHeightTextBox.Text, ext).ConfigureAwait(false);
+                await SendToImageSaver( vm.PicViewer.FileInfo?.FullName, file, PixelWidthTextBox.Text, PixelHeightTextBox.Text, ext).ConfigureAwait(false);
             };
         };
     }
@@ -125,7 +125,7 @@ public partial class ExifView : UserControl
         {
             return;
         }
-        var aspectRatio = (double)vm.PixelWidth / vm.PixelHeight;
+        var aspectRatio = (double)vm.PicViewer.PixelWidth / vm.PicViewer.PixelHeight;
         AspectRatioHelper.SetAspectRatioForTextBox(PixelWidthTextBox, PixelHeightTextBox, sender == PixelWidthTextBox,
             aspectRatio, DataContext as MainViewModel);
         
@@ -138,13 +138,13 @@ public partial class ExifView : UserControl
         {
             return;
         }
-        var printSizes = AspectRatioHelper.GetPrintSizes(width, height, vm.DpiX, vm.DpiY);
+        var printSizes = AspectRatioHelper.GetPrintSizes(width, height, vm.Exif.DpiX, vm.Exif.DpiY);
         PrintSizeInchTextBox.Text = printSizes.PrintSizeInch;
         PrintSizeCmTextBox.Text = printSizes.PrintSizeCm;
         SizeMpTextBox.Text = printSizes.SizeMp;
 
         var gcd = ImageTitleFormatter.GCD(width, height);
-        AspectRatioTextBox.Text = AspectRatioHelper.GetFormattedAspectRatio(gcd, vm.PixelWidth, vm.PixelHeight);
+        AspectRatioTextBox.Text = AspectRatioHelper.GetFormattedAspectRatio(gcd, vm.PicViewer.PixelWidth, vm.PicViewer.PixelHeight);
     }
 
     private static async Task DoResize(MainViewModel vm, bool isWidth, object width, object height)
@@ -157,7 +157,7 @@ public partial class ExifView : UserControl
             }
             if (widthValue > 0)
             {
-                var success = await ConversionHelper.ResizeByWidth(vm.FileInfo, widthValue).ConfigureAwait(false);
+                var success = await ConversionHelper.ResizeByWidth(vm.PicViewer.FileInfo, widthValue).ConfigureAwait(false);
                 if (success)
                 {
                     await NavigationManager.QuickReload().ConfigureAwait(false);
@@ -172,7 +172,7 @@ public partial class ExifView : UserControl
             }
             if (heightValue > 0)
             {
-                var success = await ConversionHelper.ResizeByHeight(vm.FileInfo, heightValue).ConfigureAwait(false);
+                var success = await ConversionHelper.ResizeByHeight(vm.PicViewer.FileInfo, heightValue).ConfigureAwait(false);
                 if (success)
                 {
                     await NavigationManager.QuickReload().ConfigureAwait(false);
@@ -196,7 +196,7 @@ public partial class ExifView : UserControl
     
     private string DetermineFileExtension(MainViewModel vm, ref string destination)
     {
-        var ext = vm.FileInfo.Extension;
+        var ext = vm.PicViewer.FileInfo.Extension;
         if (NoConversion.IsSelected)
         {
             return ext;

+ 20 - 20
src/PicView.Avalonia/Views/GallerySettingsView.axaml

@@ -20,7 +20,7 @@
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             FontSize="14"
             Margin="0,20,0,20"
-            Text="{CompiledBinding GallerySettings,
+            Text="{CompiledBinding Translation.GallerySettings,
                                    Mode=OneWay}" />
 
         <ToggleButton
@@ -30,7 +30,7 @@
             Command="{CompiledBinding ToggleBottomGalleryCommand}"
             IsChecked="{CompiledBinding IsBottomGalleryShown}"
             Margin="0,0,0,10"
-            ToolTip.Tip="{CompiledBinding ShowBottomGallery,
+            ToolTip.Tip="{CompiledBinding Translation.ShowBottomGallery,
                                           Mode=OneWay}"
             Width="300"
             x:Name="ToggleBottomGalleryButton">
@@ -39,7 +39,7 @@
                 Margin="0"
                 MaxWidth="240"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding ShowBottomGallery,
+                Text="{CompiledBinding Translation.ShowBottomGallery,
                                        Mode=OneWay}" />
         </ToggleButton>
 
@@ -57,7 +57,7 @@
                 Margin="0"
                 MaxWidth="240"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding ShowBottomGalleryWhenUiIsHidden}" />
+                Text="{CompiledBinding Translation.ShowBottomGalleryWhenUiIsHidden}" />
         </ToggleButton>
 
         <TextBlock
@@ -65,7 +65,7 @@
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             Margin="0,10,0,10"
             MaxWidth="300"
-            Text="{CompiledBinding ExpandedGalleryItemSize,
+            Text="{CompiledBinding Translation.ExpandedGalleryItemSize,
                                    Mode=OneWay}" />
         <uc:FullGalleryItemSizeSlider />
         <TextBlock
@@ -82,7 +82,7 @@
             FontSize="12"
             Margin="0,10,0,10"
             MaxWidth="300"
-            Text="{CompiledBinding BottomGalleryItemSize,
+            Text="{CompiledBinding Translation.BottomGalleryItemSize,
                                    Mode=OneWay}" />
         <uc:BottomGalleryItemSizeSlider />
         <TextBlock
@@ -99,7 +99,7 @@
             FontSize="12"
             Margin="0,10,0,15"
             MaxWidth="300"
-            Text="{CompiledBinding GalleryThumbnailStretch,
+            Text="{CompiledBinding Translation.GalleryThumbnailStretch,
                                    Mode=OneWay}" />
         <ComboBox
             Background="{DynamicResource SecondaryBackgroundColor}"
@@ -110,12 +110,12 @@
             Padding="5,7,0,7"
             Width="300"
             x:Name="FullGalleryComboBox">
-            <ComboBoxItem Content="{CompiledBinding Uniform}" x:Name="FullGalleryUniformItem" />
-            <ComboBoxItem Content="{CompiledBinding UniformToFill}" x:Name="FullGalleryUniformToFillItem" />
-            <ComboBoxItem Content="{CompiledBinding Fill}" x:Name="FullGalleryFillItem" />
-            <ComboBoxItem Content="{CompiledBinding None}" x:Name="FullGalleryNoneItem" />
-            <ComboBoxItem Content="{CompiledBinding Square}" x:Name="FullGallerySquareItem" />
-            <ComboBoxItem Content="{CompiledBinding FillSquare}" x:Name="FullGalleryFillSquareItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.Uniform}" x:Name="FullGalleryUniformItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.UniformToFill}" x:Name="FullGalleryUniformToFillItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.Fill}" x:Name="FullGalleryFillItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.None}" x:Name="FullGalleryNoneItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.Square}" x:Name="FullGallerySquareItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.FillSquare}" x:Name="FullGalleryFillSquareItem" />
         </ComboBox>
 
         <TextBlock
@@ -124,7 +124,7 @@
             FontSize="12"
             Margin="0,3,0,15"
             MaxWidth="300"
-            Text="{CompiledBinding BottomGalleryThumbnailStretch}" />
+            Text="{CompiledBinding Translation.BottomGalleryThumbnailStretch}" />
         <ComboBox
             Background="{DynamicResource SecondaryBackgroundColor}"
             BorderBrush="{DynamicResource MainBorderColor}"
@@ -134,12 +134,12 @@
             Padding="5,7,0,7"
             Width="300"
             x:Name="BottomGalleryComboBox">
-            <ComboBoxItem Content="{CompiledBinding Uniform}" x:Name="BottomGalleryUniformItem" />
-            <ComboBoxItem Content="{CompiledBinding UniformToFill}" x:Name="BottomGalleryUniformToFillItem" />
-            <ComboBoxItem Content="{CompiledBinding Fill}" x:Name="BottomGalleryFillItem" />
-            <ComboBoxItem Content="{CompiledBinding None}" x:Name="BottomGalleryNoneItem" />
-            <ComboBoxItem Content="{CompiledBinding Square}" x:Name="BottomGallerySquareItem" />
-            <ComboBoxItem Content="{CompiledBinding FillSquare}" x:Name="BottomGalleryFillSquareItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.Uniform}" x:Name="BottomGalleryUniformItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.UniformToFill}" x:Name="BottomGalleryUniformToFillItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.Fill}" x:Name="BottomGalleryFillItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.None}" x:Name="BottomGalleryNoneItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.Square}" x:Name="BottomGallerySquareItem" />
+            <ComboBoxItem Content="{CompiledBinding Translation.FillSquare}" x:Name="BottomGalleryFillSquareItem" />
         </ComboBox>
     </StackPanel>
 </UserControl>

+ 9 - 9
src/PicView.Avalonia/Views/GalleryView.axaml

@@ -21,7 +21,7 @@
 
         <Panel.ContextMenu>
             <ContextMenu Opened="MenuBase_OnOpened">
-                <MenuItem Header="{CompiledBinding Stretch, Mode=OneWay}">
+                <MenuItem Header="{CompiledBinding Translation.Stretch, Mode=OneWay}">
                     <MenuItem.Icon>
                         <Image
                             Height="12"
@@ -31,48 +31,48 @@
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="Uniform"
-                        Header="{CompiledBinding Uniform,
+                        Header="{CompiledBinding Translation.Uniform,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsUniformMenuChecked}"
                         ToggleType="Radio" />
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="UniformToFill"
-                        Header="{CompiledBinding UniformToFill,
+                        Header="{CompiledBinding Translation.UniformToFill,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsUniformToFillMenuChecked}"
                         ToggleType="Radio" />
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="Fill"
-                        Header="{CompiledBinding Fill,
+                        Header="{CompiledBinding Translation.Fill,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsFillMenuChecked}"
                         ToggleType="Radio" />
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="None"
-                        Header="{CompiledBinding None,
+                        Header="{CompiledBinding Translation.None,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsNoneMenuChecked}"
                         ToggleType="Radio" />
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="Square"
-                        Header="{CompiledBinding Square,
+                        Header="{CompiledBinding Translation.Square,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsSquareMenuChecked}"
                         ToggleType="Radio" />
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="FillSquare"
-                        Header="{CompiledBinding FillSquare,
+                        Header="{CompiledBinding Translation.FillSquare,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsFillSquareMenuChecked}"
                         ToggleType="Radio" />
                 </MenuItem>
                 <MenuItem
-                    Header="{CompiledBinding ExpandedGalleryItemSize,
+                    Header="{CompiledBinding Translation.ExpandedGalleryItemSize,
                                              Mode=OneWay}"
                     PointerPressed="Flyout_OnPointerPressed"
                     StaysOpenOnClick="True">
@@ -96,7 +96,7 @@
                     </FlyoutBase.AttachedFlyout>
                 </MenuItem>
                 <Separator />
-                <MenuItem Command="{CompiledBinding CloseGalleryCommand}" Header="{CompiledBinding HideBottomGallery, Mode=OneWay}">
+                <MenuItem Command="{CompiledBinding CloseGalleryCommand}" Header="{CompiledBinding Translation.HideBottomGallery, Mode=OneWay}">
                     <MenuItem.Icon>
                         <Path
                             Data="{StaticResource CloseGeometry}"

+ 8 - 8
src/PicView.Avalonia/Views/GeneralSettingsView.axaml

@@ -21,7 +21,7 @@
                 FontSize="14"
                 Foreground="{StaticResource SecondaryTextColor}"
                 Margin="0,20,0,20"
-                Text="{CompiledBinding ApplicationStartup,
+                Text="{CompiledBinding Translation.ApplicationStartup,
                                        Mode=OneWay}" />
             <ComboBox
                 Background="{DynamicResource SecondaryBackgroundColor}"
@@ -32,8 +32,8 @@
                 Padding="5,7,0,7"
                 Width="300"
                 x:Name="ApplicationStartupBox">
-                <ComboBoxItem Content="{CompiledBinding None, Mode=OneWay}" />
-                <ComboBoxItem Content="{CompiledBinding OpenLastFile, Mode=OneWay}" />
+                <ComboBoxItem Content="{CompiledBinding Translation.None, Mode=OneWay}" />
+                <ComboBoxItem Content="{CompiledBinding Translation.OpenLastFile, Mode=OneWay}" />
             </ComboBox>
 
             <TextBlock
@@ -42,7 +42,7 @@
                 FontSize="14"
                 Foreground="{StaticResource SecondaryTextColor}"
                 Margin="0,20,0,20"
-                Text="{CompiledBinding WindowManagement,
+                Text="{CompiledBinding Translation.WindowManagement,
                                        Mode=OneWay}" />
 
             <ToggleButton
@@ -59,7 +59,7 @@
                     Margin="0"
                     MaxWidth="240"
                     Padding="0,1,5,0"
-                    Text="{CompiledBinding StayTopMost,
+                    Text="{CompiledBinding Translation.StayTopMost,
                                            Mode=OneWay}" />
             </ToggleButton>
 
@@ -76,7 +76,7 @@
                     Margin="0"
                     MaxWidth="240"
                     Padding="0,1,5,0"
-                    Text="{CompiledBinding StayCentered,
+                    Text="{CompiledBinding Translation.StayCentered,
                                            Mode=OneWay}" />
             </ToggleButton>
 
@@ -93,7 +93,7 @@
                     Margin="0"
                     MaxWidth="240"
                     Padding="0,1,5,0"
-                    Text="{CompiledBinding OpenInSameWindow,
+                    Text="{CompiledBinding Translation.OpenInSameWindow,
                                            Mode=OneWay}" />
             </ToggleButton>
 
@@ -110,7 +110,7 @@
                     Margin="0"
                     MaxWidth="240"
                     Padding="0,1,5,0"
-                    Text="{CompiledBinding ShowConfirmationOnEsc,
+                    Text="{CompiledBinding Translation.ShowConfirmationOnEsc,
                                            Mode=OneWay}" />
             </ToggleButton>
 

+ 9 - 9
src/PicView.Avalonia/Views/ImageSettingsView.axaml

@@ -18,7 +18,7 @@
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             FontSize="14"
             Margin="0,20,0,20"
-            Text="{CompiledBinding ImageTxt,
+            Text="{CompiledBinding Translation.Image,
                                    Mode=OneWay}" />
 
         <ToggleButton
@@ -27,7 +27,7 @@
             Classes="altHover"
             IsChecked="{CompiledBinding IsStretched}"
             Margin="0,0,0,10"
-            ToolTip.Tip="{CompiledBinding Stretch,
+            ToolTip.Tip="{CompiledBinding Translation.Stretch,
                                           Mode=OneWay}"
             Width="300">
             <TextBlock
@@ -35,7 +35,7 @@
                 Margin="0"
                 MaxWidth="240"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding Stretch,
+                Text="{CompiledBinding Translation.Stretch,
                                        Mode=OneWay}" />
         </ToggleButton>
 
@@ -52,7 +52,7 @@
                 Margin="0"
                 MaxWidth="240"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding GetIsScrollingTranslation,
+                Text="{CompiledBinding Translation.IsScrolling,
                                        Mode=OneWay}" />
         </ToggleButton>
 
@@ -62,7 +62,7 @@
             BorderThickness="0"
             Classes="altHover"
             Command="{CompiledBinding ShowSideBySideCommand}"
-            IsChecked="{CompiledBinding IsShowingSideBySide}"
+            IsChecked="{CompiledBinding PicViewer.IsShowingSideBySide}"
             Margin="0,0,0,10"
             Width="300">
             <TextBlock
@@ -70,7 +70,7 @@
                 Margin="0"
                 MaxWidth="240"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding SideBySide,
+                Text="{CompiledBinding Translation.SideBySide,
                                        Mode=OneWay}" />
         </ToggleButton>
 
@@ -80,7 +80,7 @@
             FontSize="14"
             Foreground="{StaticResource SecondaryTextColor}"
             Margin="0,20,0,20"
-            Text="{CompiledBinding ImageAliasing,
+            Text="{CompiledBinding Translation.ImageAliasing,
                                    Mode=OneWay}" />
         <ComboBox
             Background="{DynamicResource SecondaryBackgroundColor}"
@@ -91,8 +91,8 @@
             Padding="5,7,0,7"
             Width="300"
             x:Name="ImageAliasingBox">
-            <ComboBoxItem Content="{CompiledBinding HighQuality, Mode=OneWay}" />
-            <ComboBoxItem Content="{CompiledBinding None, Mode=OneWay}" />
+            <ComboBoxItem Content="{CompiledBinding Translation.HighQuality, Mode=OneWay}" />
+            <ComboBoxItem Content="{CompiledBinding Translation.None, Mode=OneWay}" />
         </ComboBox>
 
     </StackPanel>

+ 8 - 8
src/PicView.Avalonia/Views/ImageViewer.axaml

@@ -17,30 +17,30 @@
     <LayoutTransformControl x:Name="ImageLayoutTransformControl">
         <customControls:AutoScrollViewer
             Focusable="False"
-            Height="{CompiledBinding ScrollViewerHeight,
+            Height="{CompiledBinding PicViewer.ScrollViewerHeight,
                                      Mode=OneWay}"
             ScrollChanged="ImageScrollViewer_OnScrollChanged"
             VerticalScrollBarVisibility="{CompiledBinding ToggleScrollBarVisibility}"
-            Width="{CompiledBinding ScrollViewerWidth,
+            Width="{CompiledBinding PicViewer.ScrollViewerWidth,
                                     Mode=OneWay}"
             x:Name="ImageScrollViewer">
             <Border
-                Height="{CompiledBinding ImageHeight,
+                Height="{CompiledBinding PicViewer.ImageHeight,
                                          Mode=OneWay}"
-                Width="{CompiledBinding ImageWidth,
+                Width="{CompiledBinding PicViewer.ImageWidth,
                                         Mode=OneWay}"
                 x:Name="MainBorder">
                 <customControls:PicBox
-                    ImageType="{CompiledBinding ImageType,
+                    ImageType="{CompiledBinding PicViewer.ImageType,
                                                 Mode=OneWay}"
                     PointerMoved="MainImage_OnPointerMoved"
                     PointerPressed="MainImage_OnPointerPressed"
                     PointerReleased="MainImage_OnPointerReleased"
-                    SecondaryImageWidth="{CompiledBinding SecondaryImageWidth,
+                    SecondaryImageWidth="{CompiledBinding PicViewer.SecondaryImageWidth,
                                                           Mode=OneWay}"
-                    SecondarySource="{CompiledBinding SecondaryImageSource,
+                    SecondarySource="{CompiledBinding PicViewer.SecondaryImageSource,
                                                       Mode=OneWay}"
-                    Source="{CompiledBinding ImageSource,
+                    Source="{CompiledBinding PicViewer.ImageSource,
                                              Mode=OneWay}"
                     UseLayoutRounding="True"
                     x:Name="MainImage" />

+ 10 - 10
src/PicView.Avalonia/Views/ImageViewer.axaml.cs

@@ -261,18 +261,18 @@ public partial class ImageViewer : UserControl
             return;
         }
         int prevScaleX;
-        vm.ScaleX = vm.ScaleX == -1 ? 1 : -1;
-        if (vm.ScaleX == 1)
+        vm.PicViewer.ScaleX = vm.PicViewer.ScaleX == -1 ? 1 : -1;
+        if (vm.PicViewer.ScaleX == 1)
         {
             prevScaleX = 1;
-            vm.ScaleX = -1;
-            vm.GetIsFlippedTranslation = vm.UnFlip;
+            vm.PicViewer.ScaleX = -1;
+            vm.Translation.IsFlipped = vm.Translation.UnFlip;
         }
         else
         {
             prevScaleX = -1;
-            vm.ScaleX = 1;
-            vm.GetIsFlippedTranslation = vm.Flip;
+            vm.PicViewer.ScaleX = 1;
+            vm.Translation.IsFlipped = vm.Translation.Flip;
         }
         
         if (animate)
@@ -285,11 +285,11 @@ public partial class ImageViewer : UserControl
                 ]
             };
             ImageLayoutTransformControl.RenderTransform = flipTransform;
-            flipTransform.ScaleX = vm.ScaleX;
+            flipTransform.ScaleX = vm.PicViewer.ScaleX;
         }
         else
         {
-            var flipTransform = new ScaleTransform(vm.ScaleX, 1);
+            var flipTransform = new ScaleTransform(vm.PicViewer.ScaleX, 1);
             ImageLayoutTransformControl.RenderTransform = flipTransform;
         }
     }
@@ -299,9 +299,9 @@ public partial class ImageViewer : UserControl
         if (DataContext is not MainViewModel vm)
             return;
 
-        vm.ScaleX = scaleX;
+        vm.PicViewer.ScaleX = scaleX;
         vm.RotationAngle = rotationAngle;
-        var flipTransform = new ScaleTransform(vm.ScaleX, 1);
+        var flipTransform = new ScaleTransform(vm.PicViewer.ScaleX, 1);
         ImageLayoutTransformControl.RenderTransform = flipTransform;
         
         var rotateTransform = new RotateTransform(rotationAngle);

Разлика између датотеке није приказан због своје велике величине
+ 135 - 135
src/PicView.Avalonia/Views/KeybindingsView.axaml


+ 1 - 1
src/PicView.Avalonia/Views/LanguageView.axaml

@@ -11,7 +11,7 @@
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             FontSize="14"
             Margin="0,20,0,20"
-            Text="{CompiledBinding Language,
+            Text="{CompiledBinding Translation.Language,
                                    Mode=OneWay}" />
         <ComboBox
             Background="{DynamicResource SecondaryBackgroundColor}"

+ 1 - 1
src/PicView.Avalonia/Views/LanguageView.axaml.cs

@@ -113,7 +113,7 @@ public partial class LanguageView : UserControl
                 Settings.UIProperties.UserLanguage = language;
 
                 await TranslationManager.LoadLanguage(language).ConfigureAwait(false);
-                await LanguageUpdater.UpdateLanguageAsync(vm, true).ConfigureAwait(false);
+                await LanguageUpdater.UpdateLanguageAsync(vm.Translation, vm.PicViewer, true).ConfigureAwait(false);
             };
         };
     }

+ 119 - 119
src/PicView.Avalonia/Views/MainView.axaml

@@ -28,7 +28,7 @@
             <!--  Open  -->
             <MenuItem
                 Command="{CompiledBinding OpenFileCommand}"
-                Header="{CompiledBinding Open,
+                Header="{CompiledBinding Translation.Open,
                                          Mode=OneWay}"
                 MinWidth="180">
                 <MenuItem.Icon>
@@ -44,9 +44,9 @@
             <!--  Save  -->
             <MenuItem
                 Command="{CompiledBinding SaveFileCommand}"
-                Header="{CompiledBinding Save,
+                Header="{CompiledBinding Translation.Save,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding ImageSource,
+                IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                             Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Path
@@ -61,9 +61,9 @@
             <!--  Save as  -->
             <MenuItem
                 Command="{CompiledBinding SaveFileAsCommand}"
-                Header="{CompiledBinding SaveAs,
+                Header="{CompiledBinding Translation.SaveAs,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding ImageSource,
+                IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                             Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Path
@@ -78,11 +78,11 @@
             <!--  Print  -->
             <MenuItem
                 Command="{CompiledBinding PrintCommand}"
-                CommandParameter="{CompiledBinding FileInfo.FullName,
+                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
-                Header="{CompiledBinding Print,
+                Header="{CompiledBinding Translation.Print,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding ImageSource,
+                IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                             Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Path
@@ -97,11 +97,11 @@
             <!--  Open with  -->
             <MenuItem
                 Command="{CompiledBinding OpenWithCommand}"
-                CommandParameter="{CompiledBinding FileInfo.FullName,
+                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
-                Header="{CompiledBinding OpenWith,
+                Header="{CompiledBinding Translation.OpenWith,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding ImageSource,
+                IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                             Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Path
@@ -116,9 +116,9 @@
             <!--  Locate on disk  -->
             <MenuItem
                 Command="{CompiledBinding LocateOnDiskCommand}"
-                CommandParameter="{CompiledBinding FileInfo.FullName,
+                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
-                Header="{CompiledBinding ShowInFolder,
+                Header="{CompiledBinding Translation.ShowInFolder,
                                          Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
@@ -133,7 +133,7 @@
             <Separator />
 
             <!--  Sort files by  -->
-            <MenuItem Header="{CompiledBinding SortFilesBy, Mode=OneWay}">
+            <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"
@@ -147,7 +147,7 @@
                 <MenuItem
                     Command="{CompiledBinding SortFilesByNameCommand}"
                     GroupName="SortType"
-                    Header="{CompiledBinding FileName,
+                    Header="{CompiledBinding Translation.FileName,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding SortOrder,
                                                 Converter={StaticResource EnumToBoolConverter},
@@ -158,7 +158,7 @@
                 <MenuItem
                     Command="{CompiledBinding SortFilesBySizeCommand}"
                     GroupName="SortType"
-                    Header="{CompiledBinding FileSize,
+                    Header="{CompiledBinding Translation.FileSize,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding SortOrder,
                                                 Converter={StaticResource EnumToBoolConverter},
@@ -169,7 +169,7 @@
                 <MenuItem
                     Command="{CompiledBinding SortFilesByExtensionCommand}"
                     GroupName="SortType"
-                    Header="{CompiledBinding FileExtension,
+                    Header="{CompiledBinding Translation.FileExtension,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding SortOrder,
                                                 Converter={StaticResource EnumToBoolConverter},
@@ -180,7 +180,7 @@
                 <MenuItem
                     Command="{CompiledBinding SortFilesByCreationTimeCommand}"
                     GroupName="SortType"
-                    Header="{CompiledBinding Created,
+                    Header="{CompiledBinding Translation.Created,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding SortOrder,
                                                 Converter={StaticResource EnumToBoolConverter},
@@ -191,7 +191,7 @@
                 <MenuItem
                     Command="{CompiledBinding SortFilesByLastAccessTimeCommand}"
                     GroupName="SortType"
-                    Header="{CompiledBinding LastAccessTime,
+                    Header="{CompiledBinding Translation.LastAccessTime,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding SortOrder,
                                                 Converter={StaticResource EnumToBoolConverter},
@@ -202,7 +202,7 @@
                 <MenuItem
                     Command="{CompiledBinding SortFilesRandomlyCommand}"
                     GroupName="SortType"
-                    Header="{CompiledBinding Random,
+                    Header="{CompiledBinding Translation.Random,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding SortOrder,
                                                 Converter={StaticResource EnumToBoolConverter},
@@ -215,7 +215,7 @@
                 <MenuItem
                     Command="{CompiledBinding SortFilesAscendingCommand}"
                     GroupName="SortDirection"
-                    Header="{CompiledBinding Ascending,
+                    Header="{CompiledBinding Translation.Ascending,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding IsAscending}"
                     ToggleType="Radio" />
@@ -224,13 +224,13 @@
                 <MenuItem
                     Command="{CompiledBinding SortFilesDescendingCommand}"
                     GroupName="SortDirection"
-                    Header="{CompiledBinding Descending,
+                    Header="{CompiledBinding Translation.Descending,
                                              Mode=OneWay}"
                     ToggleType="Radio" />
             </MenuItem>
 
             <!--  Recent files  -->
-            <MenuItem Header="{Binding RecentFiles, Mode=OneWay}" x:Name="RecentFilesCM">
+            <MenuItem Header="{Binding Translation.RecentFiles, Mode=OneWay}" x:Name="RecentFilesCM">
                 <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"
@@ -242,7 +242,7 @@
             </MenuItem>
 
             <!--  Settings  -->
-            <MenuItem Header="{CompiledBinding Settings, Mode=OneWay}">
+            <MenuItem Header="{CompiledBinding Translation.Settings, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
                         Data="{StaticResource WrenchGeometry}"
@@ -255,7 +255,7 @@
                 <!--  Toggle Subdirectories  -->
                 <MenuItem
                     Command="{CompiledBinding ToggleSubdirectoriesCommand}"
-                    Header="{CompiledBinding SearchSubdirectory,
+                    Header="{CompiledBinding Translation.SearchSubdirectory,
                                              Mode=OneWay}"
                     IsChecked="{Binding IsIncludingSubdirectories}"
                     ToggleType="CheckBox" />
@@ -264,7 +264,7 @@
 
                 <!--  Toggle looping  -->
                 <MenuItem
-                    Header="{CompiledBinding GetIsLoopingTranslation,
+                    Header="{CompiledBinding Translation.IsLooping,
                                              Mode=OneWay}"
                     IsChecked="{Binding IsLooping}"
                     ToggleType="CheckBox" />
@@ -273,7 +273,7 @@
 
                 <!--  Toggle scrolling  -->
                 <MenuItem
-                    Header="{CompiledBinding GetIsScrollingTranslation,
+                    Header="{CompiledBinding Translation.IsScrolling,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding IsScrollingEnabled}"
                     ToggleType="CheckBox" />
@@ -281,7 +281,7 @@
                 <!--  Toggle stretching  -->
                 <MenuItem
                     Command="{CompiledBinding StretchCommand}"
-                    Header="{CompiledBinding Stretch,
+                    Header="{CompiledBinding Translation.Stretch,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding IsStretched}"
                     ToggleType="CheckBox" />
@@ -289,9 +289,9 @@
                 <!--  Toggle side-by-side  -->
                 <MenuItem
                     Command="{CompiledBinding ShowSideBySideCommand}"
-                    Header="{CompiledBinding SideBySide,
+                    Header="{CompiledBinding Translation.SideBySide,
                                              Mode=OneWay}"
-                    IsChecked="{CompiledBinding IsShowingSideBySide}"
+                    IsChecked="{CompiledBinding PicViewer.IsShowingSideBySide}"
                     ToggleType="CheckBox" />
 
                 <Separator />
@@ -299,7 +299,7 @@
                 <!--  Toggle topmost  -->
                 <MenuItem
                     Command="{CompiledBinding ChangeTopMostCommand}"
-                    Header="{CompiledBinding StayTopMost,
+                    Header="{CompiledBinding Translation.StayTopMost,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding IsTopMost}"
                     ToggleType="CheckBox" />
@@ -307,7 +307,7 @@
                 <!--  Toggle auto fit  -->
                 <MenuItem
                     Command="{CompiledBinding ChangeAutoFitCommand}"
-                    Header="{CompiledBinding AutoFitWindow,
+                    Header="{CompiledBinding Translation.AutoFitWindow,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding IsAutoFit}"
                     ToggleType="CheckBox" />
@@ -315,7 +315,7 @@
                 <Separator />
 
                 <!--  Toggle ctrl zoom  -->
-                <MenuItem Command="{CompiledBinding ChangeCtrlZoomCommand}" Header="{CompiledBinding GetIsCtrlZoomTranslation, Mode=OneWay}">
+                <MenuItem Command="{CompiledBinding ChangeCtrlZoomCommand}" Header="{CompiledBinding Translation.IsCtrlToZoom, Mode=OneWay}">
                     <MenuItem.Icon>
                         <Image
                             Height="12"
@@ -329,7 +329,7 @@
                 <!--  Toggle UI  -->
                 <MenuItem
                     Command="{CompiledBinding ToggleUICommand}"
-                    Header="{CompiledBinding GetIsShowingUITranslation,
+                    Header="{CompiledBinding Translation.IsShowingUI,
                                              Mode=OneWay}"
                     IsVisible="{CompiledBinding IsUIShown,
                                                 Mode=OneWay}">
@@ -343,7 +343,7 @@
 
                 <MenuItem
                     Command="{CompiledBinding ToggleUICommand}"
-                    Header="{CompiledBinding GetIsShowingUITranslation,
+                    Header="{CompiledBinding Translation.IsShowingUI,
                                              Mode=OneWay}"
                     IsVisible="{CompiledBinding !IsUIShown,
                                                 Mode=OneWay}">
@@ -358,7 +358,7 @@
                 <!--  Change background  -->
                 <MenuItem
                     Command="{CompiledBinding ChangeBackgroundCommand}"
-                    Header="{CompiledBinding ChangeBackground,
+                    Header="{CompiledBinding Translation.ChangeBackground,
                                              Mode=OneWay}"
                     StaysOpenOnClick="True">
                     <MenuItem.Icon>
@@ -372,7 +372,7 @@
                 <!--  Toggle bottom gallery  -->
                 <MenuItem
                     Command="{CompiledBinding ToggleBottomGalleryCommand}"
-                    Header="{CompiledBinding GetIsShowingBottomGalleryTranslation,
+                    Header="{CompiledBinding Translation.IsShowingBottomGallery,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding IsBottomGalleryShown}">
                     <MenuItem.Icon>
@@ -392,7 +392,7 @@
                 <!--  Toggle bottom bar  -->
                 <MenuItem
                     Command="{CompiledBinding ToggleBottomNavBarCommand}"
-                    Header="{CompiledBinding ShowBottomToolbar,
+                    Header="{CompiledBinding Translation.ShowBottomToolbar,
                                              Mode=OneWay}"
                     IsChecked="{CompiledBinding IsBottomToolbarShown}"
                     IsVisible="{CompiledBinding !IsBottomToolbarShown}"
@@ -408,7 +408,7 @@
                 <Separator />
 
                 <!--  Show Settings window  -->
-                <MenuItem Command="{CompiledBinding ShowSettingsWindowCommand}" Header="{CompiledBinding ShowAllSettingsWindow, Mode=OneWay}">
+                <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"
@@ -423,7 +423,7 @@
             <Separator />
 
             <!--  Navigation  -->
-            <MenuItem Header="{CompiledBinding Navigation, Mode=OneWay}">
+            <MenuItem Header="{CompiledBinding Translation.Navigation, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Image
                         Height="14"
@@ -434,9 +434,9 @@
                 <!--  Next  -->
                 <MenuItem
                     Command="{CompiledBinding NextCommand}"
-                    Header="{CompiledBinding NextImage,
+                    Header="{CompiledBinding Translation.NextImage,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     StaysOpenOnClick="True">
                     <MenuItem.Icon>
@@ -450,9 +450,9 @@
                 <!--  Prev  -->
                 <MenuItem
                     Command="{CompiledBinding PreviousCommand}"
-                    Header="{CompiledBinding PrevImage,
+                    Header="{CompiledBinding Translation.PrevImage,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     StaysOpenOnClick="True">
                     <MenuItem.Icon>
@@ -468,9 +468,9 @@
                 <!--  Next 10  -->
                 <MenuItem
                     Command="{CompiledBinding Skip10Command}"
-                    Header="{CompiledBinding AdvanceBy10Images,
+                    Header="{CompiledBinding Translation.AdvanceBy10Images,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     StaysOpenOnClick="True">
                     <MenuItem.Icon>
@@ -484,9 +484,9 @@
                 <!--  Next 100  -->
                 <MenuItem
                     Command="{CompiledBinding Skip100Command}"
-                    Header="{CompiledBinding AdvanceBy100Images,
+                    Header="{CompiledBinding Translation.AdvanceBy100Images,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     StaysOpenOnClick="True">
                     <MenuItem.Icon>
@@ -500,9 +500,9 @@
                 <!--  Prev 10  -->
                 <MenuItem
                     Command="{CompiledBinding Prev10Command}"
-                    Header="{CompiledBinding GoBackBy10Images,
+                    Header="{CompiledBinding Translation.GoBackBy10Images,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     StaysOpenOnClick="True">
                     <MenuItem.Icon>
@@ -516,9 +516,9 @@
                 <!--  Prev 100  -->
                 <MenuItem
                     Command="{CompiledBinding Prev100Command}"
-                    Header="{CompiledBinding GoBackBy100Images,
+                    Header="{CompiledBinding Translation.GoBackBy100Images,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     StaysOpenOnClick="True">
                     <MenuItem.Icon>
@@ -534,8 +534,8 @@
                 <!--  First Image  -->
                 <MenuItem
                     Command="{CompiledBinding FirstCommand}"
-                    Header="{CompiledBinding FirstImage}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    Header="{CompiledBinding Translation.FirstImage}"
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Image
@@ -548,9 +548,9 @@
                 <!--  Last Image  -->
                 <MenuItem
                     Command="{CompiledBinding LastCommand}"
-                    Header="{CompiledBinding LastImage,
+                    Header="{CompiledBinding Translation.LastImage,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Image
@@ -565,9 +565,9 @@
                 <!--  Next folder  -->
                 <MenuItem
                     Command="{CompiledBinding NextFolderCommand}"
-                    Header="{CompiledBinding NextFolder,
+                    Header="{CompiledBinding Translation.NextFolder,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Image
@@ -580,9 +580,9 @@
                 <!--  Prev folder  -->
                 <MenuItem
                     Command="{CompiledBinding PreviousFolderCommand}"
-                    Header="{CompiledBinding PrevFolder,
+                    Header="{CompiledBinding Translation.PrevFolder,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Image
@@ -597,9 +597,9 @@
 
             <!--  Set as wallpaper  -->
             <MenuItem
-                Header="{CompiledBinding SetAsWallpaper,
+                Header="{CompiledBinding Translation.SetAsWallpaper,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding ImageSource,
+                IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                             Converter={x:Static ObjectConverters.IsNotNull}}"
                 x:Name="WallpaperMenuItem">
                 <MenuItem.Icon>
@@ -614,11 +614,11 @@
                 <!--  Set as wallpaper filled  -->
                 <MenuItem
                     Command="{CompiledBinding SetAsWallpaperFilledCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
-                    Header="{CompiledBinding Fill,
+                    Header="{CompiledBinding Translation.Fill,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Path
@@ -633,11 +633,11 @@
                 <!--  Set as wallpaper fit  -->
                 <MenuItem
                     Command="{CompiledBinding SetAsWallpaperCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
-                    Header="{CompiledBinding Fit,
+                    Header="{CompiledBinding Translation.Fit,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Path
@@ -652,11 +652,11 @@
                 <!--  Set as wallpaper stretched  -->
                 <MenuItem
                     Command="{CompiledBinding SetAsWallpaperStretchedCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
-                    Header="{CompiledBinding Stretch,
+                    Header="{CompiledBinding Translation.Stretch,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Path
@@ -673,11 +673,11 @@
                 <!--  Set as wallpaper centered  -->
                 <MenuItem
                     Command="{CompiledBinding SetAsWallpaperCenteredCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
-                    Header="{CompiledBinding Center,
+                    Header="{CompiledBinding Translation.Center,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Path
@@ -692,11 +692,11 @@
                 <!--  Set as wallpaper tiled  -->
                 <MenuItem
                     Command="{CompiledBinding SetAsWallpaperTiledCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
-                    Header="{CompiledBinding Tile,
+                    Header="{CompiledBinding Translation.Tile,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Path
@@ -733,7 +733,7 @@
             <Separator />
 
             <!--  Image  -->
-            <MenuItem Header="{CompiledBinding ImageTxt, Mode=OneWay}">
+            <MenuItem Header="{CompiledBinding Translation.Image, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Image
                         Height="12"
@@ -742,7 +742,7 @@
                 </MenuItem.Icon>
 
                 <!--  Exif window  -->
-                <MenuItem Command="{CompiledBinding ShowExifWindowCommand}" Header="{CompiledBinding ImageInfo, Mode=OneWay}">
+                <MenuItem Command="{CompiledBinding ShowExifWindowCommand}" Header="{CompiledBinding Translation.ImageInfo, Mode=OneWay}">
                     <MenuItem.Icon>
                         <Path
                             Data="{StaticResource ImageInfoGeometry}"
@@ -756,11 +756,11 @@
                 <!--  File properties  -->
                 <MenuItem
                     Command="{CompiledBinding FilePropertiesCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
-                    Header="{CompiledBinding FileProperties,
+                    Header="{CompiledBinding Translation.FileProperties,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Path
@@ -773,7 +773,7 @@
                 </MenuItem>
 
                 <!--  Single image resize  -->
-                <MenuItem Command="{CompiledBinding ShowSingleImageResizeWindowCommand}" Header="{CompiledBinding ResizeImage, Mode=OneWay}">
+                <MenuItem Command="{CompiledBinding ShowSingleImageResizeWindowCommand}" Header="{CompiledBinding Translation.ResizeImage, Mode=OneWay}">
                     <MenuItem.Icon>
                         <Image
                             Height="12"
@@ -783,7 +783,7 @@
                 </MenuItem>
 
                 <!--  Batch resize  -->
-                <MenuItem Command="{CompiledBinding ShowBatchResizeWindowCommand}" Header="{CompiledBinding BatchResize, Mode=OneWay}">
+                <MenuItem Command="{CompiledBinding ShowBatchResizeWindowCommand}" Header="{CompiledBinding Translation.BatchResize, Mode=OneWay}">
                     <MenuItem.Icon>
                         <Image
                             Height="12"
@@ -797,7 +797,7 @@
                 <!--  Optimize image  -->
                 <MenuItem
                     Command="{CompiledBinding OptimizeImageCommand}"
-                    Header="{CompiledBinding OptimizeImage,
+                    Header="{CompiledBinding Translation.OptimizeImage,
                                              Mode=OneWay}"
                     IsEnabled="{CompiledBinding ShouldOptimizeImageBeEnabled,
                                                 Mode=OneWay}">
@@ -814,7 +814,7 @@
                 <!--  Crop  -->
                 <MenuItem
                     Command="{CompiledBinding CropCommand}"
-                    Header="{CompiledBinding Crop,
+                    Header="{CompiledBinding Translation.Crop,
                                              Mode=OneWay}"
                     IsEnabled="{CompiledBinding ShouldCropBeEnabled,
                                                 Mode=OneWay}"
@@ -834,8 +834,8 @@
                 <!--  Flip  -->
                 <MenuItem
                     Command="{CompiledBinding FlipCommand}"
-                    Header="{CompiledBinding GetIsFlippedTranslation}"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    Header="{CompiledBinding Translation.IsFlipped}"
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     StaysOpenOnClick="True">
                     <MenuItem.Icon>
@@ -846,7 +846,7 @@
                             Stretch="Fill"
                             Width="12">
                             <Path.RenderTransform>
-                                <ScaleTransform ScaleX="{CompiledBinding ScaleX}" />
+                                <ScaleTransform ScaleX="{CompiledBinding PicViewer.ScaleX}" />
                             </Path.RenderTransform>
                         </Path>
                     </MenuItem.Icon>
@@ -855,9 +855,9 @@
                 <!--  Rotate left  -->
                 <MenuItem
                     Command="{CompiledBinding RotateLeftCommand}"
-                    Header="{CompiledBinding RotateLeft,
+                    Header="{CompiledBinding Translation.RotateLeft,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     StaysOpenOnClick="True">
                     <MenuItem.Icon>
@@ -873,9 +873,9 @@
                 <!--  Rotate right  -->
                 <MenuItem
                     Command="{CompiledBinding RotateRightCommand}"
-                    Header="{CompiledBinding RotateRight,
+                    Header="{CompiledBinding Translation.RotateRight,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
                     StaysOpenOnClick="True">
                     <MenuItem.Icon>
@@ -894,11 +894,11 @@
             <!--  Delete file  -->
             <MenuItem
                 Command="{CompiledBinding RecycleFileCommand}"
-                CommandParameter="{CompiledBinding FileInfo.FullName,
+                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
-                Header="{CompiledBinding DeleteFile,
+                Header="{CompiledBinding Translation.DeleteFile,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Path
@@ -913,7 +913,7 @@
             <Separator />
 
             <!--  Paste  -->
-            <MenuItem Command="{CompiledBinding PasteCommand}" Header="{CompiledBinding FilePaste, Mode=OneWay}">
+            <MenuItem Command="{CompiledBinding PasteCommand}" Header="{CompiledBinding Translation.File, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
                         Data="{StaticResource PasteGeometry}"
@@ -927,9 +927,9 @@
             <!--  Copy  -->
             <MenuItem
                 Command="{CompiledBinding CopyFileCommand}"
-                CommandParameter="{CompiledBinding FileInfo.FullName,
+                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
-                Header="{CompiledBinding Copy,
+                Header="{CompiledBinding Translation.Copy,
                                          Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
@@ -943,9 +943,9 @@
                 <!--  Copy image  -->
                 <MenuItem
                     Command="{CompiledBinding CopyImageCommand}"
-                    Header="{CompiledBinding CopyImage,
+                    Header="{CompiledBinding Translation.CopyImage,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Path
@@ -960,10 +960,10 @@
                 <!--  Copy file path  -->
                 <MenuItem
                     Command="{CompiledBinding CopyFilePathCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
-                    Header="{Binding FileCopyPath, Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    Header="{Binding Translation.FileCopyPath, Mode=OneWay}"
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Path
@@ -978,13 +978,13 @@
                 <!--  Copy base64  -->
                 <MenuItem
                     Command="{CompiledBinding CopyBase64Command}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Header>
                         <TextBlock>
-                            <Run Text="{CompiledBinding Copy, Mode=OneWay}" />
+                            <Run Text="{CompiledBinding Translation.Copy, Mode=OneWay}" />
                             <Run Text=" base64" />
                         </TextBlock>
                     </MenuItem.Header>
@@ -1003,11 +1003,11 @@
                 <!--  Duplicate file  -->
                 <MenuItem
                     Command="{CompiledBinding DuplicateFileCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
-                    Header="{CompiledBinding DuplicateFile,
+                    Header="{CompiledBinding Translation.DuplicateFile,
                                              Mode=OneWay}"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Icon>
                         <Path
@@ -1022,9 +1022,9 @@
                 <!--  Cut  -->
                 <MenuItem
                     Command="{CompiledBinding CutCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
-                    Header="{CompiledBinding FileCut,
+                    Header="{CompiledBinding Translation.FileCut,
                                              Mode=OneWay}"
                     IsEnabled="False">
                     <MenuItem.Icon>
@@ -1041,11 +1041,11 @@
             <!--  Copy file  -->
             <MenuItem
                 Command="{CompiledBinding CopyFileCommand}"
-                CommandParameter="{CompiledBinding FileInfo.FullName,
+                CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                    FallbackValue=''}"
-                Header="{CompiledBinding CopyFile,
+                Header="{CompiledBinding Translation.CopyFile,
                                          Mode=OneWay}"
-                IsEnabled="{CompiledBinding FileInfo,
+                IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                             Converter={x:Static ObjectConverters.IsNotNull}}">
                 <MenuItem.Icon>
                     <Path
@@ -1062,7 +1062,7 @@
             <!--  Fullscreen  -->
             <MenuItem
                 Command="{CompiledBinding ToggleFullscreenCommand}"
-                Header="{CompiledBinding FullscreenTxt,
+                Header="{CompiledBinding Translation.Fullscreen,
                                          Mode=OneWay}"
                 IsVisible="{CompiledBinding !IsFullscreen,
                                             Mode=OneWay}">
@@ -1079,7 +1079,7 @@
             <!--  Maximize  -->
             <MenuItem
                 Command="{CompiledBinding MaximizeCommand}"
-                Header="{CompiledBinding Maximize,
+                Header="{CompiledBinding Translation.Maximize,
                                          Mode=OneWay}"
                 IsVisible="{CompiledBinding ShouldMaximizeBeShown,
                                             Mode=OneWay}"
@@ -1096,7 +1096,7 @@
             <!--  Restore  -->
             <MenuItem
                 Command="{CompiledBinding RestoreCommand}"
-                Header="{CompiledBinding RestoreDown,
+                Header="{CompiledBinding Translation.RestoreDown,
                                          Mode=OneWay}"
                 IsVisible="{CompiledBinding ShouldRestore,
                                             Mode=OneWay}">
@@ -1111,7 +1111,7 @@
             </MenuItem>
 
             <!--  Close  -->
-            <MenuItem Command="{CompiledBinding ExitCommand}" Header="{CompiledBinding Close, Mode=OneWay}">
+            <MenuItem Command="{CompiledBinding ExitCommand}" Header="{CompiledBinding Translation.Close, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
                         Data="{StaticResource CloseGeometry}"

+ 7 - 7
src/PicView.Avalonia/Views/MouseWheelView.axaml

@@ -18,7 +18,7 @@
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             FontSize="14"
             Margin="0,20,0,20"
-            Text="{CompiledBinding MouseWheel,
+            Text="{CompiledBinding Translation.MouseWheel,
                                    Mode=OneWay}" />
 
         <ComboBox
@@ -30,8 +30,8 @@
             Padding="5,7,0,7"
             Width="300"
             x:Name="MouseWheelBox">
-            <ComboBoxItem Content="{CompiledBinding CtrlToZoom, Mode=OneWay}" />
-            <ComboBoxItem Content="{CompiledBinding ScrollToZoom, Mode=OneWay}" />
+            <ComboBoxItem Content="{CompiledBinding Translation.CtrlToZoom, Mode=OneWay}" />
+            <ComboBoxItem Content="{CompiledBinding Translation.ScrollToZoom, Mode=OneWay}" />
         </ComboBox>
 
         <TextBlock
@@ -40,7 +40,7 @@
             FontSize="14"
             Margin="0,10,0,10"
             MaxWidth="300"
-            Text="{CompiledBinding ScrollDirection,
+            Text="{CompiledBinding Translation.ScrollDirection,
                                    Mode=OneWay}" />
         <ComboBox
             Background="{DynamicResource SecondaryBackgroundColor}"
@@ -51,8 +51,8 @@
             Padding="5,7,0,7"
             Width="300"
             x:Name="ScrollDirectionBox">
-            <ComboBoxItem Content="{CompiledBinding Reverse, Mode=OneWay}" />
-            <ComboBoxItem Content="{CompiledBinding Forward, Mode=OneWay}" />
+            <ComboBoxItem Content="{CompiledBinding Translation.Reverse, Mode=OneWay}" />
+            <ComboBoxItem Content="{CompiledBinding Translation.Forward, Mode=OneWay}" />
         </ComboBox>
 
         <Button
@@ -116,7 +116,7 @@
                     Margin="0"
                     MaxWidth="240"
                     Padding="0,1,5,0"
-                    Text="{CompiledBinding GetIsUsingTouchpadTranslation,
+                    Text="{CompiledBinding Translation.IsUsingTouchpad,
                                            Mode=OneWay}" />
             </StackPanel>
         </Button>

+ 7 - 7
src/PicView.Avalonia/Views/NavigationView.axaml

@@ -19,7 +19,7 @@
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             FontSize="14"
             Margin="0,20,0,20"
-            Text="{CompiledBinding Navigation,
+            Text="{CompiledBinding Translation.Navigation,
                                    Mode=OneWay}" />
 
         <ToggleButton
@@ -35,7 +35,7 @@
                 Margin="0"
                 MaxWidth="240"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding SearchSubdirectory,
+                Text="{CompiledBinding Translation.SearchSubdirectory,
                                        Mode=OneWay}" />
         </ToggleButton>
 
@@ -46,7 +46,7 @@
             Command="{CompiledBinding ToggleLoopingCommand}"
             IsChecked="{CompiledBinding IsLooping}"
             Margin="0,0,0,10"
-            ToolTip.Tip="{CompiledBinding ToggleLooping,
+            ToolTip.Tip="{CompiledBinding Translation.ToggleLooping,
                                           Mode=OneWay}"
             Width="300">
             <TextBlock
@@ -54,7 +54,7 @@
                 Margin="0"
                 MaxWidth="240"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding GetIsLoopingTranslation,
+                Text="{CompiledBinding Translation.IsLooping,
                                        Mode=OneWay}" />
         </ToggleButton>
 
@@ -72,7 +72,7 @@
                 Margin="0"
                 MaxWidth="240"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding ToggleTaskbarProgress,
+                Text="{CompiledBinding Translation.ToggleTaskbarProgress,
                                        Mode=OneWay}" />
         </ToggleButton>
 
@@ -82,7 +82,7 @@
             FontSize="14"
             Margin="0,10,0,10"
             MaxWidth="300"
-            Text="{CompiledBinding AdjustNavSpeed,
+            Text="{CompiledBinding Translation.AdjustNavSpeed,
                                    Mode=OneWay}" />
         <customControls:CustomSlider
             Height="30"
@@ -103,7 +103,7 @@
             Foreground="{DynamicResource MainTextColorFaded}"
             Margin="0,0,0,15">
             <Run Text="{CompiledBinding GetNavSpeed, Mode=OneWay}" />
-            <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+            <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
         </TextBlock>
     </StackPanel>
 </UserControl>

+ 13 - 13
src/PicView.Avalonia/Views/SettingsView.axaml

@@ -693,7 +693,7 @@
                             <TextBlock
                                 Classes="txt txtShadow"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{Binding GeneralSettings, Mode=OneWay}" />
+                                Text="{Binding Translation.GeneralSettings, Mode=OneWay}" />
                         </StackPanel>
                     </TabItem.Header>
                     <customControls:AutoScrollViewer>
@@ -712,7 +712,7 @@
                             <TextBlock
                                 Classes="txt txtShadow"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{Binding Appearance, Mode=OneWay}" />
+                                Text="{Binding Translation.Appearance, Mode=OneWay}" />
                         </StackPanel>
                     </TabItem.Header>
                     <customControls:AutoScrollViewer>
@@ -731,7 +731,7 @@
                             <TextBlock
                                 Classes="txt txtShadow"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{Binding ImageTxt, Mode=OneWay}" />
+                                Text="{Binding Translation.Image, Mode=OneWay}" />
                         </StackPanel>
                     </TabItem.Header>
                     <customControls:AutoScrollViewer>
@@ -750,7 +750,7 @@
                             <TextBlock
                                 Classes="txt txtShadow"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{CompiledBinding GallerySettings,
+                                Text="{CompiledBinding Translation.GallerySettings,
                                                        Mode=OneWay}" />
                         </StackPanel>
                     </TabItem.Header>
@@ -770,7 +770,7 @@
                             <TextBlock
                                 Classes="txt txtShadow"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{CompiledBinding Slideshow,
+                                Text="{CompiledBinding Translation.Slideshow,
                                                        Mode=OneWay}" />
                         </StackPanel>
                     </TabItem.Header>
@@ -790,7 +790,7 @@
                             <TextBlock
                                 Classes="txt txtShadow"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{CompiledBinding Navigation}" />
+                                Text="{CompiledBinding Translation.Navigation}" />
                         </StackPanel>
                     </TabItem.Header>
 
@@ -810,7 +810,7 @@
                             <TextBlock
                                 Classes="txt txtShadow"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{CompiledBinding Zoom}" />
+                                Text="{CompiledBinding Translation.Zoom}" />
                         </StackPanel>
                     </TabItem.Header>
                     <customControls:AutoScrollViewer>
@@ -829,7 +829,7 @@
                             <TextBlock
                                 Classes="txt txtShadow"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{CompiledBinding MouseWheel}" />
+                                Text="{CompiledBinding Translation.MouseWheel}" />
                         </StackPanel>
                     </TabItem.Header>
                     <customControls:AutoScrollViewer>
@@ -848,7 +848,7 @@
                             <TextBlock
                                 Classes="txt txtShadow"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{CompiledBinding Language}" />
+                                Text="{CompiledBinding Translation.Language}" />
                         </StackPanel>
                     </TabItem.Header>
                     <customControls:AutoScrollViewer>
@@ -867,7 +867,7 @@
                             <TextBlock
                                 Classes="txt txtShadow"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{CompiledBinding ApplicationShortcuts}" />
+                                Text="{CompiledBinding Translation.ApplicationShortcuts}" />
                         </StackPanel>
                     </TabItem.Header>
                     <Button
@@ -878,7 +878,7 @@
                         HorizontalAlignment="Left"
                         Margin="65,50,0,20"
                         Padding="0,0,7,0"
-                        ToolTip.Tip="{CompiledBinding ApplicationShortcuts,
+                        ToolTip.Tip="{CompiledBinding Translation.ApplicationShortcuts,
                                                       Mode=OneWay}"
                         VerticalAlignment="Top"
                         Width="NaN">
@@ -891,7 +891,7 @@
                             <TextBlock
                                 Classes="txt"
                                 Foreground="{StaticResource SecondaryTextColor}"
-                                Text="{CompiledBinding ApplicationShortcuts,
+                                Text="{CompiledBinding Translation.ApplicationShortcuts,
                                                        Mode=OneWay}" />
                         </StackPanel>
                     </Button>
@@ -956,7 +956,7 @@
                 <TextBlock
                     Classes="txt"
                     Foreground="{StaticResource SecondaryTextColor}"
-                    Text="{CompiledBinding ResetButtonText,
+                    Text="{CompiledBinding Translation.ResetButtonText,
                                            Mode=OneWay}" />
             </StackPanel>
 

+ 12 - 12
src/PicView.Avalonia/Views/SingleImageResizeView.axaml

@@ -24,7 +24,7 @@
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontSize="14"
                             Margin="4,0,0,5"
-                            Text="{CompiledBinding Width,
+                            Text="{CompiledBinding Translation.Width,
                                                    Mode=OneWay}" />
                         <customControls:NumTextBox
                             Background="{DynamicResource SecondaryBackgroundColor}"
@@ -33,9 +33,9 @@
                             Foreground="{StaticResource SecondaryTextColor}"
                             Height="35"
                             Margin="0"
-                            Text="{CompiledBinding PixelWidth,
+                            Text="{CompiledBinding PicViewer.PixelWidth,
                                                    Mode=OneWay}"
-                            ToolTip.Tip="{CompiledBinding SizeTooltip,
+                            ToolTip.Tip="{CompiledBinding Translation.SizeTooltip,
                                                           Mode=OneWay}"
                             Width="195"
                             x:Name="PixelWidthTextBox" />
@@ -71,7 +71,7 @@
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontSize="14"
                             Margin="4,0,0,5"
-                            Text="{CompiledBinding Height,
+                            Text="{CompiledBinding Translation.Height,
                                                    Mode=OneWay}" />
                         <customControls:NumTextBox
                             Background="{DynamicResource SecondaryBackgroundColor}"
@@ -80,9 +80,9 @@
                             Foreground="{StaticResource SecondaryTextColor}"
                             Height="35"
                             Margin="0"
-                            Text="{CompiledBinding PixelHeight,
+                            Text="{CompiledBinding PicViewer.PixelHeight,
                                                    Mode=OneWay}"
-                            ToolTip.Tip="{CompiledBinding SizeTooltip,
+                            ToolTip.Tip="{CompiledBinding Translation.SizeTooltip,
                                                           Mode=OneWay}"
                             Width="195"
                             x:Name="PixelHeightTextBox" />
@@ -96,7 +96,7 @@
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontSize="14"
                             Margin="5,0,0,2"
-                            Text="{CompiledBinding Quality,
+                            Text="{CompiledBinding Translation.Quality,
                                                    Mode=OneWay}" />
                         <customControls:CustomSlider
                             IsSnapToTickEnabled="True"
@@ -118,7 +118,7 @@
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontSize="14"
                             Margin="5,0,0,5"
-                            Text="{CompiledBinding ConvertTo,
+                            Text="{CompiledBinding Translation.ConvertTo,
                                                    Mode=OneWay}" />
                         <ComboBox
                             Background="{DynamicResource SecondaryBackgroundColor}"
@@ -133,7 +133,7 @@
                             SelectedIndex="0"
                             Width="195"
                             x:Name="ConversionComboBox">
-                            <ComboBoxItem Content="{CompiledBinding NoConversion, Mode=OneWay}" x:Name="NoConversion" />
+                            <ComboBoxItem Content="{CompiledBinding Translation.NoConversion, Mode=OneWay}" x:Name="NoConversion" />
                             <ComboBoxItem Content=".png" x:Name="PngItem" />
                             <ComboBoxItem Content=".jpg" x:Name="JpgItem" />
                             <ComboBoxItem Content=".webp" x:Name="WebpItem" />
@@ -157,7 +157,7 @@
                     x:Name="ResetButton">
                     <TextBlock
                         Classes="txt"
-                        Text="{CompiledBinding Reset,
+                        Text="{CompiledBinding Translation.Reset,
                                                Mode=OneWay}"
                         TextAlignment="Center" />
                 </Button>
@@ -170,7 +170,7 @@
                     x:Name="SaveButton">
                     <TextBlock
                         Classes="txt"
-                        Text="{CompiledBinding Save,
+                        Text="{CompiledBinding Translation.Save,
                                                Mode=OneWay}"
                         TextAlignment="Center" />
                     <SplitButton.Flyout>
@@ -182,7 +182,7 @@
                                 <TextBlock
                                     Classes="txt"
                                     Foreground="{DynamicResource MainTextColor}"
-                                    Text="{CompiledBinding SaveAs,
+                                    Text="{CompiledBinding Translation.SaveAs,
                                                            Mode=OneWay}"
                                     TextAlignment="Center" />
                             </Button>

+ 17 - 17
src/PicView.Avalonia/Views/SingleImageResizeView.axaml.cs

@@ -33,9 +33,9 @@ public partial class SingleImageResizeView : UserControl
     {
         if (DataContext is not MainViewModel vm) return;
 
-        _aspectRatio = (double)vm.PixelWidth / vm.PixelHeight;
+        _aspectRatio = (double)vm.PicViewer.PixelWidth / vm.PicViewer.PixelHeight;
         InitializeEventHandlers(vm);
-        _imageUpdateSubscription = vm.WhenAnyValue(x => x.FileInfo).Select(x => x is not null).Subscribe(_ =>
+        _imageUpdateSubscription = vm.PicViewer.WhenAnyValue(x => x.FileInfo).Select(x => x is not null).Subscribe(_ =>
         {
             Dispatcher.UIThread.Invoke(SetIsQualitySliderEnabled);
         });
@@ -84,12 +84,12 @@ public partial class SingleImageResizeView : UserControl
                 QualitySlider.IsEnabled = true;
                 QualitySlider.Value = 75;
             }
-            else if (vm.FileInfo.Extension.Equals(".jpg", StringComparison.OrdinalIgnoreCase) ||
-                     vm.FileInfo.Extension.Equals(".jpeg", StringComparison.OrdinalIgnoreCase) ||
-                     vm.FileInfo.Extension.Equals(".png", StringComparison.OrdinalIgnoreCase))
+            else if (vm.PicViewer.FileInfo.Extension.Equals(".jpg", StringComparison.OrdinalIgnoreCase) ||
+                     vm.PicViewer.FileInfo.Extension.Equals(".jpeg", StringComparison.OrdinalIgnoreCase) ||
+                     vm.PicViewer.FileInfo.Extension.Equals(".png", StringComparison.OrdinalIgnoreCase))
             {
                 QualitySlider.IsEnabled = true;
-                var quality = ImageAnalyzer.GetCompressionQuality(vm.FileInfo.FullName);
+                var quality = ImageAnalyzer.GetCompressionQuality(vm.PicViewer.FileInfo.FullName);
                 QualitySlider.Value = quality;
             }
             else
@@ -121,10 +121,10 @@ public partial class SingleImageResizeView : UserControl
             return;
         }
 
-        var fileInfoFullName = vm.FileInfo.FullName;
+        var fileInfoFullName = vm.PicViewer.FileInfo.FullName;
         var ext = DetermineFileExtension(vm, ref fileInfoFullName);
         
-        var file = await FilePicker.PickFileForSavingAsync(vm.FileInfo?.FullName, ext);
+        var file = await FilePicker.PickFileForSavingAsync(vm.PicViewer.FileInfo?.FullName, ext);
         if (file is null)
         {
             return;
@@ -134,7 +134,7 @@ public partial class SingleImageResizeView : UserControl
 
     private async Task SaveImage(MainViewModel vm)
     {
-        await DoSaveImage(vm, vm.FileInfo.FullName).ConfigureAwait(false);
+        await DoSaveImage(vm, vm.PicViewer.FileInfo.FullName).ConfigureAwait(false);
     }
 
     private async Task DoSaveImage(MainViewModel vm, string destination)
@@ -149,7 +149,7 @@ public partial class SingleImageResizeView : UserControl
 
         const int rotationAngle = 0; // TODO make a control for adjusting rotation
 
-        var file = vm.FileInfo.FullName;
+        var file = vm.PicViewer.FileInfo.FullName;
         var ext = DetermineFileExtension(vm, ref destination);
         destination = Path.ChangeExtension(destination, ext);
         var sameFile = file.Equals(destination, StringComparison.OrdinalIgnoreCase);
@@ -192,7 +192,7 @@ public partial class SingleImageResizeView : UserControl
 
     private string DetermineFileExtension(MainViewModel vm, ref string destination)
     {
-        var ext = vm.FileInfo.Extension;
+        var ext = vm.PicViewer.FileInfo.Extension;
         if (NoConversion.IsSelected)
         {
             return ext;
@@ -249,14 +249,14 @@ public partial class SingleImageResizeView : UserControl
 
     private void ResetSettings(MainViewModel vm)
     {
-        PixelWidthTextBox.Text = vm.PixelWidth.ToString();
-        PixelHeightTextBox.Text = vm.PixelHeight.ToString();
-        if (vm.FileInfo.Extension.Equals(".jpg", StringComparison.OrdinalIgnoreCase) ||
-            vm.FileInfo.Extension.Equals(".jpeg", StringComparison.OrdinalIgnoreCase) ||
-            vm.FileInfo.Extension.Equals(".png", StringComparison.OrdinalIgnoreCase))
+        PixelWidthTextBox.Text = vm.PicViewer.PixelWidth.ToString();
+        PixelHeightTextBox.Text = vm.PicViewer.PixelHeight.ToString();
+        if (vm.PicViewer.FileInfo.Extension.Equals(".jpg", StringComparison.OrdinalIgnoreCase) ||
+            vm.PicViewer.FileInfo.Extension.Equals(".jpeg", StringComparison.OrdinalIgnoreCase) ||
+            vm.PicViewer.FileInfo.Extension.Equals(".png", StringComparison.OrdinalIgnoreCase))
         {
             QualitySlider.IsEnabled = true;
-            var quality = ImageAnalyzer.GetCompressionQuality(vm.FileInfo.FullName);
+            var quality = ImageAnalyzer.GetCompressionQuality(vm.PicViewer.FileInfo.FullName);
             QualitySlider.Value = quality;
         }
         else

+ 3 - 3
src/PicView.Avalonia/Views/SlideshowSettingsView.axaml

@@ -20,7 +20,7 @@
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             FontSize="14"
             Margin="0,20,0,20"
-            Text="{CompiledBinding Slideshow,
+            Text="{CompiledBinding Translation.Slideshow,
                                    Mode=OneWay}" />
         <TextBlock
             Classes="txt"
@@ -28,7 +28,7 @@
             FontSize="12"
             Margin="0,10,0,10"
             MaxWidth="300"
-            Text="{CompiledBinding AdjustTimingForSlideshow,
+            Text="{CompiledBinding Translation.AdjustTimingForSlideshow,
                                    Mode=OneWay}" />
         <customControls:CustomSlider
             Height="30"
@@ -47,7 +47,7 @@
             Foreground="{DynamicResource MainTextColorFaded}"
             Margin="0,0,0,15">
             <Run Text="{CompiledBinding GetSlideshowSpeed, Mode=OneWay}" />
-            <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+            <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
         </TextBlock>
     </StackPanel>
 </UserControl>

+ 3 - 3
src/PicView.Avalonia/Views/StartUpMenu.axaml

@@ -73,7 +73,7 @@
                         </Image.Source>
                     </Image>
                     <Label
-                        Content="{CompiledBinding SelectFile}"
+                        Content="{CompiledBinding Translation.SelectFile}"
                         FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
                         FontSize="14"
                         Foreground="{StaticResource SelectFileBrush}"
@@ -113,7 +113,7 @@
                         </Image.Source>
                     </Image>
                     <Label
-                        Content="{CompiledBinding OpenLastFile}"
+                        Content="{CompiledBinding Translation.OpenLastFile}"
                         FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
                         FontSize="14"
                         Foreground="{StaticResource OpenLastFileBrush}"
@@ -131,7 +131,7 @@
                         Stretch="Fill"
                         Width="20" />
                     <Label
-                        Content="{CompiledBinding FilePaste}"
+                        Content="{CompiledBinding Translation.Paste}"
                         FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
                         FontSize="14"
                         Foreground="{StaticResource PasteBrush}"

+ 1 - 1
src/PicView.Avalonia/Views/UC/Buttons/AltClose.axaml

@@ -21,7 +21,7 @@
         Height="30"
         HorizontalAlignment="Right"
         IsVisible="{CompiledBinding !IsUIShown}"
-        ToolTip.Tip="{Binding Close, Mode=OneWay}"
+        ToolTip.Tip="{Binding Translation.Close, Mode=OneWay}"
         VerticalAlignment="Top"
         Width="35"
         ZIndex="99"

+ 11 - 13
src/PicView.Avalonia/Views/UC/CropControl.axaml

@@ -1,6 +1,6 @@
 <UserControl
     x:Class="PicView.Avalonia.Views.UC.CropControl"
-    x:DataType="viewModels:ImageCropperViewModel"
+    x:DataType="viewModels:MainViewModel"
     xmlns="https://github.com/avaloniaui"
     xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
@@ -22,7 +22,7 @@
     </UserControl.Styles>
     <UserControl.ContextMenu>
         <ContextMenu x:Name="CropContextMenu">
-            <MenuItem Command="{CompiledBinding CropImageCommand}" Header="{CompiledBinding Crop, Mode=OneWay}">
+            <MenuItem Command="{CompiledBinding Crop.CropImageCommand}" Header="{CompiledBinding Translation.Crop, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
                         Data="{StaticResource CropGeometry}"
@@ -32,7 +32,7 @@
                         Width="12" />
                 </MenuItem.Icon>
             </MenuItem>
-            <MenuItem Command="{CompiledBinding CopyCropImageCommand}" Header="{CompiledBinding Copy, Mode=OneWay}">
+            <MenuItem Command="{CompiledBinding Crop.CopyCropImageCommand}" Header="{CompiledBinding Translation.Copy, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
                         Data="{StaticResource CopyGeometry}"
@@ -42,7 +42,7 @@
                         Width="12" />
                 </MenuItem.Icon>
             </MenuItem>
-            <MenuItem Command="{CompiledBinding CloseCropCommand}" Header="{CompiledBinding Close, Mode=OneWay}">
+            <MenuItem Command="{CompiledBinding Crop.CloseCropCommand}" Header="{CompiledBinding Translation.Close, Mode=OneWay}">
                 <MenuItem.Icon>
                     <Path
                         Data="{StaticResource CloseGeometry}"
@@ -56,9 +56,7 @@
     </UserControl.ContextMenu>
     <Panel>
         <!--  Image control to display the bitmap  -->
-        <Image Source="{Binding Bitmap}" x:Name="ImageControl" />
-
-
+        <Image Source="{Binding Crop.Bitmap}" x:Name="ImageControl" />
 
         <Canvas Background="Transparent" x:Name="RootCanvas">
 
@@ -76,13 +74,13 @@
                     Classes="txt"
                     FontSize="14"
                     Foreground="{DynamicResource MainTextColor}">
-                    <Run Text="{CompiledBinding Width, Mode=OneWay}" />
+                    <Run Text="{CompiledBinding Translation.Width, Mode=OneWay}" />
                     <Run Text=": " />
-                    <Run Text="{CompiledBinding PixelSelectionWidth, Mode=OneWay}" />
+                    <Run Text="{CompiledBinding Crop.PixelSelectionWidth, Mode=OneWay}" />
                     <Run Text=" x " />
-                    <Run Text="{CompiledBinding Height, Mode=OneWay}" />
+                    <Run Text="{CompiledBinding Translation.Height, Mode=OneWay}" />
                     <Run Text=": " />
-                    <Run Text="{CompiledBinding PixelSelectionHeight, Mode=OneWay}" />
+                    <Run Text="{CompiledBinding Crop.PixelSelectionHeight, Mode=OneWay}" />
                 </TextBlock>
             </Border>
 
@@ -91,8 +89,8 @@
                 Background="Transparent"
                 BorderBrush="#fff"
                 BorderThickness="2"
-                Height="{CompiledBinding SelectionHeight}"
-                Width="{CompiledBinding SelectionWidth}"
+                Height="{CompiledBinding Crop.SelectionHeight}"
+                Width="{CompiledBinding Crop.SelectionWidth}"
                 x:Name="MainRectangle" />
 
             <!--  Top Left  -->

+ 6 - 6
src/PicView.Avalonia/Views/UC/EditableTitlebar.axaml.cs

@@ -142,14 +142,14 @@ public partial class EditableTitlebar : UserControl
             return;
         }
 
-        if (vm.FileInfo is { Exists: false })
+        if (vm.PicViewer.FileInfo is { Exists: false })
         {
             return;
         }
         
         vm.IsLoading = true;
-        var oldPath = vm.FileInfo.FullName;
-        var newPath = Path.Combine(vm.FileInfo.DirectoryName, TextBox.Text);
+        var oldPath = vm.PicViewer.FileInfo.FullName;
+        var newPath = Path.Combine(vm.PicViewer.FileInfo.DirectoryName, TextBox.Text);
 
         if (File.Exists(newPath))
         {
@@ -219,13 +219,13 @@ public partial class EditableTitlebar : UserControl
             return;
         }
         
-        if (vm.FileInfo is null)
+        if (vm.PicViewer.FileInfo is null)
         {
             return;
         }
         
-        TextBox.Text = vm.FileInfo.Name;
-        var filename = vm.FileInfo.Name;
+        TextBox.Text = vm.PicViewer.FileInfo.Name;
+        var filename = vm.PicViewer.FileInfo.Name;
         var start = TextBox.Text.Length - filename.Length;
         var end = Path.GetFileNameWithoutExtension(filename).Length;
         TextBox.SelectionStart = start;

+ 18 - 18
src/PicView.Avalonia/Views/UC/GalleryItem.axaml

@@ -61,7 +61,7 @@
                     Command="{CompiledBinding PrintCommand}"
                     CommandParameter="{CompiledBinding Path=Text,
                                                        ElementName=FileLocation}"
-                    Header="{CompiledBinding Print,
+                    Header="{CompiledBinding Translation.Print,
                                              Mode=OneWay}">
                     <MenuItem.Icon>
                         <Path
@@ -76,7 +76,7 @@
                     Command="{CompiledBinding OpenWithCommand}"
                     CommandParameter="{CompiledBinding Path=Text,
                                                        ElementName=FileLocation}"
-                    Header="{CompiledBinding OpenWith,
+                    Header="{CompiledBinding Translation.OpenWith,
                                              Mode=OneWay}"
                     x:Name="OpenWith">
                     <MenuItem.Icon>
@@ -92,7 +92,7 @@
                     Command="{CompiledBinding LocateOnDiskCommand}"
                     CommandParameter="{CompiledBinding Path=Text,
                                                        ElementName=FileLocation}"
-                    Header="{CompiledBinding ShowInFolder,
+                    Header="{CompiledBinding Translation.ShowInFolder,
                                              Mode=OneWay}">
                     <MenuItem.Icon>
                         <Path
@@ -108,7 +108,7 @@
                     Command="{CompiledBinding SetAsWallpaperCommand}"
                     CommandParameter="{CompiledBinding Path=Text,
                                                        ElementName=FileLocation}"
-                    Header="{CompiledBinding SetAsWallpaper,
+                    Header="{CompiledBinding Translation.SetAsWallpaper,
                                              Mode=OneWay}">
                     <MenuItem.Icon>
                         <Path
@@ -140,7 +140,7 @@
                     Command="{CompiledBinding CopyFileCommand}"
                     CommandParameter="{CompiledBinding Path=Text,
                                                        ElementName=FileLocation}"
-                    Header="{CompiledBinding CopyFile,
+                    Header="{CompiledBinding Translation.CopyFile,
                                              Mode=OneWay}">
                     <MenuItem.Icon>
                         <Path
@@ -151,7 +151,7 @@
                             Width="12" />
                     </MenuItem.Icon>
                 </MenuItem>
-                <MenuItem Header="{CompiledBinding CopyImage, Mode=OneWay}">
+                <MenuItem Header="{CompiledBinding Translation.CopyImage, Mode=OneWay}">
                     <MenuItem.Icon>
                         <Path
                             Data="{StaticResource CopyGeometry}"
@@ -164,7 +164,7 @@
                 <MenuItem>
                     <MenuItem.Header>
                         <TextBlock>
-                            <Run Text="{CompiledBinding Copy, Mode=OneWay}" />
+                            <Run Text="{CompiledBinding Translation.Copy, Mode=OneWay}" />
                             <Run Text=" base64" />
                         </TextBlock>
                     </MenuItem.Header>
@@ -181,7 +181,7 @@
                     Command="{CompiledBinding DuplicateFileCommand}"
                     CommandParameter="{CompiledBinding Path=Text,
                                                        ElementName=FileLocation}"
-                    Header="{CompiledBinding DuplicateFile,
+                    Header="{CompiledBinding Translation.DuplicateFile,
                                              Mode=OneWay}">
                     <MenuItem.Icon>
                         <Path
@@ -207,7 +207,7 @@
                     Command="{CompiledBinding RecycleFileCommand}"
                     CommandParameter="{CompiledBinding Path=Text,
                                                        ElementName=FileLocation}"
-                    Header="{CompiledBinding DeleteFile,
+                    Header="{CompiledBinding Translation.DeleteFile,
                                              Mode=OneWay}">
                     <MenuItem.Icon>
                         <Path
@@ -219,7 +219,7 @@
                     </MenuItem.Icon>
                 </MenuItem>
                 <Separator />
-                <MenuItem Header="{CompiledBinding Stretch, Mode=OneWay}">
+                <MenuItem Header="{CompiledBinding Translation.Stretch, Mode=OneWay}">
                     <MenuItem.Icon>
                         <Image
                             Height="12"
@@ -229,48 +229,48 @@
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="Uniform"
-                        Header="{CompiledBinding Uniform,
+                        Header="{CompiledBinding Translation.Uniform,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsUniformMenuChecked}"
                         ToggleType="Radio" />
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="UniformToFill"
-                        Header="{CompiledBinding UniformToFill,
+                        Header="{CompiledBinding Translation.UniformToFill,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsUniformToFillMenuChecked}"
                         ToggleType="Radio" />
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="Fill"
-                        Header="{CompiledBinding Fill,
+                        Header="{CompiledBinding Translation.Fill,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsFillMenuChecked}"
                         ToggleType="Radio" />
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="None"
-                        Header="{CompiledBinding None,
+                        Header="{CompiledBinding Translation.None,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsNoneMenuChecked}"
                         ToggleType="Radio" />
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="Square"
-                        Header="{CompiledBinding Square,
+                        Header="{CompiledBinding Translation.Square,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsSquareMenuChecked}"
                         ToggleType="Radio" />
                     <MenuItem
                         Command="{CompiledBinding GalleryItemStretchCommand}"
                         CommandParameter="FillSquare"
-                        Header="{CompiledBinding FillSquare,
+                        Header="{CompiledBinding Translation.FillSquare,
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding IsFillSquareMenuChecked}"
                         ToggleType="Radio" />
                 </MenuItem>
                 <MenuItem
-                    Header="{CompiledBinding ExpandedGalleryItemSize,
+                    Header="{CompiledBinding Translation.ExpandedGalleryItemSize,
                                              Mode=OneWay}"
                     PointerPressed="Flyout_OnPointerPressed"
                     StaysOpenOnClick="True">
@@ -294,7 +294,7 @@
                     </FlyoutBase.AttachedFlyout>
                 </MenuItem>
                 <Separator />
-                <MenuItem Command="{CompiledBinding CloseGalleryCommand}" Header="{CompiledBinding HideBottomGallery, Mode=OneWay}">
+                <MenuItem Command="{CompiledBinding CloseGalleryCommand}" Header="{CompiledBinding Translation.HideBottomGallery, Mode=OneWay}">
                     <MenuItem.Icon>
                         <Path
                             Data="{StaticResource CloseGeometry}"

+ 34 - 34
src/PicView.Avalonia/Views/UC/Menus/FileMenu.axaml

@@ -54,37 +54,37 @@
                     Data="{StaticResource ReloadGeometry}"
                     IconHeight="17"
                     IconWidth="17"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding Reload,
+                    ToolTip.Tip="{CompiledBinding Translation.Reload,
                                                   Mode=OneWay}" />
 
                 <customControls:IconButton
                     Canvas.Left="45"
                     Classes="hover btn"
                     Command="{CompiledBinding PrintCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
                     Data="{StaticResource PrintGeometry}"
                     IconHeight="17"
                     IconWidth="17"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding Print,
+                    ToolTip.Tip="{CompiledBinding Translation.Print,
                                                   Mode=OneWay}" />
 
                 <customControls:IconButton
                     Canvas.Left="90"
                     Classes="hover btn"
                     Command="{CompiledBinding RecycleFileCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
                     Data="{StaticResource RecycleGeometry}"
                     IconHeight="17"
                     IconWidth="17"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding DeleteFile,
+                    ToolTip.Tip="{CompiledBinding Translation.DeleteFile,
                                                   Mode=OneWay}" />
 
                 <customControls:IconButton
@@ -94,37 +94,37 @@
                     Data="{StaticResource SaveGeometry}"
                     IconHeight="17"
                     IconWidth="17"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding Save,
+                    ToolTip.Tip="{CompiledBinding Translation.Save,
                                                   Mode=OneWay}" />
 
                 <customControls:IconButton
                     Canvas.Left="180"
                     Classes="hover btn"
                     Command="{CompiledBinding CopyFileCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
                     Data="{StaticResource CopyGeometry}"
                     IconHeight="17"
                     IconWidth="17"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding CopyFile,
+                    ToolTip.Tip="{CompiledBinding Translation.CopyFile,
                                                   Mode=OneWay}" />
 
                 <customControls:IconButton
                     Canvas.Left="225"
                     Classes="hover btn"
                     Command="{CompiledBinding DuplicateFileCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
                     Data="{StaticResource DuplicateGeometry}"
                     IconHeight="17"
                     IconWidth="17"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding DuplicateFile,
+                    ToolTip.Tip="{CompiledBinding Translation.DuplicateFile,
                                                   Mode=OneWay}" />
 
                 <customControls:IconButton
@@ -136,7 +136,7 @@
                     Data="{StaticResource CloseGeometry}"
                     IconHeight="10"
                     IconWidth="10"
-                    ToolTip.Tip="{CompiledBinding Close,
+                    ToolTip.Tip="{CompiledBinding Translation.Close,
                                                   Mode=OneWay}" />
 
                 <Button
@@ -146,7 +146,7 @@
                     Classes="ButtonBorder altHover"
                     Command="{CompiledBinding OpenFileCommand}"
                     Height="46"
-                    ToolTip.Tip="{CompiledBinding OpenFileDialog,
+                    ToolTip.Tip="{CompiledBinding Translation.OpenFileDialog,
                                                   Mode=OneWay}">
                     <StackPanel Orientation="Horizontal">
                         <Path
@@ -157,7 +157,7 @@
                             Stretch="Fill"
                             VerticalAlignment="Center"
                             Width="21.39" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Open, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.Open, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
 
@@ -167,12 +167,12 @@
                     Canvas.Top="104"
                     Classes="ButtonBorder altHover"
                     Command="{CompiledBinding OpenWithCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
                     Height="46"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding OpenWith}">
+                    ToolTip.Tip="{CompiledBinding Translation.OpenWith}">
                     <StackPanel Orientation="Horizontal">
                         <Path
                             Data="M0 0l20 10L0 20V0zm0 8v4l10-2L0 8z"
@@ -182,7 +182,7 @@
                             Stretch="Fill"
                             VerticalAlignment="Center"
                             Width="17" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding OpenWith, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.OpenWith, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
 
@@ -192,12 +192,12 @@
                     Canvas.Top="53"
                     Classes="ButtonBorder altHover"
                     Command="{CompiledBinding LocateOnDiskCommand}"
-                    CommandParameter="{CompiledBinding FileInfo.FullName,
+                    CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
                                                        FallbackValue=''}"
                     Height="46"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding ShowInFolder,
+                    ToolTip.Tip="{CompiledBinding Translation.ShowInFolder,
                                                   Mode=OneWay}">
                     <StackPanel Orientation="Horizontal">
                         <Path
@@ -207,7 +207,7 @@
                             Margin="11,0,9,0"
                             Stretch="Fill"
                             Width="19" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding ShowInFolder, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.ShowInFolder, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
 
@@ -218,9 +218,9 @@
                     Classes="ButtonBorder altHover"
                     Command="{CompiledBinding RenameCommand}"
                     Height="46"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding RenameFile,
+                    ToolTip.Tip="{CompiledBinding Translation.RenameFile,
                                                   Mode=OneWay}">
                     <StackPanel Orientation="Horizontal">
                         <Path
@@ -231,7 +231,7 @@
                             Stretch="Fill"
                             VerticalAlignment="Center"
                             Width="19" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding RenameFile, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.RenameFile, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
 
@@ -242,7 +242,7 @@
                     Classes="ButtonBorder altHover"
                     Command="{CompiledBinding PasteCommand}"
                     Height="46"
-                    ToolTip.Tip="{CompiledBinding FilePaste,
+                    ToolTip.Tip="{CompiledBinding Translation.Paste,
                                                   Mode=OneWay}">
                     <StackPanel Orientation="Horizontal">
                         <Path
@@ -253,7 +253,7 @@
                             Stretch="Fill"
                             VerticalAlignment="Center"
                             Width="19" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding FilePaste, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.Paste, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
 
@@ -264,7 +264,7 @@
                     Classes="ButtonBorder altHover"
                     Command="{CompiledBinding NewWindowCommand}"
                     Height="46"
-                    ToolTip.Tip="{Binding NewWindow, Mode=OneWay}">
+                    ToolTip.Tip="{Binding Translation.NewWindow, Mode=OneWay}">
                     <StackPanel Orientation="Horizontal">
                         <Image
                             Height="20"
@@ -281,7 +281,7 @@
                                 </DrawingGroup>
                             </DrawingImage>
                         </Image>
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding NewWindow, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.NewWindow, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
             </Canvas>

+ 32 - 32
src/PicView.Avalonia/Views/UC/Menus/ImageMenu.axaml

@@ -52,9 +52,9 @@
                     Height="45"
                     IconHeight="15"
                     IconWidth="15"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding RotateLeft,
+                    ToolTip.Tip="{CompiledBinding Translation.RotateLeft,
                                                   Mode=OneWay}"
                     Width="45"
                     x:Name="RotateLeftButton" />
@@ -69,9 +69,9 @@
                     Height="45"
                     IconHeight="15"
                     IconWidth="15"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding RotateRight,
+                    ToolTip.Tip="{CompiledBinding Translation.RotateRight,
                                                   Mode=OneWay}"
                     Width="45"
                     x:Name="RotateRightButton" />
@@ -88,13 +88,13 @@
                     Height="45"
                     IconHeight="15"
                     IconWidth="15"
-                    IsEnabled="{CompiledBinding ImageSource,
+                    IsEnabled="{CompiledBinding PicViewer.ImageSource,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding GetIsFlippedTranslation,
+                    ToolTip.Tip="{CompiledBinding Translation.IsFlipped,
                                                   Mode=OneWay}"
                     Width="45">
                     <customControls:IconButton.RenderTransform>
-                        <ScaleTransform ScaleX="{CompiledBinding ScaleX}" />
+                        <ScaleTransform ScaleX="{CompiledBinding PicViewer.ScaleX}" />
                     </customControls:IconButton.RenderTransform>
                 </customControls:IconButton>
 
@@ -122,9 +122,9 @@
                     Canvas.Left="180"
                     Classes="noBorderHover"
                     Height="45"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding GoToImageAtSpecifiedIndex,
+                    ToolTip.Tip="{CompiledBinding Translation.GoToImageAtSpecifiedIndex,
                                                   Mode=OneWay}"
                     Width="90"
                     x:Name="GoToPicButton">
@@ -182,7 +182,7 @@
                     Height="45"
                     IconHeight="10"
                     IconWidth="10"
-                    ToolTip.Tip="{CompiledBinding Close,
+                    ToolTip.Tip="{CompiledBinding Translation.Close,
                                                   Mode=OneWay}"
                     Width="45" />
 
@@ -193,9 +193,9 @@
                     Classes="ButtonBorder altHover"
                     Command="{CompiledBinding ShowSingleImageResizeWindowCommand}"
                     Height="46"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding ResizeImage,
+                    ToolTip.Tip="{CompiledBinding Translation.ResizeImage,
                                                   Mode=OneWay}">
                     <StackPanel Orientation="Horizontal">
                         <Canvas Height="54" Width="45">
@@ -232,7 +232,7 @@
                         <TextBlock
                             Classes="txt btnTxt"
                             Margin="-3,0,0,0"
-                            Text="{CompiledBinding Resize,
+                            Text="{CompiledBinding Translation.Resize,
                                                    Mode=OneWay}" />
                     </StackPanel>
                 </Button>
@@ -246,7 +246,7 @@
                     Height="46"
                     IsEnabled="{CompiledBinding ShouldCropBeEnabled,
                                                 Mode=OneWay}"
-                    ToolTip.Tip="{CompiledBinding Crop,
+                    ToolTip.Tip="{CompiledBinding Translation.Crop,
                                                   Mode=OneWay}">
                     <StackPanel Orientation="Horizontal">
                         <Path
@@ -256,7 +256,7 @@
                             Margin="9,0,9,0"
                             Stretch="Fill"
                             Width="17" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Crop, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.Crop, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
 
@@ -270,9 +270,9 @@
                     CommandParameter="0"
                     Foreground="{DynamicResource MainTextColor}"
                     Height="46"
-                    IsEnabled="{CompiledBinding FileInfo,
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                 Converter={x:Static ObjectConverters.IsNotNull}}"
-                    ToolTip.Tip="{CompiledBinding Slideshow,
+                    ToolTip.Tip="{CompiledBinding Translation.Slideshow,
                                                   Mode=OneWay}"
                     x:Name="SlideShowButton">
                     <StackPanel Orientation="Horizontal">
@@ -284,7 +284,7 @@
                         <TextBlock
                             Classes="txt btnTxt"
                             Margin="0,2,0,0"
-                            Text="{CompiledBinding Slideshow,
+                            Text="{CompiledBinding Translation.Slideshow,
                                                    Mode=OneWay}" />
                     </StackPanel>
                     <SplitButton.Flyout>
@@ -296,7 +296,7 @@
                                 Width="86">
                                 <TextBlock Classes="txt" Foreground="{DynamicResource MainTextColor}">
                                     <Run Text="2 " />
-                                    <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+                                    <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
                                 </TextBlock>
                             </Button>
                             <Button
@@ -306,7 +306,7 @@
                                 Width="86">
                                 <TextBlock Classes="txt" Foreground="{DynamicResource MainTextColor}">
                                     <Run Text="5 " />
-                                    <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+                                    <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
                                 </TextBlock>
                             </Button>
                             <Button
@@ -316,7 +316,7 @@
                                 Width="86">
                                 <TextBlock Classes="txt" Foreground="{DynamicResource MainTextColor}">
                                     <Run Text="10 " />
-                                    <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+                                    <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
                                 </TextBlock>
                             </Button>
                             <Button
@@ -326,7 +326,7 @@
                                 Width="86">
                                 <TextBlock Classes="txt" Foreground="{DynamicResource MainTextColor}">
                                     <Run Text="20 " />
-                                    <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+                                    <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
                                 </TextBlock>
                             </Button>
                             <Button
@@ -336,7 +336,7 @@
                                 Width="86">
                                 <TextBlock Classes="txt" Foreground="{DynamicResource MainTextColor}">
                                     <Run Text="30 " />
-                                    <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+                                    <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
                                 </TextBlock>
                             </Button>
                             <Button
@@ -346,7 +346,7 @@
                                 Width="86">
                                 <TextBlock Classes="txt" Foreground="{DynamicResource MainTextColor}">
                                     <Run Text="60 " />
-                                    <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+                                    <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
                                 </TextBlock>
                             </Button>
                             <Button
@@ -356,7 +356,7 @@
                                 Width="86">
                                 <TextBlock Classes="txt" Foreground="{DynamicResource MainTextColor}">
                                     <Run Text="120 " />
-                                    <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+                                    <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
                                 </TextBlock>
                             </Button>
                             <Button
@@ -366,7 +366,7 @@
                                 Width="86">
                                 <TextBlock Classes="txt" Foreground="{DynamicResource MainTextColor}">
                                     <Run Text="180 " />
-                                    <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+                                    <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
                                 </TextBlock>
                             </Button>
                             <Button
@@ -376,7 +376,7 @@
                                 Width="86">
                                 <TextBlock Classes="txt" Foreground="{DynamicResource MainTextColor}">
                                     <Run Text="300 " />
-                                    <Run Text="{CompiledBinding SecAbbreviation, Mode=OneWay}" />
+                                    <Run Text="{CompiledBinding Translation.SecAbbreviation, Mode=OneWay}" />
                                 </TextBlock>
                             </Button>
                         </MenuFlyout>
@@ -391,12 +391,12 @@
                     Command="{CompiledBinding ShowSideBySideCommand}"
                     Foreground="{DynamicResource MainTextColor}"
                     Height="46"
-                    IsChecked="{CompiledBinding IsShowingSideBySide}"
-                    ToolTip.Tip="{CompiledBinding SideBySideTooltip}">
+                    IsChecked="{CompiledBinding PicViewer.IsShowingSideBySide}"
+                    ToolTip.Tip="{CompiledBinding Translation.SideBySideTooltip}">
                     <TextBlock
                         Classes="txt btnTxt"
                         Margin="1,0,6,0"
-                        Text="{CompiledBinding SideBySide}" />
+                        Text="{CompiledBinding Translation.SideBySide}" />
                 </ToggleButton>
 
                 <Button
@@ -407,7 +407,7 @@
                     Command="{CompiledBinding ToggleBottomGalleryCommand}"
                     Foreground="{DynamicResource MainTextColor}"
                     Height="46"
-                    ToolTip.Tip="{CompiledBinding GetIsShowingBottomGalleryTranslation,
+                    ToolTip.Tip="{CompiledBinding Translation.IsShowingBottomGallery,
                                                   Mode=OneWay}"
                     Width="300">
                     <StackPanel Orientation="Horizontal">
@@ -420,7 +420,7 @@
                             Classes="txt btnTxt"
                             Margin="0,0,6,0"
                             MaxWidth="175"
-                            Text="{CompiledBinding GetIsShowingBottomGalleryTranslation,
+                            Text="{CompiledBinding Translation.IsShowingBottomGallery,
                                                    Mode=OneWay}" />
                     </StackPanel>
                 </Button>

+ 17 - 17
src/PicView.Avalonia/Views/UC/Menus/SettingsMenu.axaml

@@ -48,7 +48,7 @@
                     Command="{Binding ShowSettingsWindowCommand}"
                     CornerRadius="8,0,0,0"
                     Height="46"
-                    ToolTip.Tip="{CompiledBinding ShowAllSettingsWindow,
+                    ToolTip.Tip="{CompiledBinding Translation.ShowAllSettingsWindow,
                                                   Mode=OneWay}"
                     Width="179"
                     x:Name="SettingsButton">
@@ -66,7 +66,7 @@
                             Foreground="{DynamicResource MainTextColor}"
                             Margin="10,0,6,0"
                             MaxWidth="150"
-                            Text="{CompiledBinding Settings,
+                            Text="{CompiledBinding Translation.Settings,
                                                    Mode=OneWay}"
                             VerticalAlignment="Center" />
                     </StackPanel>
@@ -80,7 +80,7 @@
                     Classes="noBorderHover"
                     Command="{CompiledBinding ShowAboutWindowCommand}"
                     Height="46"
-                    ToolTip.Tip="{CompiledBinding AboutWindow,
+                    ToolTip.Tip="{CompiledBinding Translation.AboutWindow,
                                                   Mode=OneWay}"
                     Width="136"
                     x:Name="AboutWindowButton">
@@ -96,7 +96,7 @@
                             Foreground="{DynamicResource MainTextColor}"
                             Margin="10,0,6,0"
                             MaxWidth="150"
-                            Text="{CompiledBinding About,
+                            Text="{CompiledBinding Translation.About,
                                                    Mode=OneWay}"
                             VerticalAlignment="Center" />
                     </StackPanel>
@@ -115,7 +115,7 @@
                     Height="46"
                     IconHeight="10"
                     IconWidth="10"
-                    ToolTip.Tip="{CompiledBinding Close,
+                    ToolTip.Tip="{CompiledBinding Translation.Close,
                                                   Mode=OneWay}"
                     Width="45" />
 
@@ -128,10 +128,10 @@
                     Foreground="{DynamicResource MainTextColor}"
                     Height="46"
                     IsChecked="{CompiledBinding IsScrollingEnabled}"
-                    ToolTip.Tip="{CompiledBinding ToggleScroll,
+                    ToolTip.Tip="{CompiledBinding Translation.ToggleScroll,
                                                   Mode=OneWay}"
                     Width="169">
-                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding GetIsScrollingTranslation, Mode=OneWay}" />
+                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.IsScrolling, Mode=OneWay}" />
                 </ToggleButton>
 
                 <ToggleButton
@@ -142,10 +142,10 @@
                     Foreground="{DynamicResource MainTextColor}"
                     Height="46"
                     IsChecked="{CompiledBinding IsStretched}"
-                    ToolTip.Tip="{CompiledBinding Stretch,
+                    ToolTip.Tip="{CompiledBinding Translation.Stretch,
                                                   Mode=OneWay}"
                     Width="169">
-                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Stretch, Mode=OneWay}" />
+                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.Stretch, Mode=OneWay}" />
                 </ToggleButton>
 
                 <ToggleButton
@@ -157,10 +157,10 @@
                     Foreground="{DynamicResource MainTextColor}"
                     Height="46"
                     IsChecked="{CompiledBinding IsLooping}"
-                    ToolTip.Tip="{CompiledBinding ToggleLooping,
+                    ToolTip.Tip="{CompiledBinding Translation.ToggleLooping,
                                                   Mode=OneWay}"
                     Width="169">
-                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding GetIsLoopingTranslation, Mode=OneWay}" />
+                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.IsLooping, Mode=OneWay}" />
                 </ToggleButton>
 
                 <ToggleButton
@@ -172,10 +172,10 @@
                     Foreground="{DynamicResource MainTextColor}"
                     Height="46"
                     IsChecked="{CompiledBinding IsAutoFit}"
-                    ToolTip.Tip="{CompiledBinding AutoFitWindow,
+                    ToolTip.Tip="{CompiledBinding Translation.AutoFitWindow,
                                                   Mode=OneWay}"
                     Width="169">
-                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding AutoFitWindow, Mode=OneWay}" />
+                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.AutoFitWindow, Mode=OneWay}" />
                 </ToggleButton>
 
                 <ToggleButton
@@ -187,10 +187,10 @@
                     Foreground="{DynamicResource MainTextColor}"
                     Height="46"
                     IsChecked="{CompiledBinding IsTopMost}"
-                    ToolTip.Tip="{CompiledBinding StayTopMost,
+                    ToolTip.Tip="{CompiledBinding Translation.StayTopMost,
                                                   Mode=OneWay}"
                     Width="169">
-                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding StayTopMost, Mode=OneWay}" />
+                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.StayTopMost, Mode=OneWay}" />
                 </ToggleButton>
 
                 <ToggleButton
@@ -202,10 +202,10 @@
                     Foreground="{DynamicResource MainTextColor}"
                     Height="46"
                     IsChecked="{CompiledBinding IsIncludingSubdirectories}"
-                    ToolTip.Tip="{CompiledBinding SearchSubdirectory,
+                    ToolTip.Tip="{CompiledBinding Translation.SearchSubdirectory,
                                                   Mode=OneWay}"
                     Width="169">
-                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding SearchSubdirectory, Mode=OneWay}" />
+                    <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.SearchSubdirectory, Mode=OneWay}" />
                 </ToggleButton>
             </Canvas>
         </Border>

+ 14 - 14
src/PicView.Avalonia/Views/UC/Menus/ToolsMenu.axaml

@@ -48,7 +48,7 @@
                     Command="{CompiledBinding ShowBatchResizeWindowCommand}"
                     CornerRadius="8,0,0,0"
                     Height="45"
-                    ToolTip.Tip="{CompiledBinding BatchResize,
+                    ToolTip.Tip="{CompiledBinding Translation.BatchResize,
                                                   Mode=OneWay}"
                     Width="179"
                     x:Name="BatchResizeButton">
@@ -64,7 +64,7 @@
                             Foreground="{DynamicResource MainTextColor}"
                             Margin="10,0,7,0"
                             MaxWidth="130"
-                            Text="{CompiledBinding BatchResize,
+                            Text="{CompiledBinding Translation.BatchResize,
                                                    Mode=OneWay}"
                             VerticalAlignment="Center" />
                     </StackPanel>
@@ -78,7 +78,7 @@
                     Classes="noBorderHover"
                     Command="{CompiledBinding ShowEffectsWindowCommand}"
                     Height="45"
-                    ToolTip.Tip="{CompiledBinding EffectsTooltip,
+                    ToolTip.Tip="{CompiledBinding Translation.EffectsTooltip,
                                                   Mode=OneWay}"
                     Width="136"
                     x:Name="EffectsButton">
@@ -101,7 +101,7 @@
                             Foreground="{DynamicResource MainTextColor}"
                             Margin="10,0,6,0"
                             MaxWidth="130"
-                            Text="{CompiledBinding Effects,
+                            Text="{CompiledBinding Translation.Effects,
                                                    Mode=OneWay}"
                             VerticalAlignment="Center" />
                     </StackPanel>
@@ -120,7 +120,7 @@
                     Height="45"
                     IconHeight="10"
                     IconWidth="10"
-                    ToolTip.Tip="{CompiledBinding Close,
+                    ToolTip.Tip="{CompiledBinding Translation.Close,
                                                   Mode=OneWay}"
                     Width="45" />
 
@@ -143,7 +143,7 @@
                         <TextBlock
                             Classes="txt btnTxt"
                             Margin="10,0,6,0"
-                            Text="{CompiledBinding ImageInfo,
+                            Text="{CompiledBinding Translation.ImageInfo,
                                                    Mode=OneWay}" />
                     </StackPanel>
                 </Button>
@@ -157,7 +157,7 @@
                     Height="46"
                     IsEnabled="{CompiledBinding ShouldOptimizeImageBeEnabled,
                                                 Mode=OneWay}"
-                    ToolTip.Tip="{CompiledBinding OptimizeImage,
+                    ToolTip.Tip="{CompiledBinding Translation.OptimizeImage,
                                                   Mode=OneWay}"
                     Width="169"
                     x:Name="OptimizeImageButton">
@@ -167,7 +167,7 @@
                             Margin="9,0,10,0"
                             Source="{StaticResource PortalImage}"
                             Width="20" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding OptimizeImage, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.OptimizeImage, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
 
@@ -178,7 +178,7 @@
                     Classes="ButtonBorder altHover"
                     Height="46"
                     IsEnabled="False"
-                    ToolTip.Tip="{CompiledBinding ColorPickerToolTooltip,
+                    ToolTip.Tip="{CompiledBinding Translation.ColorPickerToolTooltip,
                                                   Mode=OneWay}"
                     Width="169">
                     <StackPanel Orientation="Horizontal">
@@ -189,7 +189,7 @@
                             Margin="9,0,12,0"
                             Stretch="Fill"
                             Width="17" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding ColorPickerTool, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.ColorPickerTool, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
 
@@ -207,7 +207,7 @@
                             Margin="10,0,10,0"
                             Source="{StaticResource CanvasImage}"
                             Width="20" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding ChangeBackground, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.ChangeBackground, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
 
@@ -218,7 +218,7 @@
                     Classes="ButtonBorder altHover"
                     Command="{CompiledBinding ShowKeybindingsWindowCommand}"
                     Height="46"
-                    ToolTip.Tip="{CompiledBinding ApplicationShortcuts,
+                    ToolTip.Tip="{CompiledBinding Translation.ApplicationShortcuts,
                                                   Mode=OneWay}"
                     Width="169">
                     <StackPanel Orientation="Horizontal">
@@ -227,7 +227,7 @@
                             Margin="9,0,12,0"
                             Source="{StaticResource ShortcutsImage}"
                             Width="17" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding ApplicationShortcuts, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.ApplicationShortcuts, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
 
@@ -245,7 +245,7 @@
                             Margin="11,0,12,0"
                             Source="{StaticResource EyeOffImage}"
                             Width="18" />
-                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding GetIsShowingUITranslation, Mode=OneWay}" />
+                        <TextBlock Classes="txt btnTxt" Text="{CompiledBinding Translation.IsShowingUI, Mode=OneWay}" />
                     </StackPanel>
                 </Button>
             </Canvas>

+ 3 - 3
src/PicView.Avalonia/Views/UC/PopUps/CloseDialog.axaml

@@ -18,7 +18,7 @@
             FontSize="14"
             Foreground="{DynamicResource MainTextColor}"
             HorizontalAlignment="Center"
-            Text="{CompiledBinding CloseWindowPrompt}"
+            Text="{CompiledBinding Translation.CloseWindowPrompt}"
             VerticalAlignment="Top" />
         <StackPanel
             HorizontalAlignment="Right"
@@ -33,14 +33,14 @@
                 <TextBlock
                     Classes="txt"
                     Foreground="{DynamicResource MainTextColor}"
-                    Text="{CompiledBinding Cancel}" />
+                    Text="{CompiledBinding Translation.Cancel}" />
             </Button>
             <Button
                 Background="{DynamicResource AccentColor}"
                 Classes="BorderStyle accentHover mainBtn"
                 Padding="30,0"
                 x:Name="CloseButton">
-                <TextBlock Classes="txt" Text="{CompiledBinding Close}" />
+                <TextBlock Classes="txt" Text="{CompiledBinding Translation.Close}" />
             </Button>
         </StackPanel>
     </Panel>

+ 2 - 2
src/PicView.Avalonia/Views/UC/PopUps/DeleteDialog.axaml

@@ -39,14 +39,14 @@
                 <TextBlock
                     Classes="txt"
                     Foreground="{DynamicResource MainTextColor}"
-                    Text="{CompiledBinding Cancel}" />
+                    Text="{CompiledBinding Translation.Cancel}" />
             </Button>
             <Button
                 Background="{DynamicResource AccentColor}"
                 Classes="BorderStyle accentHover mainBtn"
                 Padding="30,0"
                 x:Name="ConfirmButton">
-                <TextBlock Classes="txt" Text="{CompiledBinding DeleteFile}" />
+                <TextBlock Classes="txt" Text="{CompiledBinding Translation.DeleteFile}" />
             </Button>
         </StackPanel>
     </StackPanel>

+ 6 - 6
src/PicView.Avalonia/Views/ZoomSettingsView.axaml

@@ -21,7 +21,7 @@
             FontSize="14"
             Foreground="{StaticResource SecondaryTextColor}"
             Margin="0,20,0,20"
-            Text="{CompiledBinding Zoom,
+            Text="{CompiledBinding Translation.Zoom,
                                    Mode=OneWay}" />
 
         <TextBlock
@@ -30,7 +30,7 @@
             FontSize="12"
             Margin="0,10,0,10"
             MaxWidth="300"
-            Text="{CompiledBinding AdjustTimingForZoom}" />
+            Text="{CompiledBinding Translation.AdjustTimingForZoom}" />
         <customControls:CustomSlider
             Height="30"
             HorizontalAlignment="Center"
@@ -63,7 +63,7 @@
                 Margin="0"
                 MaxWidth="240"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding AllowZoomOut,
+                Text="{CompiledBinding Translation.AllowZoomOut,
                                        Mode=OneWay}" />
         </ToggleButton>
 
@@ -72,7 +72,7 @@
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             FontSize="14"
             Margin="0,20,0,20"
-            Text="{CompiledBinding MouseWheel,
+            Text="{CompiledBinding Translation.MouseWheel,
                                    Mode=OneWay}" />
 
         <ComboBox
@@ -84,8 +84,8 @@
             Padding="5,7,0,7"
             Width="300"
             x:Name="MouseWheelBox">
-            <ComboBoxItem Content="{CompiledBinding CtrlToZoom, Mode=OneWay}" />
-            <ComboBoxItem Content="{CompiledBinding ScrollToZoom, Mode=OneWay}" />
+            <ComboBoxItem Content="{CompiledBinding Translation.CtrlToZoom, Mode=OneWay}" />
+            <ComboBoxItem Content="{CompiledBinding Translation.ScrollToZoom, Mode=OneWay}" />
         </ComboBox>
 
 

+ 3 - 3
src/PicView.Avalonia/WindowBehavior/WindowFunctions.cs

@@ -51,7 +51,7 @@ public static class WindowFunctions
             }
             else
             {
-                lastFile = vm?.FileInfo?.FullName ?? FileHistory.GetLastEntry();
+                lastFile = vm?.PicViewer.FileInfo?.FullName ?? FileHistory.GetLastEntry();
             }
         }
         else
@@ -77,7 +77,7 @@ public static class WindowFunctions
         {
             if (Settings.WindowProperties.AutoFit)
             {
-                if (vm.PixelWidth > UIHelper.GetMainView.Bounds.Width || vm.PixelHeight > UIHelper.GetMainView.Bounds.Height)
+                if (vm.PicViewer.PixelWidth > UIHelper.GetMainView.Bounds.Width || vm.PicViewer.PixelHeight > UIHelper.GetMainView.Bounds.Height)
                 {
                     vm.ImageViewer.MainBorder.Height = double.NaN;
                     vm.ImageViewer.MainBorder.Width = double.NaN;
@@ -110,7 +110,7 @@ public static class WindowFunctions
                 }
                 else
                 {
-                    if (vm.PixelWidth > UIHelper.GetMainView.Bounds.Width || vm.PixelHeight > UIHelper.GetMainView.Bounds.Height)
+                    if (vm.PicViewer.PixelWidth > UIHelper.GetMainView.Bounds.Width || vm.PicViewer.PixelHeight > UIHelper.GetMainView.Bounds.Height)
                     {
                         Dispatcher.UIThread.Post(() => WindowResizing.SetSize(vm), DispatcherPriority.Render);
                     }

+ 14 - 14
src/PicView.Avalonia/WindowBehavior/WindowResizing.cs

@@ -83,13 +83,13 @@ public static class WindowResizing
     public static void SetSize(ImageSizeCalculationHelper.ImageSize size, MainViewModel vm)
     {
         vm.TitleMaxWidth = size.TitleMaxWidth;
-        vm.ImageWidth = size.Width;
-        vm.SecondaryImageWidth = size.SecondaryWidth;
-        vm.ImageHeight = size.Height;
+        vm.PicViewer.ImageWidth = size.Width;
+        vm.PicViewer.SecondaryImageWidth = size.SecondaryWidth;
+        vm.PicViewer.ImageHeight = size.Height;
         vm.GalleryMargin = new Thickness(0, 0, 0, size.Margin);
         
-        vm.ScrollViewerWidth = size.ScrollViewerWidth;
-        vm.ScrollViewerHeight = size.ScrollViewerHeight;
+        vm.PicViewer.ScrollViewerWidth = size.ScrollViewerWidth;
+        vm.PicViewer.ScrollViewerHeight = size.ScrollViewerHeight;
 
         if (Settings.WindowProperties.AutoFit)
         {
@@ -110,7 +110,7 @@ public static class WindowResizing
             vm.GalleryWidth = double.NaN;
         }
         
-        vm.AspectRatio = size.AspectRatio;
+        vm.PicViewer.AspectRatio = size.AspectRatio;
     }
 
     public static ImageSizeCalculationHelper.ImageSize? GetSize(MainViewModel vm)
@@ -119,9 +119,9 @@ public static class WindowResizing
         var preloadValue = NavigationManager.GetCurrentPreLoadValue();
         if (preloadValue == null)
         {
-            if (vm.FileInfo is null)
+            if (vm.PicViewer.FileInfo is null)
             {
-                if (vm.ImageSource is Bitmap bitmap)
+                if (vm.PicViewer.ImageSource is Bitmap bitmap)
                 {
                     firstWidth = bitmap.PixelSize.Width;
                     firstHeight = bitmap.PixelSize.Height;
@@ -131,10 +131,10 @@ public static class WindowResizing
                     return null;
                 }
             }
-            else if (vm.FileInfo?.Exists != null)
+            else if (vm.PicViewer.FileInfo?.Exists != null)
             {
                 var magickImage = new MagickImage();
-                magickImage.Ping(vm.FileInfo);
+                magickImage.Ping(vm.PicViewer.FileInfo);
                 firstWidth = magickImage.Width;
                 firstHeight = magickImage.Height;
             }
@@ -145,8 +145,8 @@ public static class WindowResizing
         }
         else
         {
-            firstWidth = preloadValue.ImageModel?.PixelWidth ?? vm.ImageWidth;
-            firstHeight = preloadValue.ImageModel?.PixelHeight ?? vm.ImageHeight;
+            firstWidth = preloadValue.ImageModel?.PixelWidth ?? vm.PicViewer.ImageWidth;
+            firstHeight = preloadValue.ImageModel?.PixelHeight ?? vm.PicViewer.ImageHeight;
         }
 
         if (!Settings.ImageScaling.ShowImageSideBySide)
@@ -181,8 +181,8 @@ public static class WindowResizing
     public static ImageSizeCalculationHelper.ImageSize? GetSize(double width, double height, double secondWidth, double secondHeight, double rotation,
         MainViewModel vm)
     {
-        width = width == 0 ? vm.ImageWidth : width;
-        height = height == 0 ? vm.ImageHeight : height;
+        width = width == 0 ? vm.PicViewer.ImageWidth : width;
+        height = height == 0 ? vm.PicViewer.ImageHeight : height;
         if (Application.Current?.ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop)
         {
             return null;

Неке датотеке нису приказане због велике количине промена