CheatWindow.axaml
1 <window:StyleableWindow 2 x:Class="Ryujinx.Ava.UI.Windows.CheatWindow" 3 xmlns="https://github.com/avaloniaui" 4 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 5 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 6 xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale" 7 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 8 xmlns:model="clr-namespace:Ryujinx.Ava.UI.Models" 9 xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows" 10 Width="500" 11 Height="500" 12 MinWidth="500" 13 MinHeight="500" 14 x:DataType="window:CheatWindow" 15 WindowStartupLocation="CenterOwner" 16 mc:Ignorable="d" 17 Focusable="True"> 18 <Window.Styles> 19 <Style Selector="TreeViewItem"> 20 <Setter Property="IsExpanded" Value="True" /> 21 </Style> 22 </Window.Styles> 23 <Grid Name="CheatGrid" Margin="15"> 24 <Grid.RowDefinitions> 25 <RowDefinition Height="Auto" /> 26 <RowDefinition Height="Auto" /> 27 <RowDefinition Height="Auto" /> 28 <RowDefinition Height="*" /> 29 <RowDefinition Height="Auto" /> 30 </Grid.RowDefinitions> 31 <Grid.ColumnDefinitions> 32 <ColumnDefinition Width="*" /> 33 <ColumnDefinition Width="*" /> 34 </Grid.ColumnDefinitions> 35 <TextBlock 36 Grid.Row="1" 37 Grid.Column="0" 38 Grid.ColumnSpan="2" 39 MaxWidth="500" 40 Margin="20,15,20,5" 41 HorizontalAlignment="Center" 42 VerticalAlignment="Center" 43 LineHeight="18" 44 Text="{Binding Heading}" 45 TextAlignment="Center" 46 TextWrapping="Wrap" /> 47 <TextBlock 48 Grid.Row="2" 49 Grid.Column="0" 50 MaxWidth="500" 51 Margin="140,15,20,5" 52 HorizontalAlignment="Center" 53 VerticalAlignment="Center" 54 LineHeight="30" 55 Text="{locale:Locale BuildId}" 56 TextAlignment="Center" 57 TextWrapping="Wrap" /> 58 <TextBox 59 Grid.Row="2" 60 Grid.Column="1" 61 Margin="0,5,110,5" 62 MinWidth="160" 63 HorizontalAlignment="Center" 64 VerticalAlignment="Center" 65 Text="{Binding BuildId}" 66 IsReadOnly="True" /> 67 <Border 68 Grid.Row="3" 69 Grid.Column="0" 70 Grid.ColumnSpan="2" 71 Margin="5" 72 HorizontalAlignment="Stretch" 73 VerticalAlignment="Stretch" 74 BorderBrush="Gray" 75 BorderThickness="1"> 76 <TreeView 77 Name="CheatsView" 78 MinHeight="300" 79 HorizontalAlignment="Stretch" 80 VerticalAlignment="Stretch" 81 ItemsSource="{Binding LoadedCheats}"> 82 <TreeView.Styles> 83 <Styles> 84 <Style Selector="TreeViewItem:empty /template/ ItemsPresenter"> 85 <Setter Property="IsVisible" Value="False" /> 86 </Style> 87 </Styles> 88 </TreeView.Styles> 89 <TreeView.ItemTemplate> 90 <TreeDataTemplate ItemsSource="{Binding SubNodes}"> 91 <StackPanel HorizontalAlignment="Left" Orientation="Horizontal"> 92 <CheckBox MinWidth="20" IsChecked="{Binding IsEnabled}" /> 93 <TextBlock Width="150" Text="{Binding CleanName}" IsVisible="{Binding !IsRootNode}" /> 94 <TextBlock Width="150" Text="{Binding BuildId}" IsVisible="{Binding IsRootNode}" /> 95 <TextBlock Text="{Binding Path}" IsVisible="{Binding IsRootNode}" /> 96 </StackPanel> 97 </TreeDataTemplate> 98 </TreeView.ItemTemplate> 99 </TreeView> 100 </Border> 101 <DockPanel 102 Grid.Row="4" 103 Grid.Column="0" 104 Grid.ColumnSpan="2" 105 Margin="0" 106 HorizontalAlignment="Stretch"> 107 <DockPanel Margin="0" HorizontalAlignment="Right"> 108 <Button 109 Name="SaveButton" 110 MinWidth="90" 111 Margin="5" 112 Command="{Binding Save}" 113 IsVisible="{Binding !NoCheatsFound}"> 114 <TextBlock Text="{locale:Locale SettingsButtonSave}" /> 115 </Button> 116 <Button 117 Name="CancelButton" 118 MinWidth="90" 119 Margin="5" 120 Command="{Binding Close}"> 121 <TextBlock Text="{locale:Locale InputDialogCancel}" /> 122 </Button> 123 </DockPanel> 124 </DockPanel> 125 </Grid> 126 </window:StyleableWindow>