Browse Source

Refactor to use several view models, rename variables.

Ruben 7 months ago
parent
commit
1953b753aa
91 changed files with 1801 additions and 1788 deletions
  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
                 <TextBlock
                     Classes="txt"
                     Classes="txt"
-                    Text="{CompiledBinding About,
+                    Text="{CompiledBinding Translation.About,
                                            Mode=OneWay}"
                                            Mode=OneWay}"
                     TextAlignment="Center" />
                     TextAlignment="Center" />
             </DockPanel>
             </DockPanel>

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

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

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

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

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

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

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

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

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

@@ -22,124 +22,124 @@
     </Window.Resources>
     </Window.Resources>
     <NativeMenu.Menu>
     <NativeMenu.Menu>
         <NativeMenu>
         <NativeMenu>
-            <NativeMenuItem Header="{CompiledBinding File}">
+            <NativeMenuItem Header="{CompiledBinding Translation.File}">
                 <NativeMenu>
                 <NativeMenu>
-                    <NativeMenuItem Command="{CompiledBinding OpenFileCommand}" Header="{CompiledBinding Open, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding OpenFileCommand}" Header="{CompiledBinding Translation.Open, Mode=OneWay}" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding OpenWithCommand}"
                         Command="{CompiledBinding OpenWithCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding OpenWith,
+                        Header="{CompiledBinding Translation.OpenWith,
                                                  Mode=OneWay}" />
                                                  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
                     <NativeMenuItem
                         Command="{CompiledBinding PrintCommand}"
                         Command="{CompiledBinding PrintCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding Print,
+                        Header="{CompiledBinding Translation.Print,
                                                  Mode=OneWay}" />
                                                  Mode=OneWay}" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding LocateOnDiskCommand}"
                         Command="{CompiledBinding LocateOnDiskCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding ShowInFolder,
+                        Header="{CompiledBinding Translation.ShowInFolder,
                                                  Mode=OneWay}" />
                                                  Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding DeleteFileCommand}" Header="{CompiledBinding DeleteFile, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding DeleteFileCommand}" Header="{CompiledBinding Translation.DeleteFile, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <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 />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding RenameCommand}" Header="{CompiledBinding RenameFile, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding RenameCommand}" Header="{CompiledBinding Translation.RenameFile, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding PasteCommand}" Header="{CompiledBinding FilePaste, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding PasteCommand}" Header="{CompiledBinding Translation.Paste, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding CopyFileCommand}"
                         Command="{CompiledBinding CopyFileCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding CopyFile,
+                        Header="{CompiledBinding Translation.CopyFile,
                                                  Mode=OneWay}" />
                                                  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
                     <NativeMenuItem
                         Command="{CompiledBinding DuplicateFileCommand}"
                         Command="{CompiledBinding DuplicateFileCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding DuplicateFile,
+                        Header="{CompiledBinding Translation.DuplicateFile,
                                                  Mode=OneWay}" />
                                                  Mode=OneWay}" />
-                    <NativeMenuItem Command="{CompiledBinding CutCommand}" Header="{CompiledBinding FileCut, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding CutCommand}" Header="{CompiledBinding Translation.FileCut, Mode=OneWay}" />
                 </NativeMenu>
                 </NativeMenu>
             </NativeMenuItem>
             </NativeMenuItem>
 
 
-            <NativeMenuItem Header="{CompiledBinding ImageTxt, Mode=OneWay}">
+            <NativeMenuItem Header="{CompiledBinding Translation.Image, Mode=OneWay}">
                 <NativeMenu>
                 <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 />
                     <NativeMenuItemSeparator />
                     <NativeMenuItem Command="{CompiledBinding CropCommand}" Header="{CompiledBinding Crop, Mode=OneWay}" />
                     <NativeMenuItem Command="{CompiledBinding CropCommand}" Header="{CompiledBinding Crop, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
                     <!--  TODO Implement setting as wallpaper for macOS  -->
                     <!--  TODO Implement setting as wallpaper for macOS  -->
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding SetAsWallpaperCommand}"
                         Command="{CompiledBinding SetAsWallpaperCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding SetAsWallpaper,
+                        Header="{CompiledBinding Translation.SetAsWallpaper,
                                                  Mode=OneWay}"
                                                  Mode=OneWay}"
                         IsEnabled="False" />
                         IsEnabled="False" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding SetAsLockScreenCommand}"
                         Command="{CompiledBinding SetAsLockScreenCommand}"
-                        CommandParameter="{CompiledBinding FileInfo.FullName,
+                        CommandParameter="{CompiledBinding PicViewer.FileInfo,
                                                            FallbackValue=''}"
                                                            FallbackValue=''}"
-                        Header="{CompiledBinding SetAsLockScreenImage,
+                        Header="{CompiledBinding Translation.SetAsLockScreenImage,
                                                  Mode=OneWay}"
                                                  Mode=OneWay}"
                         IsEnabled="False" />
                         IsEnabled="False" />
                     <NativeMenuItemSeparator />
                     <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 />
                     <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 />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding OptimizeImageCommand}" Header="{CompiledBinding OptimizeImage, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding OptimizeImageCommand}" Header="{CompiledBinding Translation.OptimizeImage, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Header="{CompiledBinding Effects}" />
+                    <NativeMenuItem Header="{CompiledBinding Translation.Effects}" />
                 </NativeMenu>
                 </NativeMenu>
             </NativeMenuItem>
             </NativeMenuItem>
-            <NativeMenuItem Header="{CompiledBinding Navigation}">
+            <NativeMenuItem Header="{CompiledBinding Translation.Navigation}">
                 <NativeMenu>
                 <NativeMenu>
-                    <NativeMenuItem Command="{CompiledBinding SlideshowCommand}" Header="{CompiledBinding Slideshow}" />
+                    <NativeMenuItem Command="{CompiledBinding SlideshowCommand}" Header="{CompiledBinding Translation.Slideshow}" />
                     <NativeMenuItemSeparator />
                     <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 />
                     <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>
                 </NativeMenu>
             </NativeMenuItem>
             </NativeMenuItem>
-            <NativeMenuItem Header="{CompiledBinding InterfaceConfiguration}">
+            <NativeMenuItem Header="{CompiledBinding Translation.InterfaceConfiguration}">
                 <NativeMenu>
                 <NativeMenu>
-                    <NativeMenuItem Command="{CompiledBinding ToggleFullscreenCommand}" Header="{CompiledBinding ToggleFullscreen, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding ToggleFullscreenCommand}" Header="{CompiledBinding Translation.ToggleFullscreen, Mode=OneWay}" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding ChangeAutoFitCommand}"
                         Command="{CompiledBinding ChangeAutoFitCommand}"
-                        Header="{CompiledBinding AutoFitWindow}"
+                        Header="{CompiledBinding Translation.AutoFitWindow}"
                         IsChecked="{CompiledBinding IsAutoFit}"
                         IsChecked="{CompiledBinding IsAutoFit}"
                         ToggleType="CheckBox" />
                         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>
                 </NativeMenu>
             </NativeMenuItem>
             </NativeMenuItem>
 
 
-            <NativeMenuItem Header="{CompiledBinding SortFilesBy, Mode=OneWay}">
+            <NativeMenuItem Header="{CompiledBinding Translation.SortFilesBy, Mode=OneWay}">
                 <NativeMenu>
                 <NativeMenu>
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesByNameCommand}"
                         Command="{CompiledBinding SortFilesByNameCommand}"
-                        Header="{CompiledBinding FileName,
+                        Header="{CompiledBinding Translation.FileName,
                                                  Mode=OneWay}"
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -147,7 +147,7 @@
                         ToggleType="Radio" />
                         ToggleType="Radio" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesBySizeCommand}"
                         Command="{CompiledBinding SortFilesBySizeCommand}"
-                        Header="{CompiledBinding FileSize,
+                        Header="{CompiledBinding Translation.FileSize,
                                                  Mode=OneWay}"
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -155,7 +155,7 @@
                         ToggleType="Radio" />
                         ToggleType="Radio" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesByExtensionCommand}"
                         Command="{CompiledBinding SortFilesByExtensionCommand}"
-                        Header="{CompiledBinding FileExtension,
+                        Header="{CompiledBinding Translation.FileExtension,
                                                  Mode=OneWay}"
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -163,7 +163,7 @@
                         ToggleType="Radio" />
                         ToggleType="Radio" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesByCreationTimeCommand}"
                         Command="{CompiledBinding SortFilesByCreationTimeCommand}"
-                        Header="{CompiledBinding Created,
+                        Header="{CompiledBinding Translation.Created,
                                                  Mode=OneWay}"
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -171,7 +171,7 @@
                         ToggleType="Radio" />
                         ToggleType="Radio" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesByLastAccessTimeCommand}"
                         Command="{CompiledBinding SortFilesByLastAccessTimeCommand}"
-                        Header="{CompiledBinding LastAccessTime,
+                        Header="{CompiledBinding Translation.LastAccessTime,
                                                  Mode=OneWay}"
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -179,7 +179,7 @@
                         ToggleType="Radio" />
                         ToggleType="Radio" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding SortFilesRandomlyCommand}"
                         Command="{CompiledBinding SortFilesRandomlyCommand}"
-                        Header="{CompiledBinding Random,
+                        Header="{CompiledBinding Translation.Random,
                                                  Mode=OneWay}"
                                                  Mode=OneWay}"
                         IsChecked="{CompiledBinding SortOrder,
                         IsChecked="{CompiledBinding SortOrder,
                                                     Converter={StaticResource EnumToBoolConverter},
                                                     Converter={StaticResource EnumToBoolConverter},
@@ -188,43 +188,43 @@
                 </NativeMenu>
                 </NativeMenu>
             </NativeMenuItem>
             </NativeMenuItem>
 
 
-            <NativeMenuItem Header="{CompiledBinding Settings}">
+            <NativeMenuItem Header="{CompiledBinding Translation.Settings}">
                 <NativeMenu>
                 <NativeMenu>
-                    <NativeMenuItem Command="{CompiledBinding ChangeBackgroundCommand}" Header="{CompiledBinding ChangeBackground, Mode=OneWay}" />
+                    <NativeMenuItem Command="{CompiledBinding ChangeBackgroundCommand}" Header="{CompiledBinding Translation.ChangeBackground, Mode=OneWay}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding ToggleLoopingCommand}"
                         Command="{CompiledBinding ToggleLoopingCommand}"
-                        Header="{CompiledBinding GetIsLoopingTranslation}"
+                        Header="{CompiledBinding Translation.IsLooping}"
                         IsChecked="{CompiledBinding IsLooping}"
                         IsChecked="{CompiledBinding IsLooping}"
                         ToggleType="CheckBox" />
                         ToggleType="CheckBox" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding StretchCommand}"
                         Command="{CompiledBinding StretchCommand}"
-                        Header="{CompiledBinding Stretch}"
+                        Header="{CompiledBinding Translation.Stretch}"
                         IsChecked="{CompiledBinding IsStretched}"
                         IsChecked="{CompiledBinding IsStretched}"
                         ToggleType="CheckBox" />
                         ToggleType="CheckBox" />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding ToggleScrollCommand}"
                         Command="{CompiledBinding ToggleScrollCommand}"
-                        Header="{CompiledBinding ToggleScroll}"
+                        Header="{CompiledBinding Translation.ToggleScroll}"
                         IsChecked="{CompiledBinding IsScrollingEnabled}"
                         IsChecked="{CompiledBinding IsScrollingEnabled}"
                         ToggleType="CheckBox" />
                         ToggleType="CheckBox" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding ChangeTopMostCommand}"
                         Command="{CompiledBinding ChangeTopMostCommand}"
-                        Header="{CompiledBinding StayTopMost}"
+                        Header="{CompiledBinding Translation.StayTopMost}"
                         IsChecked="{CompiledBinding IsTopMost}"
                         IsChecked="{CompiledBinding IsTopMost}"
                         ToggleType="CheckBox" />
                         ToggleType="CheckBox" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
                     <NativeMenuItem
                     <NativeMenuItem
                         Command="{CompiledBinding ToggleSubdirectoriesCommand}"
                         Command="{CompiledBinding ToggleSubdirectoriesCommand}"
-                        Header="{CompiledBinding SearchSubdirectory}"
+                        Header="{CompiledBinding Translation.SearchSubdirectory}"
                         IsChecked="{CompiledBinding IsIncludingSubdirectories}"
                         IsChecked="{CompiledBinding IsIncludingSubdirectories}"
                         ToggleType="CheckBox" />
                         ToggleType="CheckBox" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding ShowKeybindingsWindowCommand}" Header="{CompiledBinding ApplicationShortcuts}" />
+                    <NativeMenuItem Command="{CompiledBinding ShowKeybindingsWindowCommand}" Header="{CompiledBinding Translation.ApplicationShortcuts}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding ShowAboutWindowCommand}" Header="{CompiledBinding About}" />
+                    <NativeMenuItem Command="{CompiledBinding ShowAboutWindowCommand}" Header="{CompiledBinding Translation.About}" />
                     <NativeMenuItemSeparator />
                     <NativeMenuItemSeparator />
-                    <NativeMenuItem Command="{CompiledBinding ShowSettingsWindowCommand}" Header="{CompiledBinding ShowAllSettingsWindow}" />
+                    <NativeMenuItem Command="{CompiledBinding ShowSettingsWindowCommand}" Header="{CompiledBinding Translation.ShowAllSettingsWindow}" />
                 </NativeMenu>
                 </NativeMenu>
             </NativeMenuItem>
             </NativeMenuItem>
 
 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -33,7 +33,7 @@ public static class ClipboardFileOperations
         {
         {
             vm.IsLoading = true;
             vm.IsLoading = true;
             
             
-            if (path == vm.FileInfo?.FullName)
+            if (path == vm.PicViewer.FileInfo?.FullName)
             {
             {
                 await DuplicateCurrentFile(vm);
                 await DuplicateCurrentFile(vm);
             }
             }
@@ -66,8 +66,8 @@ public static class ClipboardFileOperations
             return;
             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))
         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)
     public static async Task<bool> CopyImageToClipboard(MainViewModel vm)
     {
     {
         var clipboard = ClipboardService.GetClipboard();
         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;
             return false;
         }
         }
@@ -97,12 +97,12 @@ public static class ClipboardImageOperations
             return Convert.ToBase64String(await File.ReadAllBytesAsync(path));
             return Convert.ToBase64String(await File.ReadAllBytesAsync(path));
         }
         }
 
 
-        switch (vm.ImageType)
+        switch (vm.PicViewer.ImageType)
         {
         {
             case ImageType.AnimatedGif:
             case ImageType.AnimatedGif:
             case ImageType.AnimatedWebp:
             case ImageType.AnimatedWebp:
             case ImageType.Bitmap:
             case ImageType.Bitmap:
-                if (vm.ImageSource is not Bitmap bitmap)
+                if (vm.PicViewer.ImageSource is not Bitmap bitmap)
                 {
                 {
                     return string.Empty;
                     return string.Empty;
                 }
                 }
@@ -117,7 +117,7 @@ public static class ClipboardImageOperations
                 return string.Empty;
                 return string.Empty;
 
 
             default:
             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)
     public static async Task ResizeImageByPercentage(int percentage, MainViewModel vm)
     {
     {
         TitleManager.SetLoadingTitle(vm);
         TitleManager.SetLoadingTitle(vm);
-        var success = await ResizeImageByPercentage(vm.FileInfo, percentage);
+        var success = await ResizeImageByPercentage(vm.PicViewer.FileInfo, percentage);
         if (success)
         if (success)
         {
         {
             await NavigationManager.QuickReload();
             await NavigationManager.QuickReload();
@@ -89,12 +89,12 @@ internal static class ConversionHelper
     
     
     public static async Task ConvertFileExtension(int index, MainViewModel vm)
     public static async Task ConvertFileExtension(int index, MainViewModel vm)
     {
     {
-        if (vm.FileInfo is null)
+        if (vm.PicViewer.FileInfo is null)
         {
         {
             return;
             return;
         }
         }
 
 
-        var newPath = await ConvertTask(vm.FileInfo, index);
+        var newPath = await ConvertTask(vm.PicViewer.FileInfo, index);
         if (!string.IsNullOrWhiteSpace(newPath))
         if (!string.IsNullOrWhiteSpace(newPath))
         {
         {
             await NavigationManager.LoadPicFromStringAsync(newPath, vm);
             await NavigationManager.LoadPicFromStringAsync(newPath, vm);
@@ -103,16 +103,16 @@ internal static class ConversionHelper
     
     
     public static void DetermineIfOptimizeImageShouldBeEnabled(MainViewModel vm)
     public static void DetermineIfOptimizeImageShouldBeEnabled(MainViewModel vm)
     {
     {
-        if (vm.FileInfo is null)
+        if (vm.PicViewer.FileInfo is null)
         {
         {
             vm.ShouldOptimizeImageBeEnabled = false;
             vm.ShouldOptimizeImageBeEnabled = false;
             return;
             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;
             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)
     public void OnDragStart(object? sender, PointerPressedEventArgs e)
     {
     {
         if (!e.GetCurrentPoint(control).Properties.IsLeftButtonPressed || 
         if (!e.GetCurrentPoint(control).Properties.IsLeftButtonPressed || 
-            control.DataContext is not ImageCropperViewModel vm)
+            control.DataContext is not MainViewModel vm)
         {
         {
             return;
             return;
         }
         }
@@ -39,7 +39,7 @@ public class CropDragHandler(CropControl control)
             currentTop = 0;
             currentTop = 0;
         }
         }
 
 
-        _originalRect = new Rect(currentLeft, currentTop, vm.SelectionWidth, vm.SelectionHeight);
+        _originalRect = new Rect(currentLeft, currentTop, vm.Crop.SelectionWidth, vm.Crop.SelectionHeight);
         _isDragging = true;
         _isDragging = true;
     }
     }
 
 
@@ -50,7 +50,7 @@ public class CropDragHandler(CropControl control)
             return;
             return;
         }
         }
 
 
-        if (control.DataContext is not ImageCropperViewModel vm)
+        if (control.DataContext is not MainViewModel vm)
         {
         {
             return;
             return;
         }
         }
@@ -68,8 +68,8 @@ public class CropDragHandler(CropControl control)
         var newTop = _originalRect.Y + delta.Y;
         var newTop = _originalRect.Y + delta.Y;
 
 
         // Clamp the newLeft and newTop values to keep the rectangle within bounds
         // 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)
         // Only proceed if new positions are valid (i.e., not NaN)
         if (double.IsNaN(newLeft) || double.IsNaN(newTop))
         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);
         Canvas.SetTop(control.SizeBorder, newTop - control.SizeBorder.Bounds.Height - ButtonTopOffset);
 
 
         // Update view model values
         // 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)
     public void OnDragEnd(object? sender, PointerReleasedEventArgs e)

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

@@ -30,7 +30,7 @@ public static class CropFunctions
         {
         {
             return;
             return;
         }
         }
-        if (vm?.ImageSource is not Bitmap bitmap)
+        if (vm?.PicViewer.ImageSource is not Bitmap bitmap)
         {
         {
             return;
             return;
         }
         }
@@ -43,16 +43,16 @@ public static class CropFunctions
             WindowResizing.SetSize(vm);
             WindowResizing.SetSize(vm);
             Settings.Gallery.IsBottomGalleryShown = true;
             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,
             ImageWidth = size.Width,
             ImageHeight = size.Height,
             ImageHeight = size.Height,
-            AspectRatio = vm.AspectRatio
+            AspectRatio = vm.PicViewer.AspectRatio
         };
         };
         var cropControl = new CropControl
         var cropControl = new CropControl
         {
         {
-            DataContext = cropperViewModel,
+            DataContext = vm,
             Width = size.Width,
             Width = size.Width,
             Height = size.Height,
             Height = size.Height,
             Margin = new Thickness(0)
             Margin = new Thickness(0)
@@ -79,17 +79,19 @@ public static class CropFunctions
         TitleManager.SetTitle(vm);
         TitleManager.SetTitle(vm);
         
         
         // Reset image type to fix issue with animated images
         // Reset image type to fix issue with animated images
-        switch (vm.ImageType)
+        switch (vm.PicViewer.ImageType)
         {
         {
             case ImageType.AnimatedWebp:
             case ImageType.AnimatedWebp:
-                vm.ImageType = ImageType.Bitmap;
-                vm.ImageType = ImageType.AnimatedWebp;
+                vm.PicViewer.ImageType = ImageType.Bitmap;
+                vm.PicViewer.ImageType = ImageType.AnimatedWebp;
                 break;
                 break;
             case ImageType.AnimatedGif:
             case ImageType.AnimatedGif:
-                vm.ImageType = ImageType.Bitmap;
-                vm.ImageType = ImageType.AnimatedGif;
+                vm.PicViewer.ImageType = ImageType.Bitmap;
+                vm.PicViewer.ImageType = ImageType.AnimatedGif;
                 break;
                 break;
         }
         }
+
+        vm.Crop = null;
     }
     }
 
 
     public static bool DetermineIfShouldBeEnabled(MainViewModel vm)
     public static bool DetermineIfShouldBeEnabled(MainViewModel vm)
@@ -98,7 +100,7 @@ public static class CropFunctions
         {
         {
             return false;
             return false;
         }
         }
-        if (vm?.ImageSource is not Bitmap)
+        if (vm?.PicViewer.ImageSource is not Bitmap)
         {
         {
             vm.ShouldCropBeEnabled = false;
             vm.ShouldCropBeEnabled = false;
             return false;
             return false;
@@ -120,7 +122,7 @@ public static class CropFunctions
             return false;
             return false;
         }
         }
 
 
-        if (vm.RotationAngle is 0 && vm.ScaleX is 1)
+        if (vm.RotationAngle is 0 && vm.PicViewer.ScaleX is 1)
         {
         {
             vm.ShouldCropBeEnabled = true;
             vm.ShouldCropBeEnabled = true;
             return 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)
     public async Task KeyDownHandler(KeyEventArgs e)
     {
     {
-        if (control.DataContext is not ImageCropperViewModel vm)
+        if (control.DataContext is not MainViewModel vm)
         {
         {
             return;
             return;
         }
         }
@@ -20,7 +20,7 @@ public class CropKeyboardManager(CropControl control)
         switch (e.Key)
         switch (e.Key)
         {
         {
             case Key.Enter:
             case Key.Enter:
-                await vm.CropImageCommand.Execute();
+                await vm.Crop.CropImageCommand.Execute();
                 return;
                 return;
             case Key.Escape:
             case Key.Escape:
                 CropFunctions.CloseCropControl(UIHelper.GetMainView.DataContext as MainViewModel);
                 CropFunctions.CloseCropControl(UIHelper.GetMainView.DataContext as MainViewModel);
@@ -85,11 +85,11 @@ public class CropKeyboardManager(CropControl control)
                 case "Save":
                 case "Save":
                 case "SaveAs":
                 case "SaveAs":
                 case "GalleryClick":
                 case "GalleryClick":
-                    await vm.CropImageCommand.Execute();
+                    await vm.Crop.CropImageCommand.Execute();
                     return;
                     return;
                 case "CopyImage":
                 case "CopyImage":
                 case "CopyFile":
                 case "CopyFile":
-                    await vm.CopyCropImageCommand.Execute();
+                    await vm.Crop.CopyCropImageCommand.Execute();
                     return;
                     return;
             }
             }
         }
         }

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

@@ -10,39 +10,39 @@ public class CropLayoutManager(CropControl control)
     
     
     public void InitializeLayout()
     public void InitializeLayout()
     {
     {
-        if (control.DataContext is not ImageCropperViewModel vm)
+        if (control.DataContext is not MainViewModel vm)
         {
         {
             return;
             return;
         }
         }
 
 
         // Ensure image dimensions are valid before proceeding
         // Ensure image dimensions are valid before proceeding
-        if (vm.ImageWidth <= 0 || vm.ImageHeight <= 0)
+        if (vm.PicViewer.ImageWidth <= 0 || vm.PicViewer.ImageHeight <= 0)
         {
         {
             return;
             return;
         }
         }
 
 
         // Set initial width and height for the crop rectangle
         // 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)
         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)
         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
         // 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
         // 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();
         UpdateLayout();
     }
     }
@@ -62,7 +62,7 @@ public class CropLayoutManager(CropControl control)
 
 
     private void UpdateSurroundingRectangles()
     private void UpdateSurroundingRectangles()
     {
     {
-        if (control.DataContext is not ImageCropperViewModel vm)
+        if (control.DataContext is not MainViewModel vm)
         {
         {
             return;
             return;
         }
         }
@@ -70,46 +70,46 @@ public class CropLayoutManager(CropControl control)
         // Converting to int fixes black border
         // Converting to int fixes black border
         var left = Convert.ToInt32(Canvas.GetLeft(control.MainRectangle));
         var left = Convert.ToInt32(Canvas.GetLeft(control.MainRectangle));
         var top = Convert.ToInt32(Canvas.GetTop(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
         // Calculate the positions and sizes for the surrounding rectangles
         // Top Rectangle (above MainRectangle)
         // Top Rectangle (above MainRectangle)
-        control.TopRectangle.Width = vm.ImageWidth;
+        control.TopRectangle.Width = vm.PicViewer.ImageWidth;
         control.TopRectangle.Height = top < 0 ? 0 : top;
         control.TopRectangle.Height = top < 0 ? 0 : top;
         Canvas.SetTop(control.TopRectangle, 0);
         Canvas.SetTop(control.TopRectangle, 0);
 
 
         // Bottom Rectangle (below MainRectangle)
         // 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;
         control.BottomRectangle.Height = newBottomRectangleHeight;
         Canvas.SetTop(control.BottomRectangle, bottom);
         Canvas.SetTop(control.BottomRectangle, bottom);
 
 
         // Left Rectangle (left of MainRectangle)
         // Left Rectangle (left of MainRectangle)
         control.LeftRectangle.Width = left < 0 ? 0 : left;
         control.LeftRectangle.Width = left < 0 ? 0 : left;
-        control.LeftRectangle.Height = vm.SelectionHeight;
+        control.LeftRectangle.Height = vm.Crop.SelectionHeight;
         Canvas.SetLeft(control.LeftRectangle, 0);
         Canvas.SetLeft(control.LeftRectangle, 0);
         Canvas.SetTop(control.LeftRectangle, top);
         Canvas.SetTop(control.LeftRectangle, top);
 
 
         // Right Rectangle (right of MainRectangle)
         // 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.Width = newRightRectangleWidth;
-        control.RightRectangle.Height = vm.SelectionHeight;
+        control.RightRectangle.Height = vm.Crop.SelectionHeight;
         Canvas.SetLeft(control.RightRectangle, right);
         Canvas.SetLeft(control.RightRectangle, right);
         Canvas.SetTop(control.RightRectangle, top);
         Canvas.SetTop(control.RightRectangle, top);
     }
     }
 
 
     public void UpdateButtonPositions()
     public void UpdateButtonPositions()
     {
     {
-        if (control.DataContext is not ImageCropperViewModel vm)
+        if (control.DataContext is not MainViewModel vm)
         {
         {
             return;
             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)
         // Get the bounds of the RootCanvas (the control container)
         const int rootCanvasLeft = 0;
         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)
     public void OnResizeStart(PointerPressedEventArgs e)
     {
     {
         if (!e.GetCurrentPoint(control).Properties.IsLeftButtonPressed ||
         if (!e.GetCurrentPoint(control).Properties.IsLeftButtonPressed ||
-            control.DataContext is not ImageCropperViewModel vm)
+            control.DataContext is not MainViewModel vm)
         {
         {
             return;
             return;
         }
         }
 
 
         _resizeStart = e.GetPosition(control.RootCanvas);
         _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;
         _isResizing = true;
     }
     }
 
 
     public void OnResizeMove(object? sender, PointerEventArgs e, CropResizeMode mode)
     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;
             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)
     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);
             return new Size(preloadValue.ImageModel.PixelWidth, preloadValue.ImageModel.PixelHeight);
         }
         }
 
 
-        if (vm.FileInfo?.Exists != true)
+        if (vm.PicViewer.FileInfo?.Exists != true)
         {
         {
             return new Size();
             return new Size();
         }
         }
@@ -292,7 +292,7 @@ public class PicBox : Control, IDisposable
         try
         try
         {
         {
             using var magickImage = new MagickImage();
             using var magickImage = new MagickImage();
-            magickImage.Ping(vm.FileInfo);
+            magickImage.Ping(vm.PicViewer.FileInfo);
             return new Size(magickImage.Width, magickImage.Height);
             return new Size(magickImage.Width, magickImage.Height);
         }
         }
         catch (Exception exception)
         catch (Exception exception)

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

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

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

@@ -15,13 +15,13 @@ public static class FileSaverHelper
             return;
             return;
         }
         }
         
         
-        if (vm.FileInfo is null)
+        if (vm.PicViewer.FileInfo is null)
         {
         {
             await SaveFileAs(vm);
             await SaveFileAs(vm);
         }
         }
         else
         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
         //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
         // 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);
         await FilePicker.PickAndSaveFileAsAsync(fileName, vm);
     }
     }
 
 
     public static async Task SaveFileAsync(string? filename, string destination, MainViewModel 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();
             await SaveImageFromBitmap();
         }
         }
@@ -74,13 +74,13 @@ public static class FileSaverHelper
             
             
             try
             try
             {
             {
-                switch (vm.ImageType)
+                switch (vm.PicViewer.ImageType)
                 {
                 {
                     case ImageType.AnimatedGif: // TODO: Add animated GIF support
                     case ImageType.AnimatedGif: // TODO: Add animated GIF support
                     case ImageType.AnimatedWebp: // TODO: Add animated WebP support
                     case ImageType.AnimatedWebp: // TODO: Add animated WebP support
                     case ImageType.Bitmap:
                     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.");
                             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)
         if (Settings.Gallery.IsBottomGalleryShown)
         {
         {
             vm.GalleryMode = GalleryMode.BottomToClosed;
             vm.GalleryMode = GalleryMode.BottomToClosed;
-            vm.GetIsShowingBottomGalleryTranslation = TranslationManager.Translation.ShowBottomGallery;
+            vm.Translation.IsShowingBottomGallery = TranslationManager.Translation.ShowBottomGallery;
             Settings.Gallery.IsBottomGalleryShown = false;
             Settings.Gallery.IsBottomGalleryShown = false;
             IsFullGalleryOpen = false;
             IsFullGalleryOpen = false;
             IsBottomGalleryOpen = false;
             IsBottomGalleryOpen = false;
@@ -352,7 +352,7 @@ public static class GalleryFunctions
             vm.GalleryMode = GalleryMode.ClosedToBottom;
             vm.GalleryMode = GalleryMode.ClosedToBottom;
         }
         }
 
 
-        vm.GetIsShowingBottomGalleryTranslation = TranslationManager.Translation.HideBottomGallery;
+        vm.Translation.IsShowingBottomGallery = TranslationManager.Translation.HideBottomGallery;
         if (!NavigationManager.CanNavigate(vm))
         if (!NavigationManager.CanNavigate(vm))
         {
         {
             return;
             return;

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

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

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

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

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

@@ -18,7 +18,7 @@ public static class ImageOptimizer
     {
     {
         ArgumentNullException.ThrowIfNull(vm);
         ArgumentNullException.ThrowIfNull(vm);
 
 
-        if (!NavigationManager.CanNavigate(vm) || vm.FileInfo == null)
+        if (!NavigationManager.CanNavigate(vm) || vm.PicViewer.FileInfo == null)
         {
         {
             return;
             return;
         }
         }
@@ -31,7 +31,7 @@ public static class ImageOptimizer
                 {
                 {
                     OptimalCompression = true
                     OptimalCompression = true
                 };
                 };
-                optimizer.LosslessCompress(vm.FileInfo.FullName);
+                optimizer.LosslessCompress(vm.PicViewer.FileInfo.FullName);
             }
             }
             catch (Exception ex)
             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)
     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
         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); });
         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;
         vm.IsLoading = true;
         
         
-        if (vm.ImageSource is null)
+        if (vm.PicViewer.ImageSource is null)
         {
         {
             await Dispatcher.UIThread.InvokeAsync(() =>
             await Dispatcher.UIThread.InvokeAsync(() =>
             {
             {
@@ -81,7 +81,7 @@ public static class ErrorHandling
             return;
             return;
         }
         }
         
         
-        if (vm.ImageSource is null || !NavigationManager.CanNavigate(vm))
+        if (vm.PicViewer.ImageSource is null || !NavigationManager.CanNavigate(vm))
         {
         {
             await Dispatcher.UIThread.InvokeAsync(() =>
             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)
     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;
             return;
         }
         }
@@ -22,39 +22,39 @@ public static class ExifHandling
         
         
         try
         try
         {
         {
-            if (!vm.FileInfo.Exists)
+            if (!vm.PicViewer.FileInfo.Exists)
             {
             {
                 return;
                 return;
             }
             }
-            magick.Ping(vm.FileInfo);
+            magick.Ping(vm.PicViewer.FileInfo);
             var profile = magick.GetExifProfile();
             var profile = magick.GetExifProfile();
 
 
             if (profile != null)
             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;
                 var depth = profile?.GetValue(ExifTag.BitsPerSample)?.Value;
                 if (depth is not null)
                 if (depth is not null)
                 {
                 {
                     var x = depth.Aggregate(0, (current, value) => current + value);
                     var x = depth.Aggregate(0, (current, value) => current + value);
-                    vm.GetBitDepth = x.ToString();
+                    vm.Exif.BitDepth = x.ToString();
                 }
                 }
                 else
                 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.Horizontal => TranslationManager.Translation.Normal,
                 EXIFHelper.EXIFOrientation.MirrorHorizontal => TranslationManager.Translation.Flipped,
                 EXIFHelper.EXIFOrientation.MirrorHorizontal => TranslationManager.Translation.Flipped,
@@ -72,34 +72,34 @@ public static class ExifHandling
 
 
             var meter = TranslationManager.Translation.Meter;
             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 
             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
             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
             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;
             vm.EXIFRating = profile?.GetValue(ExifTag.Rating)?.Value ?? 0;
@@ -108,58 +108,56 @@ public static class ExifHandling
 
 
             if (gpsValues is not null)
             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
             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;
             var altitude = profile?.GetValue(ExifTag.GPSAltitude)?.Value;
-            vm.GetAltitude = altitude.HasValue
+            vm.Exif.Altitude = altitude.HasValue
                 ? $"{altitude.Value.ToDouble()} {meter}"
                 ? $"{altitude.Value.ToDouble()} {meter}"
                 : string.Empty;
                 : string.Empty;
             var getAuthors = profile?.GetValue(ExifTag.Artist)?.Value;
             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)
         catch (Exception e)
         {
         {

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

@@ -101,13 +101,13 @@ public static class FileListManager
         {
         {
             try
             try
             {
             {
-                var files = platformSpecificService.GetFiles(vm.FileInfo);
+                var files = platformSpecificService.GetFiles(vm.PicViewer.FileInfo);
                 if (files is not { Count: > 0 })
                 if (files is not { Count: > 0 })
                 {
                 {
                     return false;
                     return false;
                 }
                 }
 
 
-                NavigationManager.UpdateFileListAndIndex(files, files.IndexOf(vm.FileInfo.FullName));
+                NavigationManager.UpdateFileListAndIndex(files, files.IndexOf(vm.PicViewer.FileInfo.FullName));
                 TitleManager.SetTitle(vm);
                 TitleManager.SetTitle(vm);
                 return true;
                 return true;
             }
             }
@@ -135,7 +135,7 @@ public static class FileListManager
 
 
         if (!_cancellationTokenSource.IsCancellationRequested)
         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);
                 PreLoader.Resynchronize(ImagePaths);
                 var newIndex = GetIteration(index, NavigateTo.Previous);
                 var newIndex = GetIteration(index, NavigateTo.Previous);
                 Interlocked.Exchange(ref _currentIndex, newIndex);
                 Interlocked.Exchange(ref _currentIndex, newIndex);
-                _vm.FileInfo = new FileInfo(ImagePaths[CurrentIndex]);
+                _vm.PicViewer.FileInfo = new FileInfo(ImagePaths[CurrentIndex]);
                 await IterateToIndex(CurrentIndex, new CancellationTokenSource());
                 await IterateToIndex(CurrentIndex, new CancellationTokenSource());
             }
             }
             else
             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 
                 _vm.SelectedGalleryItemIndex = indexOf;// Fixes deselection bug 
                 Interlocked.Exchange(ref _currentIndex, indexOf);
                 Interlocked.Exchange(ref _currentIndex, indexOf);
                 if (isSameFile)
                 if (isSameFile)
@@ -353,7 +353,7 @@ public class ImageIterator : IAsyncDisposable
         
         
             if (sameFile)
             if (sameFile)
             {
             {
-                _vm.FileInfo = fileInfo;
+                _vm.PicViewer.FileInfo = fileInfo;
             }
             }
 
 
             TitleManager.SetTitle(_vm);
             TitleManager.SetTitle(_vm);
@@ -411,10 +411,10 @@ public class ImageIterator : IAsyncDisposable
         await PreLoader.GetAsync(index, ImagePaths);
         await PreLoader.GetAsync(index, ImagePaths);
 
 
     public PreLoadValue? GetCurrentPreLoadValue() =>
     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() =>
     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()
     public PreLoadValue? GetNextPreLoadValue()
     {
     {
@@ -442,7 +442,7 @@ public class ImageIterator : IAsyncDisposable
     public async Task ReloadFileListAsync()
     public async Task ReloadFileListAsync()
     {
     {
         ImagePaths = await Task.FromResult(_vm.PlatformService.GetFiles(InitialFileInfo)).ConfigureAwait(false);
         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);
         InitiateFileSystemWatcher(InitialFileInfo);
     }
     }
@@ -728,7 +728,7 @@ public class ImageIterator : IAsyncDisposable
 
 
             if (!Settings.ImageScaling.ShowImageSideBySide)
             if (!Settings.ImageScaling.ShowImageSideBySide)
             {
             {
-                _vm.ImageSource = thumb;
+                _vm.PicViewer.ImageSource = thumb;
             }
             }
             else
             else
             {
             {
@@ -737,8 +737,8 @@ public class ImageIterator : IAsyncDisposable
                 {
                 {
                     return;
                     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 &&
         return _imageIterator?.ImagePaths is not null &&
                _imageIterator.ImagePaths.Count > 0 && !CropFunctions.IsCropping &&
                _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
         // TODO: should probably turn this into CanExecute observable for ReactiveUI
     }
     }
 
 
@@ -59,10 +59,10 @@ public static class NavigationManager
     {
     {
         if (!CanNavigate(vm))
         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.
                 // Fixes issue that shouldn't happen. Should investigate.
-                vm.FileInfo = new FileInfo(_imageIterator.ImagePaths[0]);
+                vm.PicViewer.FileInfo = new FileInfo(_imageIterator.ImagePaths[0]);
             }
             }
             else
             else
             {
             {
@@ -141,7 +141,7 @@ public static class NavigationManager
             }
             }
             else
             else
             {
             {
-                await UpdateImage.SetTiffImageAsync(TiffNavigationInfo, _imageIterator.CurrentIndex, vm.FileInfo, vm);
+                await UpdateImage.SetTiffImageAsync(TiffNavigationInfo, _imageIterator.CurrentIndex, vm.PicViewer.FileInfo, vm);
             }
             }
         }
         }
         return;
         return;
@@ -584,8 +584,8 @@ public static class NavigationManager
         await UpdateImage.SetSingleImageAsync(imageModel.Image, imageModel.ImageType, url, vm);
         await UpdateImage.SetSingleImageAsync(imageModel.Image, imageModel.ImageType, url, vm);
 
 
         vm.IsLoading = false;
         vm.IsLoading = false;
-        vm.FileInfo = fileInfo;
-        vm.ExifOrientation = imageModel.EXIFOrientation;
+        vm.PicViewer.FileInfo = fileInfo;
+        vm.PicViewer.ExifOrientation = imageModel.EXIFOrientation;
         FileHistory.Add(url);
         FileHistory.Add(url);
 
 
         await DisposeImageIteratorAsync();
         await DisposeImageIteratorAsync();
@@ -602,8 +602,8 @@ public static class NavigationManager
     {
     {
         TitleManager.SetLoadingTitle(vm);
         TitleManager.SetLoadingTitle(vm);
         vm.IsLoading = true;
         vm.IsLoading = true;
-        vm.ImageSource = null;
-        vm.FileInfo = null;
+        vm.PicViewer.ImageSource = null;
+        vm.PicViewer.FileInfo = null;
         
         
         if (_cancellationTokenSource is not null)
         if (_cancellationTokenSource is not null)
         {
         {
@@ -637,9 +637,9 @@ public static class NavigationManager
 #if DEBUG
 #if DEBUG
                 Console.WriteLine("LoadPicFromBase64Async exception = \n" + e.Message);
                 Console.WriteLine("LoadPicFromBase64Async exception = \n" + e.Message);
 #endif
 #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
                 else
                 {
                 {
@@ -720,7 +720,7 @@ public static class NavigationManager
 
 
     public static void InitializeImageIterator(MainViewModel vm)
     public static void InitializeImageIterator(MainViewModel vm)
     {
     {
-        _imageIterator ??= new ImageIterator(vm.FileInfo, vm);
+        _imageIterator ??= new ImageIterator(vm.PicViewer.FileInfo, vm);
     }
     }
     
     
     public static async Task DisposeImageIteratorAsync()
     public static async Task DisposeImageIteratorAsync()
@@ -810,7 +810,7 @@ public static class NavigationManager
     
     
     public static async Task FullReload(MainViewModel vm)
     public static async Task FullReload(MainViewModel vm)
     {
     {
-        if (vm.ImageSource is null)
+        if (vm.PicViewer.ImageSource is null)
         {
         {
             return;
             return;
         }
         }
@@ -831,7 +831,7 @@ public static class NavigationManager
 
 
         var index = _imageIterator.CurrentIndex;
         var index = _imageIterator.CurrentIndex;
         await _imageIterator.DisposeAsync().ConfigureAwait(false);
         await _imageIterator.DisposeAsync().ConfigureAwait(false);
-        _imageIterator = new ImageIterator(vm.FileInfo, vm);
+        _imageIterator = new ImageIterator(vm.PicViewer.FileInfo, vm);
         await Navigate(index, vm).ConfigureAwait(false);
         await Navigate(index, vm).ConfigureAwait(false);
     }
     }
 
 
@@ -916,8 +916,8 @@ public static class NavigationManager
     {
     {
         var imageModel = await GetImageModel.GetImageModelAsync(fileInfo).ConfigureAwait(false);
         var imageModel = await GetImageModel.GetImageModelAsync(fileInfo).ConfigureAwait(false);
         ImageModel? nextImageModel = null;
         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)
         if (!Settings.ImageScaling.ShowImageSideBySide)
         {
         {
             await Dispatcher.UIThread.InvokeAsync(() =>
             await Dispatcher.UIThread.InvokeAsync(() =>
@@ -942,7 +942,7 @@ public static class NavigationManager
         if (Settings.ImageScaling.ShowImageSideBySide)
         if (Settings.ImageScaling.ShowImageSideBySide)
         {
         {
             nextImageModel = (await _imageIterator.GetNextPreLoadValueAsync()).ImageModel;
             nextImageModel = (await _imageIterator.GetNextPreLoadValueAsync()).ImageModel;
-            vm.SecondaryImageSource = nextImageModel.Image;
+            vm.PicViewer.SecondaryImageSource = nextImageModel.Image;
             await Dispatcher.UIThread.InvokeAsync(() =>
             await Dispatcher.UIThread.InvokeAsync(() =>
             {
             {
                 WindowResizing.SetSize(imageModel.PixelWidth, imageModel.PixelHeight, nextImageModel.PixelWidth,
                 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);
             vm.ImageViewer.SetTransform(preLoadValue.ImageModel.EXIFOrientation);
             if (Settings.ImageScaling.ShowImageSideBySide && nextPreloadValue is { ImageModel: not null })
             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})
                 if (preLoadValue is { ImageModel: not null})
                 {
                 {
-                    vm.ImageSource = preLoadValue.ImageModel.Image;
+                    vm.PicViewer.ImageSource = preLoadValue.ImageModel.Image;
                 }
                 }
             }
             }
             else if (preLoadValue is { ImageModel: not null})
             else if (preLoadValue is { ImageModel: not null})
@@ -92,9 +92,9 @@ public static class UpdateImage
                     vm.ImageViewer.MainImage.InitialAnimatedSource = preLoadValue.ImageModel.FileInfo.FullName;
                     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
             else
             {
             {
@@ -201,9 +201,9 @@ public static class UpdateImage
         MainViewModel vm)
         MainViewModel vm)
     {
     {
         var source = await Task.Run( () => tiffNavigationInfo.Pages[tiffNavigationInfo.CurrentPage].ToWriteableBitmap()).ConfigureAwait(false);
         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 width = source?.PixelSize.Width ?? 0;
         var height = source?.PixelSize.Height ?? 0;
         var height = source?.PixelSize.Height ?? 0;
         
         
@@ -294,21 +294,21 @@ public static class UpdateImage
             var path = source as string;
             var path = source as string;
             using var magickImage = new MagickImage();
             using var magickImage = new MagickImage();
             magickImage.Ping(path);
             magickImage.Ping(path);
-            vm.ImageSource = source;
-            vm.ImageType = ImageType.Svg;
+            vm.PicViewer.ImageSource = source;
+            vm.PicViewer.ImageType = ImageType.Svg;
             width = (int)magickImage.Width;
             width = (int)magickImage.Width;
             height = (int)magickImage.Height;
             height = (int)magickImage.Height;
         }
         }
         else
         else
         {
         {
             var bitmap = source as Bitmap;
             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;
             width = bitmap?.PixelSize.Width ?? 0;
             height = bitmap?.PixelSize.Height ?? 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);
         await dispatchAction(() => { WindowResizing.SetSize(width, height, 0, 0, 0, vm); }, DispatcherPriority.Send);
 
 
@@ -319,8 +319,8 @@ public static class UpdateImage
 
 
         vm.PlatformService.StopTaskbarProgress();
         vm.PlatformService.StopTaskbarProgress();
 
 
-        vm.PixelWidth = width;
-        vm.PixelHeight = height;
+        vm.PicViewer.PixelWidth = width;
+        vm.PicViewer.PixelHeight = height;
 
 
         if (Settings.Gallery.IsBottomGalleryShown)
         if (Settings.Gallery.IsBottomGalleryShown)
         {
         {
@@ -338,11 +338,11 @@ public static class UpdateImage
 
 
     public static void SetStats(MainViewModel vm, int index, ImageModel imageModel)
     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.GetIndex = index + 1;
-        vm.ExifOrientation = imageModel.EXIFOrientation;
-        vm.FileInfo = imageModel.FileInfo;
+        vm.PicViewer.ExifOrientation = imageModel.EXIFOrientation;
+        vm.PicViewer.FileInfo = imageModel.FileInfo;
         vm.ZoomValue = 1;
         vm.ZoomValue = 1;
 
 
         if (Settings.ImageScaling.ShowImageSideBySide)
         if (Settings.ImageScaling.ShowImageSideBySide)
@@ -353,7 +353,7 @@ public static class UpdateImage
         }
         }
 
 
         // Reset effects
         // Reset effects
-        vm.EffectConfig = null;
+        vm.PicViewer.EffectConfig = null;
     }
     }
 
 
     #endregion
     #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();
         var percentage = isWidth ? widthTextBox.Text.GetPercentage() : heightTextBox.Text.GetPercentage();
         if (percentage > 0)
         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);
             widthTextBox.Text = newWidth.ToString("# ", CultureInfo.CurrentCulture);
             heightTextBox.Text = newHeight.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 class LanguageUpdater
 {
 {
-    public static async Task UpdateLanguageAsync(MainViewModel vm, bool settingsExists)
+    public static async Task UpdateLanguageAsync(TranslationViewModel translationViewModel, PicViewerModel picViewerModel, bool settingsExists)
     {
     {
         if (settingsExists)
         if (settingsExists)
         {
         {
@@ -16,36 +16,36 @@ public static class LanguageUpdater
             await TranslationManager.DetermineAndLoadLanguage().ConfigureAwait(false);
             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;
             TranslationManager.Translation.ScrollingEnabled : TranslationManager.Translation.ScrollingDisabled;
         
         
-        vm.GetIsShowingBottomGalleryTranslation = Settings.Gallery.IsBottomGalleryShown ?
+        translationViewModel.IsShowingBottomGallery = Settings.Gallery.IsBottomGalleryShown ?
             TranslationManager.Translation.HideBottomGallery :
             TranslationManager.Translation.HideBottomGallery :
             TranslationManager.Translation.ShowBottomGallery;
             TranslationManager.Translation.ShowBottomGallery;
         
         
-        vm.GetIsLoopingTranslation = Settings.UIProperties.Looping
+        translationViewModel.IsLooping = Settings.UIProperties.Looping
             ? TranslationManager.Translation.LoopingEnabled
             ? TranslationManager.Translation.LoopingEnabled
             : TranslationManager.Translation.LoopingDisabled;
             : TranslationManager.Translation.LoopingDisabled;
         
         
-        vm.GetIsCtrlZoomTranslation = Settings.Zoom.CtrlZoom
+        translationViewModel.IsCtrlToZoom = Settings.Zoom.CtrlZoom
             ? TranslationManager.Translation.CtrlToZoom
             ? TranslationManager.Translation.CtrlToZoom
             : TranslationManager.Translation.ScrollToZoom;
             : TranslationManager.Translation.ScrollToZoom;
         
         
-        vm.GetIsShowingBottomToolbarTranslation = Settings.UIProperties.ShowBottomNavBar
+        translationViewModel.IsShowingBottomToolbar = Settings.UIProperties.ShowBottomNavBar
             ? TranslationManager.Translation.HideBottomToolbar
             ? TranslationManager.Translation.HideBottomToolbar
             : TranslationManager.Translation.ShowBottomToolbar;
             : TranslationManager.Translation.ShowBottomToolbar;
         
         
-        vm.GetIsShowingFadingUIButtonsTranslation = Settings.UIProperties.ShowAltInterfaceButtons
+        translationViewModel.IsShowingFadingUIButtons = Settings.UIProperties.ShowAltInterfaceButtons
             ? TranslationManager.Translation.DisableFadeInButtonsOnHover
             ? TranslationManager.Translation.DisableFadeInButtonsOnHover
             : TranslationManager.Translation.ShowFadeInButtonsOnHover;
             : TranslationManager.Translation.ShowFadeInButtonsOnHover;
         
         
-        vm.GetIsUsingTouchpadTranslation = Settings.Zoom.IsUsingTouchPad
+        translationViewModel.IsUsingTouchpad = Settings.Zoom.IsUsingTouchPad
             ? TranslationManager.Translation.UsingTouchpad
             ? TranslationManager.Translation.UsingTouchpad
             : TranslationManager.Translation.UsingMouse;
             : 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)
     public static void TurnOffUsingTouchpad(MainViewModel vm)
     {
     {
         Settings.Zoom.IsUsingTouchPad = false;
         Settings.Zoom.IsUsingTouchPad = false;
-        vm.GetIsUsingTouchpadTranslation = TranslationManager.Translation.UsingMouse;
+        vm.Translation.IsUsingTouchpad = TranslationManager.Translation.UsingMouse;
         vm.IsUsingTouchpad = false;
         vm.IsUsingTouchpad = false;
     }
     }
     
     
     public static void TurnOnUsingTouchpad(MainViewModel vm)
     public static void TurnOnUsingTouchpad(MainViewModel vm)
     {
     {
         Settings.Zoom.IsUsingTouchPad = true;
         Settings.Zoom.IsUsingTouchPad = true;
-        vm.GetIsUsingTouchpadTranslation = TranslationManager.Translation.UsingTouchpad;
+        vm.Translation.IsUsingTouchpad = TranslationManager.Translation.UsingTouchpad;
         vm.IsUsingTouchpad = true;
         vm.IsUsingTouchpad = true;
     }
     }
     
     
@@ -186,8 +186,8 @@ public static class SettingsUpdater
     public static void TurnOffSideBySide(MainViewModel vm)
     public static void TurnOffSideBySide(MainViewModel vm)
     {
     {
         Settings.ImageScaling.ShowImageSideBySide = false;
         Settings.ImageScaling.ShowImageSideBySide = false;
-        vm.IsShowingSideBySide = false;
-        vm.SecondaryImageSource = null;
+        vm.PicViewer.IsShowingSideBySide = false;
+        vm.PicViewer.SecondaryImageSource = null;
         WindowResizing.SetSize(vm);
         WindowResizing.SetSize(vm);
         TitleManager.SetTitle(vm);
         TitleManager.SetTitle(vm);
     }
     }
@@ -195,7 +195,7 @@ public static class SettingsUpdater
     public static async Task TurnOnSideBySide(MainViewModel vm)
     public static async Task TurnOnSideBySide(MainViewModel vm)
     {
     {
         Settings.ImageScaling.ShowImageSideBySide = true;
         Settings.ImageScaling.ShowImageSideBySide = true;
-        vm.IsShowingSideBySide = true;
+        vm.PicViewer.IsShowingSideBySide = true;
         if (NavigationManager.CanNavigate(vm))
         if (NavigationManager.CanNavigate(vm))
         {
         {
             var preloadValue = await NavigationManager.GetNextPreLoadValueAsync();
             var preloadValue = await NavigationManager.GetNextPreLoadValueAsync();
@@ -206,15 +206,15 @@ public static class SettingsUpdater
 #endif
 #endif
                 return;
                 return;
             }
             }
-            vm.SecondaryImageSource = preloadValue.ImageModel.Image;
+            vm.PicViewer.SecondaryImageSource = preloadValue.ImageModel.Image;
             var imageModel1 = new ImageModel
             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
             var imageModel2 = new ImageModel
             {
             {
@@ -227,7 +227,7 @@ public static class SettingsUpdater
             };
             };
             await Dispatcher.UIThread.InvokeAsync(() =>
             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);
                     preloadValue.ImageModel.PixelHeight, vm.RotationAngle, vm);
                 TitleManager.SetSideBySideTitle(vm, imageModel1, imageModel2);
                 TitleManager.SetSideBySideTitle(vm, imageModel1, imageModel2);
             });
             });
@@ -258,7 +258,7 @@ public static class SettingsUpdater
     public static void TurnOffScroll(MainViewModel vm)
     public static void TurnOffScroll(MainViewModel vm)
     {
     {
         vm.ToggleScrollBarVisibility = ScrollBarVisibility.Disabled;
         vm.ToggleScrollBarVisibility = ScrollBarVisibility.Disabled;
-        vm.GetIsScrollingTranslation = TranslationManager.Translation.ScrollingDisabled;
+        vm.Translation.IsScrolling = TranslationManager.Translation.ScrollingDisabled;
         vm.IsScrollingEnabled = false;
         vm.IsScrollingEnabled = false;
         Settings.Zoom.ScrollEnabled = false;
         Settings.Zoom.ScrollEnabled = false;
         try
         try
@@ -277,7 +277,7 @@ public static class SettingsUpdater
     public static void TurnOnScroll(MainViewModel vm)
     public static void TurnOnScroll(MainViewModel vm)
     {
     {
         vm.ToggleScrollBarVisibility = ScrollBarVisibility.Visible;
         vm.ToggleScrollBarVisibility = ScrollBarVisibility.Visible;
-        vm.GetIsScrollingTranslation = TranslationManager.Translation.ScrollingEnabled;
+        vm.Translation.IsScrolling = TranslationManager.Translation.ScrollingEnabled;
         vm.IsScrollingEnabled = true;
         vm.IsScrollingEnabled = true;
         Settings.Zoom.ScrollEnabled = true;
         Settings.Zoom.ScrollEnabled = true;
         try
         try
@@ -301,7 +301,7 @@ public static class SettingsUpdater
         }
         }
         
         
         Settings.Zoom.CtrlZoom = !Settings.Zoom.CtrlZoom;
         Settings.Zoom.CtrlZoom = !Settings.Zoom.CtrlZoom;
-        vm.GetIsCtrlZoomTranslation = Settings.Zoom.CtrlZoom
+        vm.Translation.IsCtrlToZoom = Settings.Zoom.CtrlZoom
             ? TranslationManager.Translation.CtrlToZoom
             ? TranslationManager.Translation.CtrlToZoom
             : TranslationManager.Translation.ScrollToZoom;
             : TranslationManager.Translation.ScrollToZoom;
         
         
@@ -322,7 +322,7 @@ public static class SettingsUpdater
     public static void TurnOffCtrlZoom(MainViewModel vm)
     public static void TurnOffCtrlZoom(MainViewModel vm)
     {
     {
         Settings.Zoom.CtrlZoom = false;
         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 ))
         if (!Application.Current.TryGetResource("ScanEyeImage", Application.Current.RequestedThemeVariant, out var scanEyeImage ))
         {
         {
             return;
             return;
@@ -341,7 +341,7 @@ public static class SettingsUpdater
         
         
         var value = !Settings.UIProperties.Looping;
         var value = !Settings.UIProperties.Looping;
         Settings.UIProperties.Looping = value;
         Settings.UIProperties.Looping = value;
-        vm.GetIsLoopingTranslation = value
+        vm.Translation.IsLooping = value
             ? TranslationManager.Translation.LoopingEnabled
             ? TranslationManager.Translation.LoopingEnabled
             : TranslationManager.Translation.LoopingDisabled;
             : TranslationManager.Translation.LoopingDisabled;
         vm.IsLooping = value;
         vm.IsLooping = value;
@@ -357,7 +357,7 @@ public static class SettingsUpdater
     public static void TurnOffLooping(MainViewModel vm)
     public static void TurnOffLooping(MainViewModel vm)
     {
     {
         Settings.UIProperties.Looping = false;
         Settings.UIProperties.Looping = false;
-        vm.GetIsLoopingTranslation = TranslationManager.Translation.LoopingDisabled;
+        vm.Translation.IsLooping = TranslationManager.Translation.LoopingDisabled;
         vm.IsLooping = false;
         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);
             await NavigationManager.LoadPicFromArchiveAsync(file, vm).ConfigureAwait(false);
             return;
             return;
         }
         }
-        vm.FileInfo = fileInfo;
+        vm.PicViewer.FileInfo = fileInfo;
         
         
         var imageModel = await GetImageModel.GetImageModelAsync(fileInfo).ConfigureAwait(false);
         var imageModel = await GetImageModel.GetImageModelAsync(fileInfo).ConfigureAwait(false);
         
         
@@ -37,17 +37,17 @@ public static class QuickLoad
         {
         {
             vm.ImageViewer.MainImage.InitialAnimatedSource = file;
             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.ZoomValue = 1;
-        vm.PixelWidth = imageModel.PixelWidth;
-        vm.PixelHeight = imageModel.PixelHeight;
+        vm.PicViewer.PixelWidth = imageModel.PixelWidth;
+        vm.PicViewer.PixelHeight = imageModel.PixelHeight;
         PreLoadValue? secondaryPreloadValue = null;
         PreLoadValue? secondaryPreloadValue = null;
         if (Settings.ImageScaling.ShowImageSideBySide)
         if (Settings.ImageScaling.ShowImageSideBySide)
         {
         {
             NavigationManager.InitializeImageIterator(vm);
             NavigationManager.InitializeImageIterator(vm);
             secondaryPreloadValue = await NavigationManager.GetNextPreLoadValueAsync();
             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,
         // 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);
             await Dispatcher.UIThread.InvokeAsync(SetSize, DispatcherPriority.Send);
         }
         }
 
 
-        vm.ExifOrientation = imageModel.EXIFOrientation;
+        vm.PicViewer.ExifOrientation = imageModel.EXIFOrientation;
         vm.GetIndex = NavigationManager.GetNonZeroIndex;
         vm.GetIndex = NavigationManager.GetNonZeroIndex;
         
         
         // Add recent files, except when browsing archive
         // 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));
         ResourceLimits.LimitMemory(new Percentage(90));
 
 
-        Task.Run(() => LanguageUpdater.UpdateLanguageAsync(vm, settingsExists));
+        Task.Run(() => LanguageUpdater.UpdateLanguageAsync(vm.Translation, vm.PicViewer, settingsExists));
         if (settingsExists)
         if (settingsExists)
         {
         {
             Task.Run(() => KeybindingManager.LoadKeybindings(vm.PlatformService));
             Task.Run(() => KeybindingManager.LoadKeybindings(vm.PlatformService));
@@ -309,7 +309,7 @@ public static class StartUpHelper
         vm.GetNavSpeed = Settings.UIProperties.NavSpeed;
         vm.GetNavSpeed = Settings.UIProperties.NavSpeed;
         vm.GetSlideshowSpeed = Settings.UIProperties.SlideShowTimer;
         vm.GetSlideshowSpeed = Settings.UIProperties.SlideShowTimer;
         vm.GetZoomSpeed = Settings.Zoom.ZoomSpeed;
         vm.GetZoomSpeed = Settings.Zoom.ZoomSpeed;
-        vm.IsShowingSideBySide = Settings.ImageScaling.ShowImageSideBySide;
+        vm.PicViewer.IsShowingSideBySide = Settings.ImageScaling.ShowImageSideBySide;
         vm.IsBottomGalleryShown = Settings.Gallery.IsBottomGalleryShown;
         vm.IsBottomGalleryShown = Settings.Gallery.IsBottomGalleryShown;
         vm.IsBottomGalleryShownInHiddenUI = Settings.Gallery.ShowBottomGalleryInHiddenUI;
         vm.IsBottomGalleryShownInHiddenUI = Settings.Gallery.ShowBottomGalleryInHiddenUI;
         vm.IsAvoidingZoomingOut  = Settings.Zoom.AvoidZoomingOut;
         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)" />
     /// <inheritdoc cref="FileManager.OpenWith(string, MainViewModel)" />
     public static async Task OpenWith() =>
     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)" />
     /// <inheritdoc cref="FileManager.LocateOnDisk(string, MainViewModel)" />
     public static async Task OpenInExplorer()=>
     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)" />
     /// <inheritdoc cref="FileSaverHelper.SaveCurrentFile(MainViewModel)" />
     public static async Task Save() =>
     public static async Task Save() =>
@@ -556,7 +556,7 @@ public static class FunctionsMapper
     
     
     /// <inheritdoc cref="FileManager.ShowFileProperties(string, MainViewModel)" />
     /// <inheritdoc cref="FileManager.ShowFileProperties(string, MainViewModel)" />
     public static async Task ShowFileProperties() =>
     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
     #endregion
 
 
@@ -564,11 +564,11 @@ public static class FunctionsMapper
 
 
     /// <inheritdoc cref="ClipboardFileOperations.CopyFileToClipboard(string, MainViewModel)" />
     /// <inheritdoc cref="ClipboardFileOperations.CopyFileToClipboard(string, MainViewModel)" />
     public static async Task CopyFile() =>
     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)" />
     /// <inheritdoc cref="ClipboardTextOperations.CopyTextToClipboard(string)" />
     public static async Task CopyFilePath() => 
     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)" />
     /// <inheritdoc cref="ClipboardImageOperations.CopyImageToClipboard(MainViewModel)" />
     public static async Task CopyImage() => 
     public static async Task CopyImage() => 
@@ -576,15 +576,15 @@ public static class FunctionsMapper
 
 
     /// <inheritdoc cref="ClipboardImageOperations.CopyBase64ToClipboard(string, MainViewModel)" />
     /// <inheritdoc cref="ClipboardImageOperations.CopyBase64ToClipboard(string, MainViewModel)" />
     public static async Task CopyBase64() =>
     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)" />
     /// <inheritdoc cref="ClipboardFileOperations.Duplicate(string, MainViewModel)" />
     public static async Task DuplicateFile() => 
     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)" />
     /// <inheritdoc cref="ClipboardFileOperations.CutFile(string, MainViewModel)" />
     public static async Task CutFile() =>
     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)" />
     /// <inheritdoc cref="ClipboardPasteOperations.Paste(MainViewModel)" />
     public static async Task Paste() =>
     public static async Task Paste() =>
@@ -684,7 +684,7 @@ public static class FunctionsMapper
             return;
             return;
         }
         }
 
 
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 0); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 0); });
         Vm.EXIFRating = 0;
         Vm.EXIFRating = 0;
     }
     }
 
 
@@ -696,7 +696,7 @@ public static class FunctionsMapper
             return;
             return;
         }
         }
 
 
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 1); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 1); });
         Vm.EXIFRating = 1;
         Vm.EXIFRating = 1;
     }
     }
 
 
@@ -707,7 +707,7 @@ public static class FunctionsMapper
         {
         {
             return;
             return;
         }
         }
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 2); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 2); });
         Vm.EXIFRating = 2;
         Vm.EXIFRating = 2;
     }
     }
 
 
@@ -718,7 +718,7 @@ public static class FunctionsMapper
         {
         {
             return;
             return;
         }
         }
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 3); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 3); });
         Vm.EXIFRating = 3;
         Vm.EXIFRating = 3;
     }
     }
 
 
@@ -729,7 +729,7 @@ public static class FunctionsMapper
         {
         {
             return;
             return;
         }
         }
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 4); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 4); });
         Vm.EXIFRating = 4;
         Vm.EXIFRating = 4;
     }
     }
 
 
@@ -740,7 +740,7 @@ public static class FunctionsMapper
         {
         {
             return;
             return;
         }
         }
-        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.FileInfo.FullName, 5); });
+        await Task.Run(() => { EXIFHelper.SetEXIFRating(Vm.PicViewer.FileInfo.FullName, 5); });
         Vm.EXIFRating = 5;
         Vm.EXIFRating = 5;
     }
     }
 
 
@@ -755,12 +755,12 @@ public static class FunctionsMapper
         {
         {
             return;
             return;
         }
         }
-        if (string.IsNullOrEmpty(Vm.GoogleLink))
+        if (string.IsNullOrEmpty(Vm.Exif.GoogleLink))
         {
         {
             return;
             return;
         }
         }
 
 
-        await Task.Run(() => ProcessHelper.OpenLink(Vm.GoogleLink));
+        await Task.Run(() => ProcessHelper.OpenLink(Vm.Exif.GoogleLink));
     }
     }
     
     
     public static async Task OpenBingMaps()
     public static async Task OpenBingMaps()
@@ -770,12 +770,12 @@ public static class FunctionsMapper
         {
         {
             return;
             return;
         }
         }
-        if (string.IsNullOrEmpty(Vm.BingLink))
+        if (string.IsNullOrEmpty(Vm.Exif.BingLink))
         {
         {
             return;
             return;
         }
         }
 
 
-        await Task.Run(() => ProcessHelper.OpenLink(Vm.BingLink));
+        await Task.Run(() => ProcessHelper.OpenLink(Vm.Exif.BingLink));
     }
     }
 
 
     #endregion
     #endregion
@@ -786,25 +786,25 @@ public static class FunctionsMapper
         await SetAsWallpaperFilled();
         await SetAsWallpaperFilled();
 
 
     public static async Task SetAsWallpaperTiled() =>
     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() =>
     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() =>
     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() =>
     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() =>
     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() =>
     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() =>
     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
     #endregion
 
 
@@ -819,11 +819,11 @@ public static class FunctionsMapper
         // TODO: Needs refactoring into its own method
         // TODO: Needs refactoring into its own method
         var openFile = string.Empty;
         var openFile = string.Empty;
         var getFromArgs = false;
         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
             else
             {
             {

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

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

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

@@ -37,7 +37,7 @@ public static class TitleManager
             }
             }
 
 
             var singleImageWindowTitles =
             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.WindowTitle = singleImageWindowTitles.BaseTitle;
             vm.Title = singleImageWindowTitles.TitleWithAppName;
             vm.Title = singleImageWindowTitles.TitleWithAppName;
             vm.TitleTooltip = singleImageWindowTitles.TitleWithAppName;
             vm.TitleTooltip = singleImageWindowTitles.TitleWithAppName;
@@ -46,8 +46,8 @@ public static class TitleManager
 
 
         if (NavigationManager.TiffNavigationInfo is not null)
         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;
             return;
         }
         }
 
 
@@ -55,9 +55,9 @@ public static class TitleManager
         {
         {
             var imageModel1 = new ImageModel
             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;
             var nextFileName = NavigationManager.GetNextFileName;
             using var magickImage = new MagickImage();
             using var magickImage = new MagickImage();
@@ -72,9 +72,9 @@ public static class TitleManager
             return;
             return;
         }
         }
 
 
-        var windowTitles = ImageTitleFormatter.GenerateTitleStrings(vm.PixelWidth, vm.PixelHeight,
+        var windowTitles = ImageTitleFormatter.GenerateTitleStrings(vm.PicViewer.PixelWidth, vm.PicViewer.PixelHeight,
             NavigationManager.GetCurrentIndex,
             NavigationManager.GetCurrentIndex,
-            vm.FileInfo, vm.ZoomValue, NavigationManager.GetCollection);
+            vm.PicViewer.FileInfo, vm.ZoomValue, NavigationManager.GetCollection);
         vm.WindowTitle = windowTitles.TitleWithAppName;
         vm.WindowTitle = windowTitles.TitleWithAppName;
         vm.Title = windowTitles.BaseTitle;
         vm.Title = windowTitles.BaseTitle;
         vm.TitleTooltip = windowTitles.FilePathTitle;
         vm.TitleTooltip = windowTitles.FilePathTitle;
@@ -102,16 +102,16 @@ public static class TitleManager
     {
     {
         if (!ValidateImageModel(imageModel, vm))
         if (!ValidateImageModel(imageModel, vm))
         {
         {
-            if (vm.FileInfo is null)
+            if (vm.PicViewer.FileInfo is null)
             {
             {
                 ReturnError(vm);
                 ReturnError(vm);
                 return;
                 return;
             }
             }
             imageModel = new ImageModel
             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?
         // Fix image models, which can be null caused by race conditions?
         if (!ValidateImageModel(imageModel1, vm))
         if (!ValidateImageModel(imageModel1, vm))
         {
         {
-            if (vm.FileInfo is null)
+            if (vm.PicViewer.FileInfo is null)
             {
             {
                 return;
                 return;
             }
             }
             imageModel1 = new ImageModel
             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))
         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;
 namespace PicView.Avalonia.ViewModels;
 
 
-public class ImageCropperViewModel : ViewModelBase
+public class ImageCropperViewModel : ReactiveObject
 {
 {
     public ImageCropperViewModel(Bitmap bitmap)
     public ImageCropperViewModel(Bitmap bitmap)
     {
     {
         Bitmap = bitmap;
         Bitmap = bitmap;
         InitializeCommands();
         InitializeCommands();
-        InitializeTranslations();
     }
     }
 
 
     private void InitializeCommands()
     private void InitializeCommands()
@@ -28,15 +27,6 @@ public class ImageCropperViewModel : ViewModelBase
         CopyCropImageCommand = ReactiveCommand.CreateFromTask(CopyCroppedImageAsync);
         CopyCropImageCommand = ReactiveCommand.CreateFromTask(CopyCroppedImageAsync);
         CloseCropCommand = ReactiveCommand.Create(HandleCloseCrop);
         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>? CropImageCommand { get; private set; }
     public ReactiveCommand<Unit, Unit>? CopyCropImageCommand { get; private set; }
     public ReactiveCommand<Unit, Unit>? CopyCropImageCommand { get; private set; }
@@ -136,7 +126,7 @@ public class ImageCropperViewModel : ViewModelBase
         
         
         CropFunctions.CloseCropControl(vm);
         CropFunctions.CloseCropControl(vm);
 
 
-        if (vm.FileInfo.FullName == saveFileDialog)
+        if (vm.PicViewer.FileInfo.FullName == saveFileDialog)
         {
         {
             await ErrorHandling.ReloadAsync(vm);
             await ErrorHandling.ReloadAsync(vm);
         }
         }
@@ -145,7 +135,7 @@ public class ImageCropperViewModel : ViewModelBase
     private async Task CopyCroppedImageAsync()
     private async Task CopyCroppedImageAsync()
     {
     {
         if (UIHelper.GetMainView.DataContext is not MainViewModel vm) return;
         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 x = Convert.ToInt32(SelectionX / AspectRatio);
         var y = Convert.ToInt32(SelectionY / 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)
     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()
     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.Converters;
 using PicView.Avalonia.FileSystem;
 using PicView.Avalonia.FileSystem;
 using PicView.Avalonia.Gallery;
 using PicView.Avalonia.Gallery;
-using PicView.Avalonia.ImageEffects;
-using PicView.Avalonia.ImageHandling;
 using PicView.Avalonia.ImageTransformations;
 using PicView.Avalonia.ImageTransformations;
 using PicView.Avalonia.Interfaces;
 using PicView.Avalonia.Interfaces;
 using PicView.Avalonia.LockScreen;
 using PicView.Avalonia.LockScreen;
+using PicView.Avalonia.Navigation;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.UI;
 using PicView.Avalonia.Wallpaper;
 using PicView.Avalonia.Wallpaper;
 using PicView.Avalonia.WindowBehavior;
 using PicView.Avalonia.WindowBehavior;
@@ -26,9 +25,16 @@ using ImageViewer = PicView.Avalonia.Views.ImageViewer;
 
 
 namespace PicView.Avalonia.ViewModels;
 namespace PicView.Avalonia.ViewModels;
 
 
-public class MainViewModel : ViewModelBase
+public class MainViewModel : ReactiveObject
 {
 {
     public readonly IPlatformSpecificService? PlatformService;
     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)
     public MainViewModel(IPlatformSpecificService? platformSpecificService)
     {
     {
@@ -285,82 +291,6 @@ public class MainViewModel : ViewModelBase
         // Only use for unit test
         // 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
     #region Gallery
 
 
     public Thickness GalleryMargin
     public Thickness GalleryMargin
@@ -427,19 +357,19 @@ public class MainViewModel : ViewModelBase
     {
     {
         get
         get
         {
         {
-            if (!SettingsManager.Settings.Gallery.IsBottomGalleryShown)
+            if (!Settings.Gallery.IsBottomGalleryShown)
             {
             {
                 return 0;
                 return 0;
             }
             }
 
 
-            if (SettingsManager.Settings.WindowProperties.Fullscreen)
+            if (Settings.WindowProperties.Fullscreen)
             {
             {
-                return SettingsManager.Settings.Gallery.IsBottomGalleryShown
+                return Settings.Gallery.IsBottomGalleryShown
                     ? GetBottomGalleryItemHeight + SizeDefaults.ScrollbarSize
                     ? GetBottomGalleryItemHeight + SizeDefaults.ScrollbarSize
                     : 0;
                     : 0;
             }
             }
 
 
-            if (!SettingsManager.Settings.Gallery.ShowBottomGalleryInHiddenUI && !IsUIShown)
+            if (!Settings.Gallery.ShowBottomGalleryInHiddenUI && !IsUIShown)
             {
             {
                 return 0;
                 return 0;
             }
             }
@@ -739,6 +669,22 @@ public class MainViewModel : ViewModelBase
     #endregion Commands
     #endregion Commands
 
 
     #region Fields
     #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
     #region Booleans
 
 
@@ -759,7 +705,7 @@ public class MainViewModel : ViewModelBase
         get;
         get;
         set
         set
         {
         {
-            SettingsManager.Settings.Zoom.AvoidZoomingOut = value;
+            Settings.Zoom.AvoidZoomingOut = value;
             this.RaiseAndSetIfChanged(ref field, value);
             this.RaiseAndSetIfChanged(ref field, value);
         }
         }
     }
     }
@@ -858,7 +804,7 @@ public class MainViewModel : ViewModelBase
         set
         set
         {
         {
             this.RaiseAndSetIfChanged(ref field, value);
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.ImageScaling.StretchImage = value;
+            Settings.ImageScaling.StretchImage = value;
             WindowResizing.SetSize(this);
             WindowResizing.SetSize(this);
         }
         }
     }
     }
@@ -881,7 +827,7 @@ public class MainViewModel : ViewModelBase
         set
         set
         {
         {
             this.RaiseAndSetIfChanged(ref field, value);
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.WindowProperties.KeepCentered = value;
+            Settings.WindowProperties.KeepCentered = value;
         }
         }
     }
     }
 
 
@@ -891,7 +837,7 @@ public class MainViewModel : ViewModelBase
         set
         set
         {
         {
             this.RaiseAndSetIfChanged(ref field, value);
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.UIProperties.OpenInSameWindow = value;
+            Settings.UIProperties.OpenInSameWindow = value;
         }
         }
     }
     }
 
 
@@ -901,7 +847,7 @@ public class MainViewModel : ViewModelBase
         set
         set
         {
         {
             this.RaiseAndSetIfChanged(ref field, value);
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.UIProperties.ShowConfirmationOnEsc = value;
+            Settings.UIProperties.ShowConfirmationOnEsc = value;
         }
         }
     }
     }
 
 
@@ -917,11 +863,17 @@ public class MainViewModel : ViewModelBase
         set
         set
         {
         {
             this.RaiseAndSetIfChanged(ref field, value);
             this.RaiseAndSetIfChanged(ref field, value);
-            SettingsManager.Settings.Zoom.IsUsingTouchPad = value;
+            Settings.Zoom.IsUsingTouchPad = value;
         }
         }
     }
     }
 
 
     #endregion Booleans
     #endregion Booleans
+    
+    public Brush? ImageBackground
+    {
+        get;
+        set => this.RaiseAndSetIfChanged(ref field, value);
+    }
 
 
     public Thickness TopScreenMargin
     public Thickness TopScreenMargin
     {
     {
@@ -964,13 +916,6 @@ public class MainViewModel : ViewModelBase
         set => this.RaiseAndSetIfChanged(ref field, value);
         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
     public UserControl? CurrentView
     {
     {
         get;
         get;
@@ -998,7 +943,7 @@ public class MainViewModel : ViewModelBase
         {
         {
             var roundedValue = Math.Round(value, 2);
             var roundedValue = Math.Round(value, 2);
             this.RaiseAndSetIfChanged(ref field, roundedValue);
             this.RaiseAndSetIfChanged(ref field, roundedValue);
-            SettingsManager.Settings.UIProperties.SlideShowTimer = roundedValue;
+            Settings.UIProperties.SlideShowTimer = roundedValue;
         }
         }
     }
     }
 
 
@@ -1008,7 +953,7 @@ public class MainViewModel : ViewModelBase
         set
         set
         {
         {
             this.RaiseAndSetIfChanged(ref field, value);
             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);
             var roundedValue = Math.Round(value, 2);
             this.RaiseAndSetIfChanged(ref field, roundedValue);
             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
     #region Window Properties
 
 
     public string? Title
     public string? Title
@@ -1455,21 +1066,7 @@ public class MainViewModel : ViewModelBase
 
 
     #region Methods
     #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) =>
     private async Task ResizeImageByPercentage(int percentage) =>
         await ConversionHelper.ResizeImageByPercentage(percentage, this).ConfigureAwait(false);
         await ConversionHelper.ResizeImageByPercentage(percentage, this).ConfigureAwait(false);
@@ -1534,7 +1131,9 @@ public class MainViewModel : ViewModelBase
     private void SetGalleryItemStretch(string value) => GalleryHelper.SetGalleryItemStretch(value, this);
     private void SetGalleryItemStretch(string value) => GalleryHelper.SetGalleryItemStretch(value, this);
 
 
     public async Task StartSlideShowTask(int milliseconds) =>
     public async Task StartSlideShowTask(int milliseconds) =>
-        await Avalonia.Navigation.Slideshow.StartSlideshow(this, milliseconds);
+        await Slideshow.StartSlideshow(this, milliseconds);
+    
+    #endregion
 
 
     #endregion Methods
     #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.Extensions;
-using PicView.Core.ImageDecoding;
 using PicView.Core.Localization;
 using PicView.Core.Localization;
 using ReactiveUI;
 using ReactiveUI;
 
 
 namespace PicView.Avalonia.ViewModels;
 namespace PicView.Avalonia.ViewModels;
 
 
-public class ViewModelBase : ReactiveObject
+public class TranslationViewModel : ReactiveObject
 {
 {
-    #region Localization
-
     public void UpdateLanguage()
     public void UpdateLanguage()
     {
     {
         File = TranslationManager.Translation.File;
         File = TranslationManager.Translation.File;
         SelectFile = TranslationManager.Translation.OpenFileDialog;
         SelectFile = TranslationManager.Translation.OpenFileDialog;
         OpenLastFile = TranslationManager.Translation.OpenLastFile;
         OpenLastFile = TranslationManager.Translation.OpenLastFile;
-        FilePaste = TranslationManager.Translation.FilePaste;
+        Paste = TranslationManager.Translation.FilePaste;
         Copy = TranslationManager.Translation.Copy;
         Copy = TranslationManager.Translation.Copy;
         Reload = TranslationManager.Translation.Reload;
         Reload = TranslationManager.Translation.Reload;
         Print = TranslationManager.Translation.Print;
         Print = TranslationManager.Translation.Print;
@@ -98,7 +95,7 @@ public class ViewModelBase : ReactiveObject
         CompressedBitsPixel = TranslationManager.Translation.CompressedBitsPixel;
         CompressedBitsPixel = TranslationManager.Translation.CompressedBitsPixel;
         Compression = TranslationManager.Translation.Compression;
         Compression = TranslationManager.Translation.Compression;
         ExposureTime = TranslationManager.Translation.ExposureTime;
         ExposureTime = TranslationManager.Translation.ExposureTime;
-        XPTitle = TranslationManager.Translation.Title;
+        Title = TranslationManager.Translation.Title;
         Subject = TranslationManager.Translation.Subject;
         Subject = TranslationManager.Translation.Subject;
         Software = TranslationManager.Translation.Software;
         Software = TranslationManager.Translation.Software;
         CameraMaker = TranslationManager.Translation.CameraMaker;
         CameraMaker = TranslationManager.Translation.CameraMaker;
@@ -135,7 +132,7 @@ public class ViewModelBase : ReactiveObject
         RecentFiles = TranslationManager.Translation.RecentFiles;
         RecentFiles = TranslationManager.Translation.RecentFiles;
         SetAsWallpaper = TranslationManager.Translation.SetAsWallpaper;
         SetAsWallpaper = TranslationManager.Translation.SetAsWallpaper;
         SetAsLockScreenImage = TranslationManager.Translation.SetAsLockScreenImage;
         SetAsLockScreenImage = TranslationManager.Translation.SetAsLockScreenImage;
-        ImageTxt = TranslationManager.Translation.Image;
+        Image = TranslationManager.Translation.Image;
         CopyImage = TranslationManager.Translation.CopyImage;
         CopyImage = TranslationManager.Translation.CopyImage;
         FileCopyPath = TranslationManager.Translation.FileCopyPath;
         FileCopyPath = TranslationManager.Translation.FileCopyPath;
         FileCut = TranslationManager.Translation.Cut;
         FileCut = TranslationManager.Translation.Cut;
@@ -184,7 +181,7 @@ public class ViewModelBase : ReactiveObject
         InterfaceConfiguration = TranslationManager.Translation.InterfaceConfiguration;
         InterfaceConfiguration = TranslationManager.Translation.InterfaceConfiguration;
         FileManagement = TranslationManager.Translation.FileManagement;
         FileManagement = TranslationManager.Translation.FileManagement;
         ToggleFullscreen = TranslationManager.Translation.ToggleFullscreen;
         ToggleFullscreen = TranslationManager.Translation.ToggleFullscreen;
-        FullscreenTxt = TranslationManager.Translation.Fullscreen;
+        Fullscreen = TranslationManager.Translation.Fullscreen;
         ShowImageGallery = TranslationManager.Translation.ShowImageGallery;
         ShowImageGallery = TranslationManager.Translation.ShowImageGallery;
         WindowManagement = TranslationManager.Translation.WindowManagement;
         WindowManagement = TranslationManager.Translation.WindowManagement;
         CenterWindow = TranslationManager.Translation.CenterWindow;
         CenterWindow = TranslationManager.Translation.CenterWindow;
@@ -270,7 +267,7 @@ public class ViewModelBase : ReactiveObject
         Maximize = TranslationManager.Translation.Maximize;
         Maximize = TranslationManager.Translation.Maximize;
     }
     }
 
 
-    #region Strings
+    #region Static Translation Strings
     
     
     public string? Maximize
     public string? Maximize
     {
     {
@@ -548,7 +545,7 @@ public class ViewModelBase : ReactiveObject
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
     }
 
 
-    public string? FullscreenTxt
+    public string? Fullscreen
     {
     {
         get;
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
@@ -1070,7 +1067,7 @@ public class ViewModelBase : ReactiveObject
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
     }
 
 
-    public string? ImageTxt
+    public string? Image
     {
     {
         get;
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
@@ -1286,7 +1283,7 @@ public class ViewModelBase : ReactiveObject
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
     }
 
 
-    public string? XPTitle
+    public string? Title
     {
     {
         get;
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
@@ -1388,7 +1385,7 @@ public class ViewModelBase : ReactiveObject
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
     }
 
 
-    public string? FilePaste
+    public string? Paste
     {
     {
         get;
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
@@ -1826,47 +1823,63 @@ public class ViewModelBase : ReactiveObject
         set => this.RaiseAndSetIfChanged(ref field, value);
         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;
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
     }
-
-    public int PixelWidth
+    
+    public string? IsShowingUI
     {
     {
         get;
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
     }
-
-    public int PixelHeight
+    
+    public string? IsScrolling
     {
     {
         get;
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
     }
-
-    public double DpiX
+    
+    public string? IsCtrlToZoom
     {
     {
         get;
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
     }
-
-    public double DpiY
+    
+    public string? IsLooping
     {
     {
         get;
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
         set => this.RaiseAndSetIfChanged(ref field, value);
     }
     }
-
-    public EXIFHelper.EXIFOrientation? ExifOrientation
+    
+    public string? IsShowingBottomGallery
     {
     {
         get;
         get;
         set => this.RaiseAndSetIfChanged(ref field, value);
         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
                     <TextBlock
                         Classes="txt"
                         Classes="txt"
                         Foreground="{StaticResource SecondaryTextColor}"
                         Foreground="{StaticResource SecondaryTextColor}"
-                        Text="{CompiledBinding GithubRepo}" />
+                        Text="{CompiledBinding Translation.GithubRepo}" />
                     <Path
                     <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"
                         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}"
                         Fill="{StaticResource SecondaryTextColor}"
@@ -164,7 +164,7 @@
                 HorizontalAlignment="Center"
                 HorizontalAlignment="Center"
                 Margin="0,2,0,2"
                 Margin="0,2,0,2"
                 NavigateUri="https://github.com/Ruben2776/PicView?tab=License-1-ov-file#readme"
                 NavigateUri="https://github.com/Ruben2776/PicView?tab=License-1-ov-file#readme"
-                ToolTip.Tip="{CompiledBinding ViewLicenseFile}">
+                ToolTip.Tip="{CompiledBinding Translation.ViewLicenseFile}">
                 <TextBlock
                 <TextBlock
                     Classes="txt"
                     Classes="txt"
                     Foreground="{StaticResource SecondaryTextColor}"
                     Foreground="{StaticResource SecondaryTextColor}"
@@ -176,7 +176,7 @@
                 Foreground="{StaticResource SecondaryTextColor}"
                 Foreground="{StaticResource SecondaryTextColor}"
                 HorizontalAlignment="Center"
                 HorizontalAlignment="Center"
                 Margin="0,25,0,10">
                 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" />
                 <Run Text="" x:Name="AppVersion" />
             </TextBlock>
             </TextBlock>
 
 
@@ -185,7 +185,7 @@
                 HorizontalAlignment="Center"
                 HorizontalAlignment="Center"
                 Margin="0,10,0,15"
                 Margin="0,10,0,15"
                 x:Name="UpdateButton">
                 x:Name="UpdateButton">
-                <TextBlock Classes="txt" Text="{CompiledBinding CheckForUpdates}" />
+                <TextBlock Classes="txt" Text="{CompiledBinding Translation.CheckForUpdates}" />
             </Button>
             </Button>
 
 
             <HyperlinkButton
             <HyperlinkButton
@@ -203,7 +203,7 @@
                 Foreground="{StaticResource SecondaryTextColor}"
                 Foreground="{StaticResource SecondaryTextColor}"
                 HorizontalAlignment="Center"
                 HorizontalAlignment="Center"
                 Margin="0,5,0,5"
                 Margin="0,5,0,5"
-                Text="{CompiledBinding Credits}" />
+                Text="{CompiledBinding Translation.Credits}" />
 
 
             <HyperlinkButton
             <HyperlinkButton
                 HorizontalAlignment="Center"
                 HorizontalAlignment="Center"

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

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

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

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

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

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

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

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

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

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

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

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

File diff suppressed because it is too large
+ 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);
             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);
                 ExifHandling.UpdateExifValues(vm);
             });
             });
             ResetButton.Click += (_, _) =>
             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);
                 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 (_, _) =>
             SaveButton.Click += async (_, _) =>
@@ -75,20 +75,20 @@ public partial class ExifView : UserControl
                 var ext = GetExtension();
                 var ext = GetExtension();
                 var location = FullPathTextBox.Text; // TODO check if this is a valid path
                 var location = FullPathTextBox.Text; // TODO check if this is a valid path
                                                      // and sync with file name/directory text boxes
                                                      // 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 (_, _) =>
             SaveAsButton.Click += async (_, _) =>
             {
             {
-                var fileInfoFullName = vm.FileInfo.FullName;
+                var fileInfoFullName = vm.PicViewer.FileInfo.FullName;
                 var ext = DetermineFileExtension(vm, ref fileInfoFullName);
                 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)
                 if (file is null)
                 {
                 {
                     return;
                     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;
             return;
         }
         }
-        var aspectRatio = (double)vm.PixelWidth / vm.PixelHeight;
+        var aspectRatio = (double)vm.PicViewer.PixelWidth / vm.PicViewer.PixelHeight;
         AspectRatioHelper.SetAspectRatioForTextBox(PixelWidthTextBox, PixelHeightTextBox, sender == PixelWidthTextBox,
         AspectRatioHelper.SetAspectRatioForTextBox(PixelWidthTextBox, PixelHeightTextBox, sender == PixelWidthTextBox,
             aspectRatio, DataContext as MainViewModel);
             aspectRatio, DataContext as MainViewModel);
         
         
@@ -138,13 +138,13 @@ public partial class ExifView : UserControl
         {
         {
             return;
             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;
         PrintSizeInchTextBox.Text = printSizes.PrintSizeInch;
         PrintSizeCmTextBox.Text = printSizes.PrintSizeCm;
         PrintSizeCmTextBox.Text = printSizes.PrintSizeCm;
         SizeMpTextBox.Text = printSizes.SizeMp;
         SizeMpTextBox.Text = printSizes.SizeMp;
 
 
         var gcd = ImageTitleFormatter.GCD(width, height);
         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)
     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)
             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)
                 if (success)
                 {
                 {
                     await NavigationManager.QuickReload().ConfigureAwait(false);
                     await NavigationManager.QuickReload().ConfigureAwait(false);
@@ -172,7 +172,7 @@ public partial class ExifView : UserControl
             }
             }
             if (heightValue > 0)
             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)
                 if (success)
                 {
                 {
                     await NavigationManager.QuickReload().ConfigureAwait(false);
                     await NavigationManager.QuickReload().ConfigureAwait(false);
@@ -196,7 +196,7 @@ public partial class ExifView : UserControl
     
     
     private string DetermineFileExtension(MainViewModel vm, ref string destination)
     private string DetermineFileExtension(MainViewModel vm, ref string destination)
     {
     {
-        var ext = vm.FileInfo.Extension;
+        var ext = vm.PicViewer.FileInfo.Extension;
         if (NoConversion.IsSelected)
         if (NoConversion.IsSelected)
         {
         {
             return ext;
             return ext;

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

@@ -20,7 +20,7 @@
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             FontSize="14"
             FontSize="14"
             Margin="0,20,0,20"
             Margin="0,20,0,20"
-            Text="{CompiledBinding GallerySettings,
+            Text="{CompiledBinding Translation.GallerySettings,
                                    Mode=OneWay}" />
                                    Mode=OneWay}" />
 
 
         <ToggleButton
         <ToggleButton
@@ -30,7 +30,7 @@
             Command="{CompiledBinding ToggleBottomGalleryCommand}"
             Command="{CompiledBinding ToggleBottomGalleryCommand}"
             IsChecked="{CompiledBinding IsBottomGalleryShown}"
             IsChecked="{CompiledBinding IsBottomGalleryShown}"
             Margin="0,0,0,10"
             Margin="0,0,0,10"
-            ToolTip.Tip="{CompiledBinding ShowBottomGallery,
+            ToolTip.Tip="{CompiledBinding Translation.ShowBottomGallery,
                                           Mode=OneWay}"
                                           Mode=OneWay}"
             Width="300"
             Width="300"
             x:Name="ToggleBottomGalleryButton">
             x:Name="ToggleBottomGalleryButton">
@@ -39,7 +39,7 @@
                 Margin="0"
                 Margin="0"
                 MaxWidth="240"
                 MaxWidth="240"
                 Padding="0,1,5,0"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding ShowBottomGallery,
+                Text="{CompiledBinding Translation.ShowBottomGallery,
                                        Mode=OneWay}" />
                                        Mode=OneWay}" />
         </ToggleButton>
         </ToggleButton>
 
 
@@ -57,7 +57,7 @@
                 Margin="0"
                 Margin="0"
                 MaxWidth="240"
                 MaxWidth="240"
                 Padding="0,1,5,0"
                 Padding="0,1,5,0"
-                Text="{CompiledBinding ShowBottomGalleryWhenUiIsHidden}" />
+                Text="{CompiledBinding Translation.ShowBottomGalleryWhenUiIsHidden}" />
         </ToggleButton>
         </ToggleButton>
 
 
         <TextBlock
         <TextBlock
@@ -65,7 +65,7 @@
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
             Margin="0,10,0,10"
             Margin="0,10,0,10"
             MaxWidth="300"
             MaxWidth="300"
-            Text="{CompiledBinding ExpandedGalleryItemSize,
+            Text="{CompiledBinding Translation.ExpandedGalleryItemSize,
                                    Mode=OneWay}" />
                                    Mode=OneWay}" />
         <uc:FullGalleryItemSizeSlider />
         <uc:FullGalleryItemSizeSlider />
         <TextBlock
         <TextBlock
@@ -82,7 +82,7 @@
             FontSize="12"
             FontSize="12"
             Margin="0,10,0,10"
             Margin="0,10,0,10"
             MaxWidth="300"
             MaxWidth="300"
-            Text="{CompiledBinding BottomGalleryItemSize,
+            Text="{CompiledBinding Translation.BottomGalleryItemSize,
                                    Mode=OneWay}" />
                                    Mode=OneWay}" />
         <uc:BottomGalleryItemSizeSlider />
         <uc:BottomGalleryItemSizeSlider />
         <TextBlock
         <TextBlock
@@ -99,7 +99,7 @@
             FontSize="12"
             FontSize="12"
             Margin="0,10,0,15"
             Margin="0,10,0,15"
             MaxWidth="300"
             MaxWidth="300"
-            Text="{CompiledBinding GalleryThumbnailStretch,
+            Text="{CompiledBinding Translation.GalleryThumbnailStretch,
                                    Mode=OneWay}" />
                                    Mode=OneWay}" />
         <ComboBox
         <ComboBox
             Background="{DynamicResource SecondaryBackgroundColor}"
             Background="{DynamicResource SecondaryBackgroundColor}"
@@ -110,12 +110,12 @@
             Padding="5,7,0,7"
             Padding="5,7,0,7"
             Width="300"
             Width="300"
             x:Name="FullGalleryComboBox">
             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>
         </ComboBox>
 
 
         <TextBlock
         <TextBlock
@@ -124,7 +124,7 @@
             FontSize="12"
             FontSize="12"
             Margin="0,3,0,15"
             Margin="0,3,0,15"
             MaxWidth="300"
             MaxWidth="300"
-            Text="{CompiledBinding BottomGalleryThumbnailStretch}" />
+            Text="{CompiledBinding Translation.BottomGalleryThumbnailStretch}" />
         <ComboBox
         <ComboBox
             Background="{DynamicResource SecondaryBackgroundColor}"
             Background="{DynamicResource SecondaryBackgroundColor}"
             BorderBrush="{DynamicResource MainBorderColor}"
             BorderBrush="{DynamicResource MainBorderColor}"
@@ -134,12 +134,12 @@
             Padding="5,7,0,7"
             Padding="5,7,0,7"
             Width="300"
             Width="300"
             x:Name="BottomGalleryComboBox">
             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>
         </ComboBox>
     </StackPanel>
     </StackPanel>
 </UserControl>
 </UserControl>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -24,7 +24,7 @@
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontSize="14"
                             FontSize="14"
                             Margin="4,0,0,5"
                             Margin="4,0,0,5"
-                            Text="{CompiledBinding Width,
+                            Text="{CompiledBinding Translation.Width,
                                                    Mode=OneWay}" />
                                                    Mode=OneWay}" />
                         <customControls:NumTextBox
                         <customControls:NumTextBox
                             Background="{DynamicResource SecondaryBackgroundColor}"
                             Background="{DynamicResource SecondaryBackgroundColor}"
@@ -33,9 +33,9 @@
                             Foreground="{StaticResource SecondaryTextColor}"
                             Foreground="{StaticResource SecondaryTextColor}"
                             Height="35"
                             Height="35"
                             Margin="0"
                             Margin="0"
-                            Text="{CompiledBinding PixelWidth,
+                            Text="{CompiledBinding PicViewer.PixelWidth,
                                                    Mode=OneWay}"
                                                    Mode=OneWay}"
-                            ToolTip.Tip="{CompiledBinding SizeTooltip,
+                            ToolTip.Tip="{CompiledBinding Translation.SizeTooltip,
                                                           Mode=OneWay}"
                                                           Mode=OneWay}"
                             Width="195"
                             Width="195"
                             x:Name="PixelWidthTextBox" />
                             x:Name="PixelWidthTextBox" />
@@ -71,7 +71,7 @@
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontSize="14"
                             FontSize="14"
                             Margin="4,0,0,5"
                             Margin="4,0,0,5"
-                            Text="{CompiledBinding Height,
+                            Text="{CompiledBinding Translation.Height,
                                                    Mode=OneWay}" />
                                                    Mode=OneWay}" />
                         <customControls:NumTextBox
                         <customControls:NumTextBox
                             Background="{DynamicResource SecondaryBackgroundColor}"
                             Background="{DynamicResource SecondaryBackgroundColor}"
@@ -80,9 +80,9 @@
                             Foreground="{StaticResource SecondaryTextColor}"
                             Foreground="{StaticResource SecondaryTextColor}"
                             Height="35"
                             Height="35"
                             Margin="0"
                             Margin="0"
-                            Text="{CompiledBinding PixelHeight,
+                            Text="{CompiledBinding PicViewer.PixelHeight,
                                                    Mode=OneWay}"
                                                    Mode=OneWay}"
-                            ToolTip.Tip="{CompiledBinding SizeTooltip,
+                            ToolTip.Tip="{CompiledBinding Translation.SizeTooltip,
                                                           Mode=OneWay}"
                                                           Mode=OneWay}"
                             Width="195"
                             Width="195"
                             x:Name="PixelHeightTextBox" />
                             x:Name="PixelHeightTextBox" />
@@ -96,7 +96,7 @@
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontSize="14"
                             FontSize="14"
                             Margin="5,0,0,2"
                             Margin="5,0,0,2"
-                            Text="{CompiledBinding Quality,
+                            Text="{CompiledBinding Translation.Quality,
                                                    Mode=OneWay}" />
                                                    Mode=OneWay}" />
                         <customControls:CustomSlider
                         <customControls:CustomSlider
                             IsSnapToTickEnabled="True"
                             IsSnapToTickEnabled="True"
@@ -118,7 +118,7 @@
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontFamily="/Assets/Fonts/Roboto-Medium.ttf#Roboto"
                             FontSize="14"
                             FontSize="14"
                             Margin="5,0,0,5"
                             Margin="5,0,0,5"
-                            Text="{CompiledBinding ConvertTo,
+                            Text="{CompiledBinding Translation.ConvertTo,
                                                    Mode=OneWay}" />
                                                    Mode=OneWay}" />
                         <ComboBox
                         <ComboBox
                             Background="{DynamicResource SecondaryBackgroundColor}"
                             Background="{DynamicResource SecondaryBackgroundColor}"
@@ -133,7 +133,7 @@
                             SelectedIndex="0"
                             SelectedIndex="0"
                             Width="195"
                             Width="195"
                             x:Name="ConversionComboBox">
                             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=".png" x:Name="PngItem" />
                             <ComboBoxItem Content=".jpg" x:Name="JpgItem" />
                             <ComboBoxItem Content=".jpg" x:Name="JpgItem" />
                             <ComboBoxItem Content=".webp" x:Name="WebpItem" />
                             <ComboBoxItem Content=".webp" x:Name="WebpItem" />
@@ -157,7 +157,7 @@
                     x:Name="ResetButton">
                     x:Name="ResetButton">
                     <TextBlock
                     <TextBlock
                         Classes="txt"
                         Classes="txt"
-                        Text="{CompiledBinding Reset,
+                        Text="{CompiledBinding Translation.Reset,
                                                Mode=OneWay}"
                                                Mode=OneWay}"
                         TextAlignment="Center" />
                         TextAlignment="Center" />
                 </Button>
                 </Button>
@@ -170,7 +170,7 @@
                     x:Name="SaveButton">
                     x:Name="SaveButton">
                     <TextBlock
                     <TextBlock
                         Classes="txt"
                         Classes="txt"
-                        Text="{CompiledBinding Save,
+                        Text="{CompiledBinding Translation.Save,
                                                Mode=OneWay}"
                                                Mode=OneWay}"
                         TextAlignment="Center" />
                         TextAlignment="Center" />
                     <SplitButton.Flyout>
                     <SplitButton.Flyout>
@@ -182,7 +182,7 @@
                                 <TextBlock
                                 <TextBlock
                                     Classes="txt"
                                     Classes="txt"
                                     Foreground="{DynamicResource MainTextColor}"
                                     Foreground="{DynamicResource MainTextColor}"
-                                    Text="{CompiledBinding SaveAs,
+                                    Text="{CompiledBinding Translation.SaveAs,
                                                            Mode=OneWay}"
                                                            Mode=OneWay}"
                                     TextAlignment="Center" />
                                     TextAlignment="Center" />
                             </Button>
                             </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;
         if (DataContext is not MainViewModel vm) return;
 
 
-        _aspectRatio = (double)vm.PixelWidth / vm.PixelHeight;
+        _aspectRatio = (double)vm.PicViewer.PixelWidth / vm.PicViewer.PixelHeight;
         InitializeEventHandlers(vm);
         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);
             Dispatcher.UIThread.Invoke(SetIsQualitySliderEnabled);
         });
         });
@@ -84,12 +84,12 @@ public partial class SingleImageResizeView : UserControl
                 QualitySlider.IsEnabled = true;
                 QualitySlider.IsEnabled = true;
                 QualitySlider.Value = 75;
                 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;
                 QualitySlider.IsEnabled = true;
-                var quality = ImageAnalyzer.GetCompressionQuality(vm.FileInfo.FullName);
+                var quality = ImageAnalyzer.GetCompressionQuality(vm.PicViewer.FileInfo.FullName);
                 QualitySlider.Value = quality;
                 QualitySlider.Value = quality;
             }
             }
             else
             else
@@ -121,10 +121,10 @@ public partial class SingleImageResizeView : UserControl
             return;
             return;
         }
         }
 
 
-        var fileInfoFullName = vm.FileInfo.FullName;
+        var fileInfoFullName = vm.PicViewer.FileInfo.FullName;
         var ext = DetermineFileExtension(vm, ref fileInfoFullName);
         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)
         if (file is null)
         {
         {
             return;
             return;
@@ -134,7 +134,7 @@ public partial class SingleImageResizeView : UserControl
 
 
     private async Task SaveImage(MainViewModel vm)
     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)
     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
         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);
         var ext = DetermineFileExtension(vm, ref destination);
         destination = Path.ChangeExtension(destination, ext);
         destination = Path.ChangeExtension(destination, ext);
         var sameFile = file.Equals(destination, StringComparison.OrdinalIgnoreCase);
         var sameFile = file.Equals(destination, StringComparison.OrdinalIgnoreCase);
@@ -192,7 +192,7 @@ public partial class SingleImageResizeView : UserControl
 
 
     private string DetermineFileExtension(MainViewModel vm, ref string destination)
     private string DetermineFileExtension(MainViewModel vm, ref string destination)
     {
     {
-        var ext = vm.FileInfo.Extension;
+        var ext = vm.PicViewer.FileInfo.Extension;
         if (NoConversion.IsSelected)
         if (NoConversion.IsSelected)
         {
         {
             return ext;
             return ext;
@@ -249,14 +249,14 @@ public partial class SingleImageResizeView : UserControl
 
 
     private void ResetSettings(MainViewModel vm)
     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;
             QualitySlider.IsEnabled = true;
-            var quality = ImageAnalyzer.GetCompressionQuality(vm.FileInfo.FullName);
+            var quality = ImageAnalyzer.GetCompressionQuality(vm.PicViewer.FileInfo.FullName);
             QualitySlider.Value = quality;
             QualitySlider.Value = quality;
         }
         }
         else
         else

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

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

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

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

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

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

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

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

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

@@ -142,14 +142,14 @@ public partial class EditableTitlebar : UserControl
             return;
             return;
         }
         }
 
 
-        if (vm.FileInfo is { Exists: false })
+        if (vm.PicViewer.FileInfo is { Exists: false })
         {
         {
             return;
             return;
         }
         }
         
         
         vm.IsLoading = true;
         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))
         if (File.Exists(newPath))
         {
         {
@@ -219,13 +219,13 @@ public partial class EditableTitlebar : UserControl
             return;
             return;
         }
         }
         
         
-        if (vm.FileInfo is null)
+        if (vm.PicViewer.FileInfo is null)
         {
         {
             return;
             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 start = TextBox.Text.Length - filename.Length;
         var end = Path.GetFileNameWithoutExtension(filename).Length;
         var end = Path.GetFileNameWithoutExtension(filename).Length;
         TextBox.SelectionStart = start;
         TextBox.SelectionStart = start;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -51,7 +51,7 @@ public static class WindowFunctions
             }
             }
             else
             else
             {
             {
-                lastFile = vm?.FileInfo?.FullName ?? FileHistory.GetLastEntry();
+                lastFile = vm?.PicViewer.FileInfo?.FullName ?? FileHistory.GetLastEntry();
             }
             }
         }
         }
         else
         else
@@ -77,7 +77,7 @@ public static class WindowFunctions
         {
         {
             if (Settings.WindowProperties.AutoFit)
             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.Height = double.NaN;
                     vm.ImageViewer.MainBorder.Width = double.NaN;
                     vm.ImageViewer.MainBorder.Width = double.NaN;
@@ -110,7 +110,7 @@ public static class WindowFunctions
                 }
                 }
                 else
                 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);
                         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)
     public static void SetSize(ImageSizeCalculationHelper.ImageSize size, MainViewModel vm)
     {
     {
         vm.TitleMaxWidth = size.TitleMaxWidth;
         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.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)
         if (Settings.WindowProperties.AutoFit)
         {
         {
@@ -110,7 +110,7 @@ public static class WindowResizing
             vm.GalleryWidth = double.NaN;
             vm.GalleryWidth = double.NaN;
         }
         }
         
         
-        vm.AspectRatio = size.AspectRatio;
+        vm.PicViewer.AspectRatio = size.AspectRatio;
     }
     }
 
 
     public static ImageSizeCalculationHelper.ImageSize? GetSize(MainViewModel vm)
     public static ImageSizeCalculationHelper.ImageSize? GetSize(MainViewModel vm)
@@ -119,9 +119,9 @@ public static class WindowResizing
         var preloadValue = NavigationManager.GetCurrentPreLoadValue();
         var preloadValue = NavigationManager.GetCurrentPreLoadValue();
         if (preloadValue == null)
         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;
                     firstWidth = bitmap.PixelSize.Width;
                     firstHeight = bitmap.PixelSize.Height;
                     firstHeight = bitmap.PixelSize.Height;
@@ -131,10 +131,10 @@ public static class WindowResizing
                     return null;
                     return null;
                 }
                 }
             }
             }
-            else if (vm.FileInfo?.Exists != null)
+            else if (vm.PicViewer.FileInfo?.Exists != null)
             {
             {
                 var magickImage = new MagickImage();
                 var magickImage = new MagickImage();
-                magickImage.Ping(vm.FileInfo);
+                magickImage.Ping(vm.PicViewer.FileInfo);
                 firstWidth = magickImage.Width;
                 firstWidth = magickImage.Width;
                 firstHeight = magickImage.Height;
                 firstHeight = magickImage.Height;
             }
             }
@@ -145,8 +145,8 @@ public static class WindowResizing
         }
         }
         else
         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)
         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,
     public static ImageSizeCalculationHelper.ImageSize? GetSize(double width, double height, double secondWidth, double secondHeight, double rotation,
         MainViewModel vm)
         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)
         if (Application.Current?.ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop)
         {
         {
             return null;
             return null;

Some files were not shown because too many files changed in this diff