MainWindow.axaml 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <window:StyleableWindow
  2. x:Class="Ryujinx.Ava.Ui.Windows.MainWindow"
  3. xmlns="https://github.com/avaloniaui"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:models="clr-namespace:Ryujinx.Ava.Ui.Models"
  10. xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
  11. xmlns:viewModels="clr-namespace:Ryujinx.Ava.Ui.ViewModels"
  12. xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows"
  13. Title="Ryujinx"
  14. Width="1280"
  15. Height="785"
  16. MinWidth="1024"
  17. MinHeight="680"
  18. d:DesignHeight="720"
  19. d:DesignWidth="1280"
  20. x:CompileBindings="True"
  21. x:DataType="viewModels:MainWindowViewModel"
  22. WindowStartupLocation="CenterScreen"
  23. mc:Ignorable="d">
  24. <Window.Styles>
  25. <Style Selector="TitleBar:fullscreen">
  26. <Setter Property="Background" Value="#000000" />
  27. </Style>
  28. </Window.Styles>
  29. <Design.DataContext>
  30. <viewModels:MainWindowViewModel />
  31. </Design.DataContext>
  32. <Window.Resources>
  33. <controls:BitmapArrayValueConverter x:Key="ByteImage" />
  34. </Window.Resources>
  35. <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="Auto" />
  38. <RowDefinition Height="*" />
  39. </Grid.RowDefinitions>
  40. <controls:OffscreenTextBox Name="HiddenTextBox" Grid.Row="0" />
  41. <ContentControl
  42. Grid.Row="1"
  43. Focusable="False"
  44. IsVisible="False"
  45. KeyboardNavigation.IsTabStop="False">
  46. <ui:ContentDialog
  47. Name="ContentDialog"
  48. IsPrimaryButtonEnabled="True"
  49. IsSecondaryButtonEnabled="True"
  50. IsVisible="True"
  51. KeyboardNavigation.IsTabStop="False" />
  52. </ContentControl>
  53. <StackPanel Grid.Row="0" IsVisible="False">
  54. <controls:HotKeyControl Name="FullscreenHotKey" Command="{ReflectionBinding ToggleFullscreen}" />
  55. <controls:HotKeyControl Name="FullscreenHotKey2" Command="{ReflectionBinding ToggleFullscreen}" />
  56. <controls:HotKeyControl Name="DockToggleHotKey" Command="{ReflectionBinding ToggleDockMode}" />
  57. <controls:HotKeyControl Name="ExitHotKey" Command="{ReflectionBinding ExitCurrentState}" />
  58. </StackPanel>
  59. <Grid
  60. Grid.Row="1"
  61. HorizontalAlignment="Stretch"
  62. VerticalAlignment="Stretch">
  63. <Grid.ColumnDefinitions>
  64. <ColumnDefinition Width="*" />
  65. </Grid.ColumnDefinitions>
  66. <Grid.RowDefinitions>
  67. <RowDefinition Height="Auto" />
  68. <RowDefinition Height="*" />
  69. <RowDefinition Height="Auto" />
  70. </Grid.RowDefinitions>
  71. <StackPanel
  72. Grid.Row="0"
  73. Margin="0"
  74. HorizontalAlignment="Stretch"
  75. VerticalAlignment="Stretch"
  76. IsVisible="{Binding ShowMenuAndStatusBar}"
  77. Orientation="Vertical">
  78. <DockPanel HorizontalAlignment="Stretch">
  79. <Menu
  80. Name="Menu"
  81. Height="35"
  82. Margin="0"
  83. HorizontalAlignment="Left">
  84. <Menu.ItemsPanel>
  85. <ItemsPanelTemplate>
  86. <DockPanel Margin="0" HorizontalAlignment="Stretch" />
  87. </ItemsPanelTemplate>
  88. </Menu.ItemsPanel>
  89. <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarFile}">
  90. <MenuItem
  91. Command="{ReflectionBinding OpenFile}"
  92. Header="{locale:Locale MenuBarFileOpenFromFile}"
  93. IsEnabled="{Binding EnableNonGameRunningControls}"
  94. ToolTip.Tip="{locale:Locale LoadApplicationFileTooltip}" />
  95. <MenuItem
  96. Command="{ReflectionBinding OpenFolder}"
  97. Header="{locale:Locale MenuBarFileOpenUnpacked}"
  98. IsEnabled="{Binding EnableNonGameRunningControls}"
  99. ToolTip.Tip="{locale:Locale LoadApplicationFolderTooltip}" />
  100. <MenuItem Header="{locale:Locale MenuBarFileOpenApplet}" IsEnabled="{Binding IsAppletMenuActive}">
  101. <MenuItem
  102. Command="{ReflectionBinding OpenMiiApplet}"
  103. Header="Mii Edit Applet"
  104. ToolTip.Tip="{locale:Locale MenuBarFileOpenAppletOpenMiiAppletToolTip}" />
  105. </MenuItem>
  106. <Separator />
  107. <MenuItem
  108. Command="{ReflectionBinding OpenRyujinxFolder}"
  109. Header="{locale:Locale MenuBarFileOpenEmuFolder}"
  110. ToolTip.Tip="{locale:Locale OpenRyujinxFolderTooltip}" />
  111. <MenuItem
  112. Command="{ReflectionBinding OpenLogsFolder}"
  113. Header="{locale:Locale MenuBarFileOpenLogsFolder}"
  114. ToolTip.Tip="{locale:Locale OpenRyujinxLogsTooltip}" />
  115. <Separator />
  116. <MenuItem
  117. Command="{ReflectionBinding CloseWindow}"
  118. Header="{locale:Locale MenuBarFileExit}"
  119. ToolTip.Tip="{locale:Locale ExitTooltip}" />
  120. </MenuItem>
  121. <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarOptions}">
  122. <MenuItem
  123. Command="{ReflectionBinding ToggleFullscreen}"
  124. Header="{locale:Locale MenuBarOptionsToggleFullscreen}"
  125. InputGesture="F11" />
  126. <MenuItem Header="{locale:Locale MenuBarOptionsStartGamesInFullscreen}">
  127. <MenuItem.Icon>
  128. <CheckBox IsChecked="{Binding StartGamesInFullscreen, Mode=TwoWay}" />
  129. </MenuItem.Icon>
  130. </MenuItem>
  131. <MenuItem Header="{locale:Locale MenuBarOptionsShowConsole}">
  132. <MenuItem.Icon>
  133. <CheckBox IsChecked="{Binding ShowConsole, Mode=TwoWay}" />
  134. </MenuItem.Icon>
  135. </MenuItem>
  136. <Separator />
  137. <MenuItem Header="{locale:Locale MenuBarOptionsChangeLanguage}">
  138. <MenuItem
  139. Command="{ReflectionBinding ChangeLanguage}"
  140. CommandParameter="en_US"
  141. Header="American English" />
  142. <MenuItem
  143. Command="{ReflectionBinding ChangeLanguage}"
  144. CommandParameter="pt_BR"
  145. Header="Brazilian Portuguese" />
  146. <MenuItem
  147. Command="{ReflectionBinding ChangeLanguage}"
  148. CommandParameter="es_ES"
  149. Header="Castilian Spanish" />
  150. <MenuItem
  151. Command="{ReflectionBinding ChangeLanguage}"
  152. CommandParameter="fr_FR"
  153. Header="French" />
  154. <MenuItem
  155. Command="{ReflectionBinding ChangeLanguage}"
  156. CommandParameter="de_DE"
  157. Header="German" />
  158. <MenuItem
  159. Command="{ReflectionBinding ChangeLanguage}"
  160. CommandParameter="el_GR"
  161. Header="Greek" />
  162. <MenuItem
  163. Command="{ReflectionBinding ChangeLanguage}"
  164. CommandParameter="it_IT"
  165. Header="Italian" />
  166. <MenuItem
  167. Command="{ReflectionBinding ChangeLanguage}"
  168. CommandParameter="ko_KR"
  169. Header="Korean" />
  170. <MenuItem
  171. Command="{ReflectionBinding ChangeLanguage}"
  172. CommandParameter="ru_RU"
  173. Header="Russian" />
  174. <MenuItem
  175. Command="{ReflectionBinding ChangeLanguage}"
  176. CommandParameter="tr_TR"
  177. Header="Turkish" />
  178. </MenuItem>
  179. <Separator />
  180. <MenuItem
  181. Command="{ReflectionBinding OpenSettings}"
  182. Header="{locale:Locale MenuBarOptionsSettings}"
  183. ToolTip.Tip="{locale:Locale OpenSettingsTooltip}" />
  184. <MenuItem
  185. Command="{ReflectionBinding ManageProfiles}"
  186. Header="{locale:Locale MenuBarOptionsManageUserProfiles}"
  187. IsEnabled="{Binding EnableNonGameRunningControls}"
  188. ToolTip.Tip="{locale:Locale OpenProfileManagerTooltip}" />
  189. </MenuItem>
  190. <MenuItem
  191. Name="ActionsMenuItem"
  192. VerticalAlignment="Center"
  193. Header="{locale:Locale MenuBarActions}"
  194. IsEnabled="{Binding IsGameRunning}">
  195. <MenuItem
  196. Click="PauseEmulation_Click"
  197. Header="{locale:Locale MenuBarOptionsPauseEmulation}"
  198. InputGesture="{Binding PauseKey}"
  199. IsEnabled="{Binding !IsPaused}"
  200. IsVisible="{Binding !IsPaused}" />
  201. <MenuItem
  202. Click="ResumeEmulation_Click"
  203. Header="{locale:Locale MenuBarOptionsResumeEmulation}"
  204. InputGesture="{Binding PauseKey}"
  205. IsEnabled="{Binding IsPaused}"
  206. IsVisible="{Binding IsPaused}" />
  207. <MenuItem
  208. Click="StopEmulation_Click"
  209. Header="{locale:Locale MenuBarOptionsStopEmulation}"
  210. InputGesture="Escape"
  211. IsEnabled="{Binding IsGameRunning}"
  212. ToolTip.Tip="{locale:Locale StopEmulationTooltip}" />
  213. <MenuItem Command="{ReflectionBinding SimulateWakeUpMessage}" Header="{locale:Locale MenuBarOptionsSimulateWakeUpMessage}" />
  214. <Separator />
  215. <MenuItem
  216. Name="ScanAmiiboMenuItem"
  217. AttachedToVisualTree="ScanAmiiboMenuItem_AttachedToVisualTree"
  218. Command="{ReflectionBinding OpenAmiiboWindow}"
  219. Header="{locale:Locale MenuBarActionsScanAmiibo}"
  220. IsEnabled="{Binding IsAmiiboRequested}" />
  221. <MenuItem
  222. Command="{ReflectionBinding TakeScreenshot}"
  223. Header="{locale:Locale MenuBarFileToolsTakeScreenshot}"
  224. InputGesture="{Binding ScreenshotKey}"
  225. IsEnabled="{Binding IsGameRunning}" />
  226. <MenuItem
  227. Command="{ReflectionBinding HideUi}"
  228. Header="{locale:Locale MenuBarFileToolsHideUi}"
  229. InputGesture="{Binding ShowUiKey}"
  230. IsEnabled="{Binding IsGameRunning}" />
  231. <MenuItem
  232. Command="{ReflectionBinding OpenCheatManagerForCurrentApp}"
  233. Header="{locale:Locale GameListContextMenuManageCheat}"
  234. IsEnabled="{Binding IsGameRunning}" />
  235. </MenuItem>
  236. <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarTools}">
  237. <MenuItem Header="{locale:Locale MenuBarToolsInstallFirmware}" IsEnabled="{Binding EnableNonGameRunningControls}">
  238. <MenuItem Command="{ReflectionBinding InstallFirmwareFromFile}" Header="{locale:Locale MenuBarFileToolsInstallFirmwareFromFile}" />
  239. <MenuItem Command="{ReflectionBinding InstallFirmwareFromFolder}" Header="{locale:Locale MenuBarFileToolsInstallFirmwareFromDirectory}" />
  240. </MenuItem>
  241. </MenuItem>
  242. <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarHelp}">
  243. <MenuItem
  244. Name="UpdateMenuItem"
  245. Command="{ReflectionBinding CheckForUpdates}"
  246. Header="{locale:Locale MenuBarHelpCheckForUpdates}"
  247. ToolTip.Tip="{locale:Locale CheckUpdatesTooltip}" />
  248. <Separator />
  249. <MenuItem
  250. Command="{ReflectionBinding OpenAboutWindow}"
  251. Header="{locale:Locale MenuBarHelpAbout}"
  252. ToolTip.Tip="{locale:Locale OpenAboutTooltip}" />
  253. </MenuItem>
  254. </Menu>
  255. </DockPanel>
  256. </StackPanel>
  257. <ContentControl
  258. Name="Content"
  259. Grid.Row="1"
  260. Padding="0"
  261. HorizontalAlignment="Stretch"
  262. VerticalAlignment="Stretch"
  263. BorderBrush="{DynamicResource ThemeControlBorderColor}"
  264. BorderThickness="0,0,0,0"
  265. DockPanel.Dock="Top"
  266. IsVisible="{Binding ShowContent}">
  267. <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  268. <Grid.RowDefinitions>
  269. <RowDefinition Height="Auto" />
  270. <RowDefinition Height="*" />
  271. </Grid.RowDefinitions>
  272. <DockPanel
  273. Grid.Row="0"
  274. Margin="0,0,0,5"
  275. HorizontalAlignment="Stretch">
  276. <Button
  277. Width="40"
  278. MinWidth="40"
  279. Margin="5,2,0,2"
  280. VerticalAlignment="Stretch"
  281. Command="{ReflectionBinding SetListMode}"
  282. IsEnabled="{Binding IsGrid}">
  283. <ui:FontIcon
  284. Margin="0"
  285. HorizontalAlignment="Stretch"
  286. VerticalAlignment="Center"
  287. FontFamily="avares://FluentAvalonia/Fonts#Symbols"
  288. Glyph="{controls:GlyphValueConverter List}" />
  289. </Button>
  290. <Button
  291. Width="40"
  292. MinWidth="40"
  293. Margin="5,2,5,2"
  294. VerticalAlignment="Stretch"
  295. Command="{ReflectionBinding SetGridMode}"
  296. IsEnabled="{Binding IsList}">
  297. <ui:FontIcon
  298. Margin="0"
  299. HorizontalAlignment="Stretch"
  300. VerticalAlignment="Center"
  301. FontFamily="avares://FluentAvalonia/Fonts#Symbols"
  302. Glyph="{controls:GlyphValueConverter Grid}" />
  303. </Button>
  304. <TextBlock
  305. Margin="10,0"
  306. VerticalAlignment="Center"
  307. Text="{locale:Locale IconSize}"
  308. ToolTip.Tip="{locale:Locale IconSizeTooltip}" />
  309. <Slider
  310. Width="150"
  311. Height="35"
  312. Margin="5,-10,5,0"
  313. VerticalAlignment="Center"
  314. IsSnapToTickEnabled="True"
  315. Maximum="4"
  316. Minimum="1"
  317. TickFrequency="1"
  318. ToolTip.Tip="{locale:Locale IconSizeTooltip}"
  319. Value="{Binding GridSizeScale}" />
  320. <CheckBox
  321. Margin="0"
  322. VerticalAlignment="Center"
  323. IsChecked="{Binding ShowNames, Mode=TwoWay}"
  324. IsVisible="{Binding IsGrid}">
  325. <TextBlock Margin="5,3,0,0" Text="{locale:Locale CommonShowNames}" />
  326. </CheckBox>
  327. <TextBox
  328. Name="SearchBox"
  329. MinWidth="200"
  330. Margin="5,0,5,0"
  331. HorizontalAlignment="Right"
  332. VerticalAlignment="Center"
  333. DockPanel.Dock="Right"
  334. KeyUp="SearchBox_OnKeyUp"
  335. Text="{Binding SearchText}"
  336. Watermark="{locale:Locale MenuSearch}" />
  337. <ui:DropDownButton
  338. Width="150"
  339. HorizontalAlignment="Right"
  340. VerticalAlignment="Center"
  341. Content="{Binding SortName}"
  342. DockPanel.Dock="Right">
  343. <ui:DropDownButton.Flyout>
  344. <Flyout Placement="Bottom">
  345. <StackPanel
  346. Margin="0"
  347. HorizontalAlignment="Stretch"
  348. Orientation="Vertical">
  349. <StackPanel>
  350. <RadioButton
  351. Checked="Sort_Checked"
  352. Content="{locale:Locale CommonFavorite}"
  353. GroupName="Sort"
  354. IsChecked="{Binding IsSortedByFavorite, Mode=OneTime}"
  355. Tag="Favorite" />
  356. <RadioButton
  357. Checked="Sort_Checked"
  358. Content="{locale:Locale GameListHeaderApplication}"
  359. GroupName="Sort"
  360. IsChecked="{Binding IsSortedByTitle, Mode=OneTime}"
  361. Tag="Title" />
  362. <RadioButton
  363. Checked="Sort_Checked"
  364. Content="{locale:Locale GameListHeaderDeveloper}"
  365. GroupName="Sort"
  366. IsChecked="{Binding IsSortedByDeveloper, Mode=OneTime}"
  367. Tag="Developer" />
  368. <RadioButton
  369. Checked="Sort_Checked"
  370. Content="{locale:Locale GameListHeaderTimePlayed}"
  371. GroupName="Sort"
  372. IsChecked="{Binding IsSortedByTimePlayed, Mode=OneTime}"
  373. Tag="TotalTimePlayed" />
  374. <RadioButton
  375. Checked="Sort_Checked"
  376. Content="{locale:Locale GameListHeaderLastPlayed}"
  377. GroupName="Sort"
  378. IsChecked="{Binding IsSortedByLastPlayed, Mode=OneTime}"
  379. Tag="LastPlayed" />
  380. <RadioButton
  381. Checked="Sort_Checked"
  382. Content="{locale:Locale GameListHeaderFileExtension}"
  383. GroupName="Sort"
  384. IsChecked="{Binding IsSortedByType, Mode=OneTime}"
  385. Tag="FileType" />
  386. <RadioButton
  387. Checked="Sort_Checked"
  388. Content="{locale:Locale GameListHeaderFileSize}"
  389. GroupName="Sort"
  390. IsChecked="{Binding IsSortedBySize, Mode=OneTime}"
  391. Tag="FileSize" />
  392. <RadioButton
  393. Checked="Sort_Checked"
  394. Content="{locale:Locale GameListHeaderPath}"
  395. GroupName="Sort"
  396. IsChecked="{Binding IsSortedByPath, Mode=OneTime}"
  397. Tag="Path" />
  398. </StackPanel>
  399. <Border
  400. Width="60"
  401. Height="2"
  402. Margin="5"
  403. HorizontalAlignment="Stretch"
  404. BorderBrush="White"
  405. BorderThickness="0,1,0,0">
  406. <Separator Height="0" HorizontalAlignment="Stretch" />
  407. </Border>
  408. <RadioButton
  409. Checked="Order_Checked"
  410. Content="{locale:Locale OrderAscending}"
  411. GroupName="Order"
  412. IsChecked="{Binding IsAscending, Mode=OneTime}"
  413. Tag="Ascending" />
  414. <RadioButton
  415. Checked="Order_Checked"
  416. Content="{locale:Locale OrderDescending}"
  417. GroupName="Order"
  418. IsChecked="{Binding !IsAscending, Mode=OneTime}"
  419. Tag="Descending" />
  420. </StackPanel>
  421. </Flyout>
  422. </ui:DropDownButton.Flyout>
  423. </ui:DropDownButton>
  424. <TextBlock
  425. Margin="10,0"
  426. HorizontalAlignment="Right"
  427. VerticalAlignment="Center"
  428. DockPanel.Dock="Right"
  429. Text="{locale:Locale CommonSort}" />
  430. </DockPanel>
  431. <controls:GameListView
  432. x:Name="GameList"
  433. Grid.Row="1"
  434. HorizontalAlignment="Stretch"
  435. VerticalAlignment="Stretch"
  436. HorizontalContentAlignment="Stretch"
  437. VerticalContentAlignment="Stretch"
  438. IsVisible="{Binding IsList}" />
  439. <controls:GameGridView
  440. x:Name="GameGrid"
  441. Grid.Row="1"
  442. HorizontalAlignment="Stretch"
  443. VerticalAlignment="Stretch"
  444. HorizontalContentAlignment="Stretch"
  445. VerticalContentAlignment="Stretch"
  446. IsVisible="{Binding IsGrid}" />
  447. </Grid>
  448. </ContentControl>
  449. <Grid
  450. Grid.Row="1"
  451. HorizontalAlignment="Stretch"
  452. VerticalAlignment="Stretch"
  453. Background="{DynamicResource ThemeContentBackgroundColor}"
  454. IsVisible="{Binding ShowLoadProgress}"
  455. ZIndex="1000">
  456. <Grid
  457. Margin="40"
  458. HorizontalAlignment="Center"
  459. VerticalAlignment="Center"
  460. IsVisible="{Binding ShowLoadProgress}">
  461. <Grid.ColumnDefinitions>
  462. <ColumnDefinition Width="Auto" />
  463. <ColumnDefinition Width="*" />
  464. </Grid.ColumnDefinitions>
  465. <Border
  466. Grid.RowSpan="2"
  467. Grid.Column="0"
  468. Width="256"
  469. Height="256"
  470. Margin="10"
  471. Padding="4"
  472. BorderBrush="Black"
  473. BorderThickness="2"
  474. BoxShadow="4 4 32 8 #40000000"
  475. CornerRadius="3"
  476. IsVisible="{Binding ShowLoadProgress}">
  477. <Image
  478. Width="256"
  479. Height="256"
  480. IsVisible="{Binding ShowLoadProgress}"
  481. Source="{Binding SelectedIcon, Converter={StaticResource ByteImage}}" />
  482. </Border>
  483. <Grid
  484. Grid.Column="1"
  485. HorizontalAlignment="Stretch"
  486. VerticalAlignment="Center"
  487. IsVisible="{Binding ShowLoadProgress}">
  488. <Grid.RowDefinitions>
  489. <RowDefinition Height="Auto" />
  490. <RowDefinition Height="Auto" />
  491. <RowDefinition Height="Auto" />
  492. </Grid.RowDefinitions>
  493. <TextBlock
  494. Grid.Row="0"
  495. Margin="10"
  496. FontSize="30"
  497. FontWeight="Bold"
  498. IsVisible="{Binding ShowLoadProgress}"
  499. Text="{Binding LoadHeading}"
  500. TextAlignment="Left"
  501. TextWrapping="Wrap" />
  502. <Border
  503. Grid.Row="1"
  504. Margin="10"
  505. Padding="0"
  506. HorizontalAlignment="Stretch"
  507. BorderBrush="{Binding ProgressBarBackgroundColor}"
  508. BorderThickness="1"
  509. ClipToBounds="True"
  510. CornerRadius="5"
  511. IsVisible="{Binding ShowLoadProgress}">
  512. <ProgressBar
  513. Height="10"
  514. MinWidth="500"
  515. Margin="0"
  516. Padding="0"
  517. HorizontalAlignment="Stretch"
  518. Background="{Binding ProgressBarBackgroundColor}"
  519. ClipToBounds="True"
  520. CornerRadius="5"
  521. Foreground="{Binding ProgressBarForegroundColor}"
  522. IsIndeterminate="{Binding IsLoadingIndeterminate}"
  523. IsVisible="{Binding ShowLoadProgress}"
  524. Maximum="{Binding ProgressMaximum}"
  525. Minimum="0"
  526. Value="{Binding ProgressValue}" />
  527. </Border>
  528. <TextBlock
  529. Grid.Row="2"
  530. Margin="10"
  531. FontSize="18"
  532. IsVisible="{Binding ShowLoadProgress}"
  533. Text="{Binding CacheLoadStatus}"
  534. TextAlignment="Left" />
  535. </Grid>
  536. </Grid>
  537. </Grid>
  538. <Grid
  539. Name="StatusBar"
  540. Grid.Row="2"
  541. Height="30"
  542. Margin="0,0"
  543. HorizontalAlignment="Stretch"
  544. VerticalAlignment="Bottom"
  545. Background="{DynamicResource ThemeContentBackgroundColor}"
  546. DockPanel.Dock="Bottom"
  547. IsVisible="{Binding ShowMenuAndStatusBar}">
  548. <Grid.ColumnDefinitions>
  549. <ColumnDefinition Width="Auto" />
  550. <ColumnDefinition Width="Auto" />
  551. <ColumnDefinition Width="*" />
  552. <ColumnDefinition Width="Auto" />
  553. </Grid.ColumnDefinitions>
  554. <StackPanel
  555. Grid.Column="0"
  556. Margin="10,0"
  557. VerticalAlignment="Center"
  558. IsVisible="{Binding EnableNonGameRunningControls}">
  559. <Grid Margin="0">
  560. <Grid.ColumnDefinitions>
  561. <ColumnDefinition Width="Auto" />
  562. <ColumnDefinition Width="Auto" />
  563. <ColumnDefinition />
  564. </Grid.ColumnDefinitions>
  565. <Button
  566. Width="25"
  567. Height="25"
  568. MinWidth="0"
  569. Margin="0,0,5,0"
  570. VerticalAlignment="Center"
  571. Background="Transparent"
  572. Command="{ReflectionBinding LoadApplications}">
  573. <ui:SymbolIcon
  574. Width="50"
  575. Height="100"
  576. Symbol="Refresh" />
  577. </Button>
  578. <TextBlock
  579. Name="LoadStatus"
  580. Grid.Column="1"
  581. Margin="0,0,5,0"
  582. VerticalAlignment="Center"
  583. IsVisible="{Binding EnableNonGameRunningControls}"
  584. Text="{locale:Locale StatusBarGamesLoaded}" />
  585. <ProgressBar
  586. Name="LoadProgressBar"
  587. Grid.Column="2"
  588. Height="6"
  589. VerticalAlignment="Center"
  590. Foreground="{DynamicResource HighlightColor}"
  591. IsVisible="{Binding EnableNonGameRunningControls}"
  592. Maximum="{Binding StatusBarProgressMaximum}"
  593. Value="{Binding StatusBarProgressValue}" />
  594. </Grid>
  595. </StackPanel>
  596. <StackPanel
  597. Grid.Column="1"
  598. Margin="10,0"
  599. HorizontalAlignment="Left"
  600. VerticalAlignment="Center"
  601. IsVisible="{Binding IsGameRunning}"
  602. Orientation="Horizontal">
  603. <TextBlock
  604. Name="VsyncStatus"
  605. Margin="0,0,5,0"
  606. HorizontalAlignment="Left"
  607. VerticalAlignment="Center"
  608. Foreground="{Binding VsyncColor}"
  609. IsVisible="{Binding !ShowLoadProgress}"
  610. PointerReleased="VsyncStatus_PointerReleased"
  611. Text="VSync"
  612. TextAlignment="Left" />
  613. <Border
  614. Width="2"
  615. Height="12"
  616. Margin="2,0"
  617. BorderBrush="Gray"
  618. BorderThickness="1"
  619. IsVisible="{Binding !ShowLoadProgress}" />
  620. <TextBlock
  621. Name="DockedStatus"
  622. Margin="5,0,5,0"
  623. HorizontalAlignment="Left"
  624. VerticalAlignment="Center"
  625. IsVisible="{Binding !ShowLoadProgress}"
  626. PointerReleased="DockedStatus_PointerReleased"
  627. Text="{Binding DockedStatusText}"
  628. TextAlignment="Left" />
  629. <Border
  630. Width="2"
  631. Height="12"
  632. Margin="2,0"
  633. BorderBrush="Gray"
  634. BorderThickness="1"
  635. IsVisible="{Binding !ShowLoadProgress}" />
  636. <TextBlock
  637. Name="AspectRatioStatus"
  638. Margin="5,0,5,0"
  639. HorizontalAlignment="Left"
  640. VerticalAlignment="Center"
  641. IsVisible="{Binding !ShowLoadProgress}"
  642. PointerReleased="AspectRatioStatus_PointerReleased"
  643. Text="{Binding AspectRatioStatusText}"
  644. TextAlignment="Left" />
  645. <Border
  646. Width="2"
  647. Height="12"
  648. Margin="2,0"
  649. BorderBrush="Gray"
  650. BorderThickness="1"
  651. IsVisible="{Binding !ShowLoadProgress}" />
  652. <ui:ToggleSplitButton
  653. Name="VolumeStatus"
  654. Margin="-2,0,-3,0"
  655. Padding="5,0,0,5"
  656. HorizontalAlignment="Left"
  657. VerticalAlignment="Center"
  658. Background="{DynamicResource ThemeContentBackgroundColor}"
  659. BorderBrush="{DynamicResource ThemeContentBackgroundColor}"
  660. Content="{Binding VolumeStatusText}"
  661. IsChecked="{Binding VolumeMuted}"
  662. IsVisible="{Binding !ShowLoadProgress}">
  663. <ui:ToggleSplitButton.Flyout>
  664. <Flyout Placement="Bottom" ShowMode="TransientWithDismissOnPointerMoveAway">
  665. <Grid Margin="0">
  666. <Slider
  667. Width="150"
  668. Margin="0"
  669. Padding="0"
  670. IsSnapToTickEnabled="True"
  671. LargeChange="0.05"
  672. Maximum="1"
  673. Minimum="0"
  674. SmallChange="0.01"
  675. TickFrequency="0.05"
  676. ToolTip.Tip="{locale:Locale AudioVolumeTooltip}"
  677. Value="{Binding Volume}" />
  678. </Grid>
  679. </Flyout>
  680. </ui:ToggleSplitButton.Flyout>
  681. </ui:ToggleSplitButton>
  682. <Border
  683. Width="2"
  684. Height="12"
  685. Margin="2,0"
  686. BorderBrush="Gray"
  687. BorderThickness="1"
  688. IsVisible="{Binding !ShowLoadProgress}" />
  689. <TextBlock
  690. Margin="5,0,5,0"
  691. HorizontalAlignment="Left"
  692. VerticalAlignment="Center"
  693. IsVisible="{Binding !ShowLoadProgress}"
  694. Text="{Binding GameStatusText}"
  695. TextAlignment="Left" />
  696. <Border
  697. Width="2"
  698. Height="12"
  699. Margin="2,0"
  700. BorderBrush="Gray"
  701. BorderThickness="1"
  702. IsVisible="{Binding !ShowLoadProgress}" />
  703. <TextBlock
  704. Margin="5,0,5,0"
  705. HorizontalAlignment="Left"
  706. VerticalAlignment="Center"
  707. IsVisible="{Binding !ShowLoadProgress}"
  708. Text="{Binding FifoStatusText}"
  709. TextAlignment="Left" />
  710. <Border
  711. Width="2"
  712. Height="12"
  713. Margin="2,0"
  714. BorderBrush="Gray"
  715. BorderThickness="1"
  716. IsVisible="{Binding !ShowLoadProgress}" />
  717. <TextBlock
  718. Margin="5,0,5,0"
  719. HorizontalAlignment="Left"
  720. VerticalAlignment="Center"
  721. IsVisible="{Binding !ShowLoadProgress}"
  722. Text="{Binding GpuStatusText}"
  723. TextAlignment="Left" />
  724. </StackPanel>
  725. <StackPanel
  726. Grid.Column="3"
  727. Margin="10,0"
  728. VerticalAlignment="Center"
  729. IsVisible="{Binding ShowFirmwareStatus}"
  730. Orientation="Horizontal">
  731. <TextBlock
  732. Name="FirmwareStatus"
  733. Margin="0"
  734. HorizontalAlignment="Right"
  735. VerticalAlignment="Center"
  736. Text="{locale:Locale StatusBarSystemVersion}" />
  737. </StackPanel>
  738. </Grid>
  739. </Grid>
  740. </Grid>
  741. </window:StyleableWindow>