MainView.axaml 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156
  1. <UserControl
  2. Background="Transparent"
  3. DragDrop.AllowDrop="True"
  4. Focusable="True"
  5. d:DesignHeight="450"
  6. d:DesignWidth="800"
  7. mc:Ignorable="d"
  8. x:Class="PicView.Avalonia.Views.MainView"
  9. x:DataType="vm:MainViewModel"
  10. xmlns="https://github.com/avaloniaui"
  11. xmlns:buttons="clr-namespace:PicView.Avalonia.Views.UC.Buttons"
  12. xmlns:converters="clr-namespace:PicView.Avalonia.Converters"
  13. xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls"
  14. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  15. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  16. xmlns:uc="clr-namespace:PicView.Avalonia.Views.UC"
  17. xmlns:views="clr-namespace:PicView.Avalonia.Views"
  18. xmlns:vm="clr-namespace:PicView.Avalonia.ViewModels"
  19. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  20. <Design.DataContext>
  21. <vm:MainViewModel />
  22. </Design.DataContext>
  23. <UserControl.Resources>
  24. <converters:SortFilesByToBoolConverter x:Key="EnumToBoolConverter" />
  25. <SolidColorBrush Color="{DynamicResource MainTextColor}" x:Key="Brush0" />
  26. </UserControl.Resources>
  27. <UserControl.ContextMenu>
  28. <ContextMenu x:Name="MainContextMenu">
  29. <!-- Open -->
  30. <MenuItem
  31. Command="{CompiledBinding OpenFileCommand}"
  32. Header="{CompiledBinding Translation.Open,
  33. Mode=OneWay}"
  34. MinWidth="180">
  35. <MenuItem.Icon>
  36. <Path
  37. Data="{StaticResource AltFolderGeometry}"
  38. Fill="{StaticResource Brush0}"
  39. Height="12.14"
  40. Stretch="Fill"
  41. Width="15" />
  42. </MenuItem.Icon>
  43. </MenuItem>
  44. <!-- Save -->
  45. <MenuItem
  46. Command="{CompiledBinding SaveFileCommand}"
  47. Header="{CompiledBinding Translation.Save,
  48. Mode=OneWay}"
  49. IsEnabled="{CompiledBinding PicViewer.ImageSource,
  50. Converter={x:Static ObjectConverters.IsNotNull}}">
  51. <MenuItem.Icon>
  52. <Path
  53. Data="{StaticResource SaveGeometry}"
  54. Fill="{StaticResource Brush0}"
  55. Height="12"
  56. Stretch="Fill"
  57. Width="12" />
  58. </MenuItem.Icon>
  59. </MenuItem>
  60. <!-- Save as -->
  61. <MenuItem
  62. Command="{CompiledBinding SaveFileAsCommand}"
  63. Header="{CompiledBinding Translation.SaveAs,
  64. Mode=OneWay}"
  65. IsEnabled="{CompiledBinding PicViewer.ImageSource,
  66. Converter={x:Static ObjectConverters.IsNotNull}}">
  67. <MenuItem.Icon>
  68. <Path
  69. Data="{StaticResource SaveGeometry}"
  70. Fill="{StaticResource Brush0}"
  71. Height="12"
  72. Stretch="Fill"
  73. Width="12" />
  74. </MenuItem.Icon>
  75. </MenuItem>
  76. <!-- Print -->
  77. <MenuItem
  78. Command="{CompiledBinding PrintCommand}"
  79. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  80. FallbackValue=''}"
  81. Header="{CompiledBinding Translation.Print,
  82. Mode=OneWay}"
  83. IsEnabled="{CompiledBinding PicViewer.ImageSource,
  84. Converter={x:Static ObjectConverters.IsNotNull}}"
  85. x:Name="PrintMenuItem">
  86. <MenuItem.Icon>
  87. <Path
  88. Data="{StaticResource PrintGeometry}"
  89. Fill="{StaticResource Brush0}"
  90. Height="12"
  91. Stretch="Fill"
  92. Width="12" />
  93. </MenuItem.Icon>
  94. </MenuItem>
  95. <!-- Open with -->
  96. <MenuItem
  97. Command="{CompiledBinding OpenWithCommand}"
  98. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  99. FallbackValue=''}"
  100. Header="{CompiledBinding Translation.OpenWith,
  101. Mode=OneWay}"
  102. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  103. Converter={x:Static ObjectConverters.IsNotNull}}"
  104. x:Name="OpenWithMenuItem">
  105. <MenuItem.Icon>
  106. <Path
  107. Data="{StaticResource OpenWithGeometry}"
  108. Fill="{StaticResource Brush0}"
  109. Height="12"
  110. Stretch="Fill"
  111. Width="12" />
  112. </MenuItem.Icon>
  113. </MenuItem>
  114. <!-- Locate on disk -->
  115. <MenuItem
  116. Command="{CompiledBinding LocateOnDiskCommand}"
  117. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  118. FallbackValue=''}"
  119. Header="{CompiledBinding Translation.ShowInFolder,
  120. Mode=OneWay}"
  121. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  122. Converter={x:Static ObjectConverters.IsNotNull}}">
  123. <MenuItem.Icon>
  124. <Path
  125. Data="{StaticResource ShowInFolderGeometry}"
  126. Fill="{StaticResource Brush0}"
  127. Height="12"
  128. Stretch="Fill"
  129. Width="12" />
  130. </MenuItem.Icon>
  131. </MenuItem>
  132. <Separator />
  133. <!-- Sort files by -->
  134. <MenuItem Header="{CompiledBinding Translation.SortFilesBy, Mode=OneWay}">
  135. <MenuItem.Icon>
  136. <Path
  137. 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"
  138. Fill="{StaticResource Brush0}"
  139. Height="12"
  140. Stretch="Fill"
  141. Width="12" />
  142. </MenuItem.Icon>
  143. <!-- Sort files by name -->
  144. <MenuItem
  145. Command="{CompiledBinding SortFilesByNameCommand}"
  146. GroupName="SortType"
  147. Header="{CompiledBinding Translation.FileName,
  148. Mode=OneWay}"
  149. IsChecked="{CompiledBinding SortOrder,
  150. Converter={StaticResource EnumToBoolConverter},
  151. ConverterParameter=Name}"
  152. ToggleType="Radio" />
  153. <!-- Sort files by size -->
  154. <MenuItem
  155. Command="{CompiledBinding SortFilesBySizeCommand}"
  156. GroupName="SortType"
  157. Header="{CompiledBinding Translation.FileSize,
  158. Mode=OneWay}"
  159. IsChecked="{CompiledBinding SortOrder,
  160. Converter={StaticResource EnumToBoolConverter},
  161. ConverterParameter=FileSize}"
  162. ToggleType="Radio" />
  163. <!-- Sort files by extension -->
  164. <MenuItem
  165. Command="{CompiledBinding SortFilesByExtensionCommand}"
  166. GroupName="SortType"
  167. Header="{CompiledBinding Translation.FileExtension,
  168. Mode=OneWay}"
  169. IsChecked="{CompiledBinding SortOrder,
  170. Converter={StaticResource EnumToBoolConverter},
  171. ConverterParameter=Extension}"
  172. ToggleType="Radio" />
  173. <!-- Sort files by creation time -->
  174. <MenuItem
  175. Command="{CompiledBinding SortFilesByCreationTimeCommand}"
  176. GroupName="SortType"
  177. Header="{CompiledBinding Translation.Created,
  178. Mode=OneWay}"
  179. IsChecked="{CompiledBinding SortOrder,
  180. Converter={StaticResource EnumToBoolConverter},
  181. ConverterParameter=CreationTime}"
  182. ToggleType="Radio" />
  183. <!-- Sort files by last access time -->
  184. <MenuItem
  185. Command="{CompiledBinding SortFilesByLastAccessTimeCommand}"
  186. GroupName="SortType"
  187. Header="{CompiledBinding Translation.LastAccessTime,
  188. Mode=OneWay}"
  189. IsChecked="{CompiledBinding SortOrder,
  190. Converter={StaticResource EnumToBoolConverter},
  191. ConverterParameter=LastAccessTime}"
  192. ToggleType="Radio" />
  193. <!-- Sort files randomly -->
  194. <MenuItem
  195. Command="{CompiledBinding SortFilesRandomlyCommand}"
  196. GroupName="SortType"
  197. Header="{CompiledBinding Translation.Random,
  198. Mode=OneWay}"
  199. IsChecked="{CompiledBinding SortOrder,
  200. Converter={StaticResource EnumToBoolConverter},
  201. ConverterParameter=Random}"
  202. ToggleType="Radio" />
  203. <Separator />
  204. <!-- Sort files ascending -->
  205. <MenuItem
  206. Command="{CompiledBinding SortFilesAscendingCommand}"
  207. GroupName="SortDirection"
  208. Header="{CompiledBinding Translation.Ascending,
  209. Mode=OneWay}"
  210. IsChecked="{CompiledBinding IsAscending}"
  211. ToggleType="Radio" />
  212. <!-- Sort files descending -->
  213. <MenuItem
  214. Command="{CompiledBinding SortFilesDescendingCommand}"
  215. GroupName="SortDirection"
  216. Header="{CompiledBinding Translation.Descending,
  217. Mode=OneWay}"
  218. ToggleType="Radio" />
  219. </MenuItem>
  220. <!-- Recent files -->
  221. <MenuItem Header="{Binding Translation.RecentFiles, Mode=OneWay}">
  222. <MenuItem.Icon>
  223. <Path
  224. 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"
  225. Fill="{StaticResource Brush0}"
  226. Height="12"
  227. Stretch="Fill"
  228. Width="12" />
  229. </MenuItem.Icon>
  230. <MenuItem Theme="{StaticResource Slim}" x:Name="RecentFilesHeader">
  231. <MenuItem.Header>
  232. <DockPanel LastChildFill="False">
  233. <Button
  234. Classes="errorHover"
  235. CornerRadius="8,0,0,0"
  236. DockPanel.Dock="Left"
  237. Margin="0,0,5,0"
  238. Padding="8,4"
  239. x:Name="HistoryClearButton">
  240. <StackPanel Orientation="Horizontal">
  241. <Path
  242. Data="{StaticResource RecycleGeometry}"
  243. Fill="{StaticResource Brush0}"
  244. Height="12"
  245. Stretch="Fill"
  246. Width="12"
  247. x:Name="HistoryClearPath" />
  248. <TextBlock
  249. Classes="txt"
  250. Foreground="{DynamicResource MainTextColor}"
  251. Margin="5,0,0,0"
  252. Text="{CompiledBinding Translation.Clear}"
  253. x:Name="HistoryClearTextBlock" />
  254. </StackPanel>
  255. </Button>
  256. <Button
  257. Classes="hover"
  258. ClickMode="Release"
  259. DockPanel.Dock="Left"
  260. Margin="0,0,5,0"
  261. Padding="8,4"
  262. x:Name="HistoryFileButton">
  263. <StackPanel Orientation="Horizontal">
  264. <Path
  265. Data="{StaticResource FilePropertiesGeometry}"
  266. Fill="{StaticResource Brush0}"
  267. Height="12"
  268. Stretch="Fill"
  269. Width="12"
  270. x:Name="HistoryFileButtonPath" />
  271. <TextBlock
  272. Classes="txt"
  273. Foreground="{DynamicResource MainTextColor}"
  274. Margin="5,0,0,0"
  275. Text="{CompiledBinding Translation.OpenFileHistory}"
  276. x:Name="HistoryFileNameTextBlock" />
  277. </StackPanel>
  278. </Button>
  279. <customControls:IconButton
  280. Background="Transparent"
  281. Classes="hover"
  282. CornerRadius="0,8,0,0"
  283. DockPanel.Dock="Right"
  284. Foreground="{DynamicResource MainTextColor}"
  285. Icon="{StaticResource SortDescImage}"
  286. IconHeight="12"
  287. IconWidth="12"
  288. Margin="5,0,0,0"
  289. Padding="8,4"
  290. x:Name="HistorySortButton" />
  291. </DockPanel>
  292. </MenuItem.Header>
  293. </MenuItem>
  294. <Separator Background="{DynamicResource TertiaryBorderColor}" />
  295. <MenuItem
  296. StaysOpenOnClick="True"
  297. Theme="{StaticResource Slim}"
  298. x:Name="RecentFilesContent">
  299. <MenuItem.Header>
  300. <customControls:AutoScrollViewer MaxHeight="450" Theme="{StaticResource Inline}">
  301. <StackPanel Margin="0,0,15,0" x:Name="RecentFilesCM" />
  302. </customControls:AutoScrollViewer>
  303. </MenuItem.Header>
  304. </MenuItem>
  305. </MenuItem>
  306. <!-- Settings -->
  307. <MenuItem Header="{CompiledBinding Translation.Settings, Mode=OneWay}">
  308. <MenuItem.Icon>
  309. <Path
  310. Data="{StaticResource WrenchGeometry}"
  311. Fill="{StaticResource Brush0}"
  312. Height="12"
  313. Stretch="Fill"
  314. Width="12" />
  315. </MenuItem.Icon>
  316. <!-- Toggle Subdirectories -->
  317. <MenuItem
  318. Command="{CompiledBinding ToggleSubdirectoriesCommand}"
  319. Header="{CompiledBinding Translation.SearchSubdirectory,
  320. Mode=OneWay}"
  321. IsChecked="{Binding IsIncludingSubdirectories}"
  322. ToggleType="CheckBox" />
  323. <Separator />
  324. <!-- Toggle looping -->
  325. <MenuItem
  326. Header="{CompiledBinding Translation.IsLooping,
  327. Mode=OneWay}"
  328. IsChecked="{Binding IsLooping}"
  329. ToggleType="CheckBox" />
  330. <Separator />
  331. <!-- Toggle scrolling -->
  332. <MenuItem
  333. Header="{CompiledBinding Translation.IsScrolling,
  334. Mode=OneWay}"
  335. IsChecked="{CompiledBinding IsScrollingEnabled}"
  336. ToggleType="CheckBox" />
  337. <!-- Toggle stretching -->
  338. <MenuItem
  339. Command="{CompiledBinding StretchCommand}"
  340. Header="{CompiledBinding Translation.Stretch,
  341. Mode=OneWay}"
  342. IsChecked="{CompiledBinding IsStretched}"
  343. ToggleType="CheckBox" />
  344. <!-- Toggle side-by-side -->
  345. <MenuItem
  346. Command="{CompiledBinding ShowSideBySideCommand}"
  347. Header="{CompiledBinding Translation.SideBySide,
  348. Mode=OneWay}"
  349. IsChecked="{CompiledBinding PicViewer.IsShowingSideBySide}"
  350. ToggleType="CheckBox" />
  351. <Separator />
  352. <!-- Toggle topmost -->
  353. <MenuItem
  354. Command="{CompiledBinding ChangeTopMostCommand}"
  355. Header="{CompiledBinding Translation.StayTopMost,
  356. Mode=OneWay}"
  357. IsChecked="{CompiledBinding IsTopMost}"
  358. ToggleType="CheckBox" />
  359. <!-- Toggle auto fit -->
  360. <MenuItem
  361. Command="{CompiledBinding ChangeAutoFitCommand}"
  362. Header="{CompiledBinding Translation.AutoFitWindow,
  363. Mode=OneWay}"
  364. IsChecked="{CompiledBinding IsAutoFit}"
  365. ToggleType="CheckBox" />
  366. <Separator />
  367. <!-- Toggle ctrl zoom -->
  368. <MenuItem Command="{CompiledBinding ChangeCtrlZoomCommand}" Header="{CompiledBinding Translation.IsCtrlToZoom, Mode=OneWay}">
  369. <MenuItem.Icon>
  370. <Image
  371. Height="12"
  372. Source="{CompiledBinding ChangeCtrlZoomImage}"
  373. Width="12" />
  374. </MenuItem.Icon>
  375. </MenuItem>
  376. <Separator />
  377. <!-- Toggle UI -->
  378. <MenuItem
  379. Command="{CompiledBinding ToggleUICommand}"
  380. Header="{CompiledBinding Translation.IsShowingUI,
  381. Mode=OneWay}"
  382. IsVisible="{CompiledBinding IsUIShown,
  383. Mode=OneWay}">
  384. <MenuItem.Icon>
  385. <Image
  386. Height="12"
  387. Source="{StaticResource EyeOffImage}"
  388. Width="12" />
  389. </MenuItem.Icon>
  390. </MenuItem>
  391. <MenuItem
  392. Command="{CompiledBinding ToggleUICommand}"
  393. Header="{CompiledBinding Translation.IsShowingUI,
  394. Mode=OneWay}"
  395. IsVisible="{CompiledBinding !IsUIShown,
  396. Mode=OneWay}">
  397. <MenuItem.Icon>
  398. <Image
  399. Height="12"
  400. Source="{StaticResource EyeImage}"
  401. Width="12" />
  402. </MenuItem.Icon>
  403. </MenuItem>
  404. <!-- Change background -->
  405. <MenuItem
  406. Command="{CompiledBinding ChangeBackgroundCommand}"
  407. Header="{CompiledBinding Translation.ChangeBackground,
  408. Mode=OneWay}"
  409. StaysOpenOnClick="True">
  410. <MenuItem.Icon>
  411. <Image
  412. Height="12"
  413. Source="{StaticResource CanvasImage}"
  414. Width="12" />
  415. </MenuItem.Icon>
  416. </MenuItem>
  417. <!-- Toggle bottom gallery -->
  418. <MenuItem
  419. Command="{CompiledBinding ToggleBottomGalleryCommand}"
  420. Header="{CompiledBinding Translation.IsShowingBottomGallery,
  421. Mode=OneWay}"
  422. IsChecked="{CompiledBinding IsBottomGalleryShown}">
  423. <MenuItem.Icon>
  424. <Image Height="12" Width="12">
  425. <DrawingImage>
  426. <DrawingImage.Drawing>
  427. <DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
  428. <GeometryDrawing Brush="{StaticResource Brush0}" Geometry="F1 M512,512z M0,0z M80,132L80,460A20,20,0,0,0,100,480L492,480A20,20,0,0,0,512,460L512,132A20,20,0,0,0,492,112L100,112A20,20,0,0,0,80,132z M373.14,173.33A46,46,0,1,1,326.86,219.33A46.19,46.19,0,0,1,373.14,173.33z M111.73,449.33L111.73,353.85 234.49,243.65 328.27,337 215.27,449.33z M480,449.33L259,449.33 403.58,305.33 480,370.59z" />
  429. <GeometryDrawing Brush="{StaticResource Brush0}" Geometry="F1 M512,512z M0,0z M20,32A20,20,0,0,0,0,52L0,396A20,20,0,0,0,20,416L48,416 48,100A20,20,0,0,1,68,80L448,80 448,52A20,20,0,0,0,428,32z" />
  430. </DrawingGroup>
  431. </DrawingImage.Drawing>
  432. </DrawingImage>
  433. </Image>
  434. </MenuItem.Icon>
  435. </MenuItem>
  436. <!-- Toggle bottom bar -->
  437. <MenuItem
  438. Command="{CompiledBinding ToggleBottomNavBarCommand}"
  439. Header="{CompiledBinding Translation.ShowBottomToolbar,
  440. Mode=OneWay}"
  441. IsChecked="{CompiledBinding IsBottomToolbarShown}"
  442. IsVisible="{CompiledBinding !IsBottomToolbarShown}"
  443. ToggleType="CheckBox">
  444. <MenuItem.Icon>
  445. <Image
  446. Height="12"
  447. Source="{StaticResource Panel-Bottom}"
  448. Width="12" />
  449. </MenuItem.Icon>
  450. </MenuItem>
  451. <Separator />
  452. <!-- Show Settings window -->
  453. <MenuItem Command="{CompiledBinding ShowSettingsWindowCommand}" Header="{CompiledBinding Translation.ShowAllSettingsWindow, Mode=OneWay}">
  454. <MenuItem.Icon>
  455. <Path
  456. 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"
  457. Fill="{StaticResource Brush0}"
  458. Height="12"
  459. Stretch="Fill"
  460. Width="12" />
  461. </MenuItem.Icon>
  462. </MenuItem>
  463. </MenuItem>
  464. <Separator />
  465. <!-- Navigation -->
  466. <MenuItem Header="{CompiledBinding Translation.Navigation, Mode=OneWay}">
  467. <MenuItem.Icon>
  468. <Image
  469. Height="14"
  470. Source="{StaticResource SignPostImage}"
  471. Width="14" />
  472. </MenuItem.Icon>
  473. <!-- Next -->
  474. <MenuItem
  475. Command="{CompiledBinding NextCommand}"
  476. Header="{CompiledBinding Translation.NextImage,
  477. Mode=OneWay}"
  478. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  479. Converter={x:Static ObjectConverters.IsNotNull}}"
  480. StaysOpenOnClick="True">
  481. <MenuItem.Icon>
  482. <Image
  483. Height="12"
  484. Source="{StaticResource NextImage}"
  485. Width="12" />
  486. </MenuItem.Icon>
  487. </MenuItem>
  488. <!-- Prev -->
  489. <MenuItem
  490. Command="{CompiledBinding PreviousCommand}"
  491. Header="{CompiledBinding Translation.PrevImage,
  492. Mode=OneWay}"
  493. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  494. Converter={x:Static ObjectConverters.IsNotNull}}"
  495. StaysOpenOnClick="True">
  496. <MenuItem.Icon>
  497. <Image
  498. Height="12"
  499. Source="{StaticResource PrevImage}"
  500. Width="12" />
  501. </MenuItem.Icon>
  502. </MenuItem>
  503. <Separator />
  504. <!-- Next 10 -->
  505. <MenuItem
  506. Command="{CompiledBinding Skip10Command}"
  507. Header="{CompiledBinding Translation.AdvanceBy10Images,
  508. Mode=OneWay}"
  509. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  510. Converter={x:Static ObjectConverters.IsNotNull}}"
  511. StaysOpenOnClick="True">
  512. <MenuItem.Icon>
  513. <Image
  514. Height="12"
  515. Source="{StaticResource NextImage}"
  516. Width="12" />
  517. </MenuItem.Icon>
  518. </MenuItem>
  519. <!-- Next 100 -->
  520. <MenuItem
  521. Command="{CompiledBinding Skip100Command}"
  522. Header="{CompiledBinding Translation.AdvanceBy100Images,
  523. Mode=OneWay}"
  524. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  525. Converter={x:Static ObjectConverters.IsNotNull}}"
  526. StaysOpenOnClick="True">
  527. <MenuItem.Icon>
  528. <Image
  529. Height="12"
  530. Source="{StaticResource NextImage}"
  531. Width="12" />
  532. </MenuItem.Icon>
  533. </MenuItem>
  534. <!-- Prev 10 -->
  535. <MenuItem
  536. Command="{CompiledBinding Prev10Command}"
  537. Header="{CompiledBinding Translation.GoBackBy10Images,
  538. Mode=OneWay}"
  539. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  540. Converter={x:Static ObjectConverters.IsNotNull}}"
  541. StaysOpenOnClick="True">
  542. <MenuItem.Icon>
  543. <Image
  544. Height="12"
  545. Source="{StaticResource PrevImage}"
  546. Width="12" />
  547. </MenuItem.Icon>
  548. </MenuItem>
  549. <!-- Prev 100 -->
  550. <MenuItem
  551. Command="{CompiledBinding Prev100Command}"
  552. Header="{CompiledBinding Translation.GoBackBy100Images,
  553. Mode=OneWay}"
  554. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  555. Converter={x:Static ObjectConverters.IsNotNull}}"
  556. StaysOpenOnClick="True">
  557. <MenuItem.Icon>
  558. <Image
  559. Height="12"
  560. Source="{StaticResource PrevImage}"
  561. Width="12" />
  562. </MenuItem.Icon>
  563. </MenuItem>
  564. <Separator />
  565. <!-- First Image -->
  566. <MenuItem
  567. Command="{CompiledBinding FirstCommand}"
  568. Header="{CompiledBinding Translation.FirstImage}"
  569. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  570. Converter={x:Static ObjectConverters.IsNotNull}}">
  571. <MenuItem.Icon>
  572. <Image
  573. Height="12"
  574. Source="{StaticResource FirstImage}"
  575. Width="12" />
  576. </MenuItem.Icon>
  577. </MenuItem>
  578. <!-- Last Image -->
  579. <MenuItem
  580. Command="{CompiledBinding LastCommand}"
  581. Header="{CompiledBinding Translation.LastImage,
  582. Mode=OneWay}"
  583. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  584. Converter={x:Static ObjectConverters.IsNotNull}}">
  585. <MenuItem.Icon>
  586. <Image
  587. Height="12"
  588. Source="{StaticResource LastImage}"
  589. Width="12" />
  590. </MenuItem.Icon>
  591. </MenuItem>
  592. <Separator />
  593. <!-- Next folder -->
  594. <MenuItem
  595. Command="{CompiledBinding NextFolderCommand}"
  596. Header="{CompiledBinding Translation.NextFolder,
  597. Mode=OneWay}"
  598. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  599. Converter={x:Static ObjectConverters.IsNotNull}}">
  600. <MenuItem.Icon>
  601. <Image
  602. Height="14"
  603. Source="{StaticResource NextFolderImage}"
  604. Width="14" />
  605. </MenuItem.Icon>
  606. </MenuItem>
  607. <!-- Prev folder -->
  608. <MenuItem
  609. Command="{CompiledBinding PreviousFolderCommand}"
  610. Header="{CompiledBinding Translation.PrevFolder,
  611. Mode=OneWay}"
  612. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  613. Converter={x:Static ObjectConverters.IsNotNull}}">
  614. <MenuItem.Icon>
  615. <Image
  616. Height="14"
  617. Source="{StaticResource PrevFolderImage}"
  618. Width="14" />
  619. </MenuItem.Icon>
  620. </MenuItem>
  621. </MenuItem>
  622. <Separator />
  623. <!-- Set as wallpaper -->
  624. <MenuItem
  625. Command="{CompiledBinding SetAsWallpaperCommand}"
  626. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  627. FallbackValue=''}"
  628. Header="{CompiledBinding Translation.SetAsWallpaper,
  629. Mode=OneWay}"
  630. IsEnabled="{CompiledBinding PicViewer.ImageSource,
  631. Converter={x:Static ObjectConverters.IsNotNull}}">
  632. <MenuItem.Icon>
  633. <Path
  634. Data="{StaticResource PanoramaGeometry}"
  635. Fill="{StaticResource Brush0}"
  636. Height="10.40"
  637. Stretch="Fill"
  638. Width="13" />
  639. </MenuItem.Icon>
  640. </MenuItem>
  641. <Separator />
  642. <!-- Image -->
  643. <MenuItem Header="{CompiledBinding Translation.Image, Mode=OneWay}">
  644. <MenuItem.Icon>
  645. <Image
  646. Height="12"
  647. Source="{StaticResource Image}"
  648. Width="12" />
  649. </MenuItem.Icon>
  650. <!-- Exif window -->
  651. <MenuItem Command="{CompiledBinding ShowExifWindowCommand}" Header="{CompiledBinding Translation.ImageInfo, Mode=OneWay}">
  652. <MenuItem.Icon>
  653. <Path
  654. Data="{StaticResource ImageInfoGeometry}"
  655. Fill="{StaticResource Brush0}"
  656. Height="12"
  657. Stretch="Fill"
  658. Width="12" />
  659. </MenuItem.Icon>
  660. </MenuItem>
  661. <!-- File properties -->
  662. <MenuItem
  663. Command="{CompiledBinding FilePropertiesCommand}"
  664. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  665. FallbackValue=''}"
  666. Header="{CompiledBinding Translation.FileProperties,
  667. Mode=OneWay}"
  668. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  669. Converter={x:Static ObjectConverters.IsNotNull}}">
  670. <MenuItem.Icon>
  671. <Path
  672. Data="{StaticResource FilePropertiesGeometry}"
  673. Fill="{StaticResource Brush0}"
  674. Height="12"
  675. Stretch="Fill"
  676. Width="12" />
  677. </MenuItem.Icon>
  678. </MenuItem>
  679. <!-- Single image resize -->
  680. <MenuItem Command="{CompiledBinding ShowSingleImageResizeWindowCommand}" Header="{CompiledBinding Translation.ResizeImage, Mode=OneWay}">
  681. <MenuItem.Icon>
  682. <Image
  683. Height="12"
  684. Source="{StaticResource BatchResizeImage}"
  685. Width="12" />
  686. </MenuItem.Icon>
  687. </MenuItem>
  688. <!-- Batch resize -->
  689. <MenuItem Command="{CompiledBinding ShowBatchResizeWindowCommand}" Header="{CompiledBinding Translation.BatchResize, Mode=OneWay}">
  690. <MenuItem.Icon>
  691. <Image
  692. Height="12"
  693. Source="{StaticResource BatchResizeImage}"
  694. Width="12" />
  695. </MenuItem.Icon>
  696. </MenuItem>
  697. <Separator />
  698. <!-- Optimize image -->
  699. <MenuItem
  700. Command="{CompiledBinding OptimizeImageCommand}"
  701. Header="{CompiledBinding Translation.OptimizeImage,
  702. Mode=OneWay}"
  703. IsEnabled="{CompiledBinding ShouldOptimizeImageBeEnabled,
  704. Mode=OneWay}">
  705. <MenuItem.Icon>
  706. <Image
  707. Height="12"
  708. Source="{StaticResource PortalImage}"
  709. Width="12" />
  710. </MenuItem.Icon>
  711. </MenuItem>
  712. <Separator />
  713. <!-- Crop -->
  714. <MenuItem
  715. Command="{CompiledBinding CropCommand}"
  716. Header="{CompiledBinding Translation.Crop,
  717. Mode=OneWay}"
  718. IsEnabled="{CompiledBinding ShouldCropBeEnabled,
  719. Mode=OneWay}"
  720. x:Name="CropMenuItem">
  721. <MenuItem.Icon>
  722. <Path
  723. Data="{StaticResource CropGeometry}"
  724. Fill="{DynamicResource MainTextColor}"
  725. Height="12"
  726. Stretch="Fill"
  727. Width="12" />
  728. </MenuItem.Icon>
  729. </MenuItem>
  730. <Separator />
  731. <!-- Flip -->
  732. <MenuItem
  733. Command="{CompiledBinding FlipCommand}"
  734. Header="{CompiledBinding Translation.IsFlipped}"
  735. IsEnabled="{CompiledBinding PicViewer.ImageSource,
  736. Converter={x:Static ObjectConverters.IsNotNull}}"
  737. StaysOpenOnClick="True">
  738. <MenuItem.Icon>
  739. <Path
  740. Data="{StaticResource FlipGeometry}"
  741. Fill="{DynamicResource MainTextColor}"
  742. Height="12"
  743. Stretch="Fill"
  744. Width="12">
  745. <Path.RenderTransform>
  746. <ScaleTransform ScaleX="{CompiledBinding PicViewer.ScaleX}" />
  747. </Path.RenderTransform>
  748. </Path>
  749. </MenuItem.Icon>
  750. </MenuItem>
  751. <!-- Rotate left -->
  752. <MenuItem
  753. Command="{CompiledBinding RotateLeftCommand}"
  754. Header="{CompiledBinding Translation.RotateLeft,
  755. Mode=OneWay}"
  756. IsEnabled="{CompiledBinding PicViewer.ImageSource,
  757. Converter={x:Static ObjectConverters.IsNotNull}}"
  758. StaysOpenOnClick="True">
  759. <MenuItem.Icon>
  760. <Path
  761. Data="{StaticResource RotateLeftGeometry}"
  762. Fill="{StaticResource Brush0}"
  763. Height="12"
  764. Stretch="Fill"
  765. Width="12" />
  766. </MenuItem.Icon>
  767. </MenuItem>
  768. <!-- Rotate right -->
  769. <MenuItem
  770. Command="{CompiledBinding RotateRightCommand}"
  771. Header="{CompiledBinding Translation.RotateRight,
  772. Mode=OneWay}"
  773. IsEnabled="{CompiledBinding PicViewer.ImageSource,
  774. Converter={x:Static ObjectConverters.IsNotNull}}"
  775. StaysOpenOnClick="True">
  776. <MenuItem.Icon>
  777. <Path
  778. Data="{StaticResource RotateRightGeometry}"
  779. Fill="{StaticResource Brush0}"
  780. Height="12"
  781. Stretch="Fill"
  782. Width="12" />
  783. </MenuItem.Icon>
  784. </MenuItem>
  785. </MenuItem>
  786. <Separator />
  787. <!-- Delete file -->
  788. <MenuItem
  789. Command="{CompiledBinding RecycleFileCommand}"
  790. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  791. FallbackValue=''}"
  792. Header="{CompiledBinding Translation.DeleteFile,
  793. Mode=OneWay}"
  794. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  795. Converter={x:Static ObjectConverters.IsNotNull}}">
  796. <MenuItem.Icon>
  797. <Path
  798. Data="{StaticResource RecycleGeometry}"
  799. Fill="{StaticResource Brush0}"
  800. Height="12"
  801. Stretch="Fill"
  802. Width="12" />
  803. </MenuItem.Icon>
  804. </MenuItem>
  805. <Separator />
  806. <!-- Paste -->
  807. <MenuItem Command="{CompiledBinding PasteCommand}" Header="{CompiledBinding Translation.Paste, Mode=OneWay}">
  808. <MenuItem.Icon>
  809. <Path
  810. Data="{StaticResource PasteGeometry}"
  811. Fill="{StaticResource Brush0}"
  812. Height="12"
  813. Stretch="Fill"
  814. Width="12" />
  815. </MenuItem.Icon>
  816. </MenuItem>
  817. <!-- Copy -->
  818. <MenuItem
  819. Command="{CompiledBinding CopyFileCommand}"
  820. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  821. FallbackValue=''}"
  822. Header="{CompiledBinding Translation.Copy,
  823. Mode=OneWay}">
  824. <MenuItem.Icon>
  825. <Path
  826. Data="{StaticResource CopyGeometry}"
  827. Fill="{StaticResource Brush0}"
  828. Height="12"
  829. Stretch="Fill"
  830. Width="12" />
  831. </MenuItem.Icon>
  832. <!-- Copy image -->
  833. <MenuItem
  834. Command="{CompiledBinding CopyImageCommand}"
  835. Header="{CompiledBinding Translation.CopyImage,
  836. Mode=OneWay}"
  837. IsEnabled="{CompiledBinding PicViewer.ImageSource,
  838. Converter={x:Static ObjectConverters.IsNotNull}}">
  839. <MenuItem.Icon>
  840. <Path
  841. Data="{StaticResource CopyImageGeometry}"
  842. Fill="{StaticResource Brush0}"
  843. Height="12"
  844. Stretch="Fill"
  845. Width="12" />
  846. </MenuItem.Icon>
  847. </MenuItem>
  848. <!-- Copy file path -->
  849. <MenuItem
  850. Command="{CompiledBinding CopyFilePathCommand}"
  851. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  852. FallbackValue=''}"
  853. Header="{Binding Translation.FileCopyPath, Mode=OneWay}"
  854. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  855. Converter={x:Static ObjectConverters.IsNotNull}}">
  856. <MenuItem.Icon>
  857. <Path
  858. Data="{StaticResource CopyGeometry}"
  859. Fill="{StaticResource Brush0}"
  860. Height="12"
  861. Stretch="Fill"
  862. Width="12" />
  863. </MenuItem.Icon>
  864. </MenuItem>
  865. <!-- Copy base64 -->
  866. <MenuItem
  867. Command="{CompiledBinding CopyBase64Command}"
  868. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  869. FallbackValue=''}"
  870. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  871. Converter={x:Static ObjectConverters.IsNotNull}}">
  872. <MenuItem.Header>
  873. <TextBlock>
  874. <Run Text="{CompiledBinding Translation.Copy, Mode=OneWay}" />
  875. <Run Text=" base64" />
  876. </TextBlock>
  877. </MenuItem.Header>
  878. <MenuItem.Icon>
  879. <Path
  880. Data="{StaticResource CopyGeometry}"
  881. Fill="{StaticResource Brush0}"
  882. Height="12"
  883. Stretch="Fill"
  884. Width="12" />
  885. </MenuItem.Icon>
  886. </MenuItem>
  887. <Separator />
  888. <!-- Duplicate file -->
  889. <MenuItem
  890. Command="{CompiledBinding DuplicateFileCommand}"
  891. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  892. FallbackValue=''}"
  893. Header="{CompiledBinding Translation.DuplicateFile,
  894. Mode=OneWay}"
  895. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  896. Converter={x:Static ObjectConverters.IsNotNull}}">
  897. <MenuItem.Icon>
  898. <Path
  899. Data="{StaticResource DuplicateGeometry}"
  900. Fill="{StaticResource Brush0}"
  901. Height="12"
  902. Stretch="Fill"
  903. Width="12" />
  904. </MenuItem.Icon>
  905. </MenuItem>
  906. <!-- Cut -->
  907. <!-- <MenuItem -->
  908. <!-- Command="{CompiledBinding CutCommand}" -->
  909. <!-- CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName, -->
  910. <!-- FallbackValue=''}" -->
  911. <!-- Header="{CompiledBinding Translation.FileCut, -->
  912. <!-- Mode=OneWay}" -->
  913. <!-- IsEnabled="False"> -->
  914. <!-- <MenuItem.Icon> -->
  915. <!-- <Path -->
  916. <!-- Data="{StaticResource CutGeometry}" -->
  917. <!-- Fill="{StaticResource Brush0}" -->
  918. <!-- Height="12" -->
  919. <!-- Stretch="Fill" -->
  920. <!-- Width="12" /> -->
  921. <!-- </MenuItem.Icon> -->
  922. <!-- </MenuItem> -->
  923. </MenuItem>
  924. <!-- Copy file -->
  925. <MenuItem
  926. Command="{CompiledBinding CopyFileCommand}"
  927. CommandParameter="{CompiledBinding PicViewer.FileInfo.FullName,
  928. FallbackValue=''}"
  929. Header="{CompiledBinding Translation.CopyFile,
  930. Mode=OneWay}"
  931. IsEnabled="{CompiledBinding PicViewer.FileInfo,
  932. Converter={x:Static ObjectConverters.IsNotNull}}">
  933. <MenuItem.Icon>
  934. <Path
  935. Data="{StaticResource CopyGeometry}"
  936. Fill="{StaticResource Brush0}"
  937. Height="12"
  938. Stretch="Fill"
  939. Width="12" />
  940. </MenuItem.Icon>
  941. </MenuItem>
  942. <Separator />
  943. <!-- Fullscreen -->
  944. <MenuItem
  945. Command="{CompiledBinding ToggleFullscreenCommand}"
  946. Header="{CompiledBinding Translation.Fullscreen,
  947. Mode=OneWay}"
  948. IsVisible="{CompiledBinding !IsFullscreen,
  949. Mode=OneWay}">
  950. <MenuItem.Icon>
  951. <Path
  952. Data="{StaticResource FullscreenGeometry}"
  953. Fill="{StaticResource Brush0}"
  954. Height="12"
  955. Stretch="Fill"
  956. Width="12" />
  957. </MenuItem.Icon>
  958. </MenuItem>
  959. <!-- Maximize -->
  960. <MenuItem
  961. Command="{CompiledBinding MaximizeCommand}"
  962. Header="{CompiledBinding Translation.Maximize,
  963. Mode=OneWay}"
  964. IsVisible="{CompiledBinding ShouldMaximizeBeShown,
  965. Mode=OneWay}"
  966. x:Name="MaximizeMenuItem">
  967. <MenuItem.Icon>
  968. <Image
  969. Height="12"
  970. Source="{StaticResource SquareImage}"
  971. Stretch="Fill"
  972. Width="12" />
  973. </MenuItem.Icon>
  974. </MenuItem>
  975. <!-- Restore -->
  976. <MenuItem
  977. Command="{CompiledBinding RestoreCommand}"
  978. Header="{CompiledBinding Translation.RestoreDown,
  979. Mode=OneWay}"
  980. IsVisible="{CompiledBinding ShouldRestore,
  981. Mode=OneWay}">
  982. <MenuItem.Icon>
  983. <Path
  984. Data="{StaticResource RestoreGeometry}"
  985. Fill="{StaticResource Brush0}"
  986. Height="12"
  987. Stretch="Fill"
  988. Width="12" />
  989. </MenuItem.Icon>
  990. </MenuItem>
  991. <!-- Close -->
  992. <MenuItem Command="{CompiledBinding ExitCommand}" Header="{CompiledBinding Translation.Close, Mode=OneWay}">
  993. <MenuItem.Icon>
  994. <Path
  995. Data="{StaticResource CloseGeometry}"
  996. Fill="{StaticResource Brush0}"
  997. Height="12"
  998. Stretch="Fill"
  999. Width="12" />
  1000. </MenuItem.Icon>
  1001. </MenuItem>
  1002. </ContextMenu>
  1003. </UserControl.ContextMenu>
  1004. <Panel x:Name="MainGrid">
  1005. <uc:SpinWaiter
  1006. HorizontalAlignment="Center"
  1007. IsVisible="{CompiledBinding IsLoading,
  1008. Mode=OneWay}"
  1009. VerticalAlignment="Center"
  1010. ZIndex="3" />
  1011. <ContentControl
  1012. ClipToBounds="True"
  1013. Content="{CompiledBinding CurrentView,
  1014. Mode=OneWay}"
  1015. Margin="{CompiledBinding GalleryMargin}" />
  1016. <buttons:ClickArrowRight
  1017. HorizontalAlignment="Right"
  1018. Margin="{CompiledBinding RightControlOffSetMargin}"
  1019. Opacity="0"
  1020. VerticalAlignment="Center"
  1021. x:Name="ClickArrowRight" />
  1022. <buttons:ClickArrowLeft
  1023. HorizontalAlignment="Left"
  1024. Opacity="0"
  1025. VerticalAlignment="Center"
  1026. x:Name="ClickArrowLeft" />
  1027. <StackPanel
  1028. Background="Transparent"
  1029. Height="150"
  1030. HorizontalAlignment="Right"
  1031. IsVisible="{CompiledBinding !IsUIShown}"
  1032. Margin="{CompiledBinding RightControlOffSetMargin}"
  1033. Opacity="0"
  1034. Orientation="Horizontal"
  1035. VerticalAlignment="Top"
  1036. x:Name="AltButtonsPanel">
  1037. <buttons:AltMinimize x:Name="AltMinimize" />
  1038. <buttons:AltRestore x:Name="AltRestore" />
  1039. <buttons:AltClose x:Name="AltClose" />
  1040. </StackPanel>
  1041. <buttons:GalleryShortcut
  1042. HorizontalAlignment="Right"
  1043. Opacity="0"
  1044. VerticalAlignment="Bottom"
  1045. x:Name="GalleryShortcut" />
  1046. <views:GalleryAnimationControlView
  1047. GalleryMode="{CompiledBinding GalleryMode,
  1048. Mode=OneWay}"
  1049. Height="NaN"
  1050. IsVisible="{CompiledBinding IsBottomGalleryShown,
  1051. Mode=OneWay}"
  1052. VerticalAlignment="{CompiledBinding GalleryVerticalAlignment,
  1053. Mode=OneWay}"
  1054. Width="{CompiledBinding GalleryWidth,
  1055. Mode=OneWay}"
  1056. x:Name="GalleryView" />
  1057. <uc:ToolTipMessage
  1058. HorizontalAlignment="Center"
  1059. Opacity="0"
  1060. VerticalAlignment="Center"
  1061. x:Name="ToolTipMessage" />
  1062. </Panel>
  1063. </UserControl>