/ src / Ryujinx / UI / Windows / DownloadableContentManagerWindow.axaml
DownloadableContentManagerWindow.axaml
  1  <UserControl
  2      x:Class="Ryujinx.Ava.UI.Windows.DownloadableContentManagerWindow"
  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:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
  9      xmlns:models="clr-namespace:Ryujinx.Ava.UI.Models"
 10      xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
 11      Width="500"
 12      Height="380"
 13      mc:Ignorable="d"
 14      x:DataType="viewModels:DownloadableContentManagerViewModel"
 15      Focusable="True">
 16      <Grid>
 17          <Grid.RowDefinitions>
 18              <RowDefinition Height="Auto" />
 19              <RowDefinition Height="*" />
 20              <RowDefinition Height="Auto" />
 21          </Grid.RowDefinitions>
 22          <Panel
 23              Margin="0 0 0 10"
 24              Grid.Row="0">
 25              <Grid>
 26                  <Grid.ColumnDefinitions>
 27                      <ColumnDefinition Width="Auto" />
 28                      <ColumnDefinition Width="Auto" />
 29                      <ColumnDefinition Width="*" />
 30                  </Grid.ColumnDefinitions>
 31                  <TextBlock
 32                      Grid.Column="0"
 33                      Text="{Binding UpdateCount}" />
 34                  <StackPanel
 35                      Margin="10 0"
 36                      Grid.Column="1"
 37                      Orientation="Horizontal">
 38                      <Button
 39                          Name="EnableAllButton"
 40                          MinWidth="90"
 41                          Margin="5"
 42                          Command="{Binding EnableAll}">
 43                          <TextBlock Text="{locale:Locale DlcManagerEnableAllButton}" />
 44                      </Button>
 45                      <Button
 46                          Name="DisableAllButton"
 47                          MinWidth="90"
 48                          Margin="5"
 49                          Command="{Binding DisableAll}">
 50                          <TextBlock Text="{locale:Locale DlcManagerDisableAllButton}" />
 51                      </Button>
 52                  </StackPanel>
 53                  <TextBox
 54                      Grid.Column="2"
 55                      MinHeight="29"
 56                      MaxHeight="29"
 57                      HorizontalAlignment="Stretch"
 58                      Watermark="{locale:Locale Search}"
 59                      Text="{Binding Search}" />
 60              </Grid>
 61          </Panel>
 62          <Border
 63              Grid.Row="1"
 64              Margin="0 0 0 24"
 65              HorizontalAlignment="Stretch"
 66              VerticalAlignment="Stretch"
 67              BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
 68              BorderThickness="1"
 69              CornerRadius="5"
 70              Padding="2.5">
 71              <ListBox
 72                  AutoScrollToSelectedItem="False"
 73                  SelectionMode="Multiple, Toggle"
 74                  Background="Transparent"
 75                  SelectionChanged="OnSelectionChanged"
 76                  SelectedItems="{Binding SelectedDownloadableContents, Mode=TwoWay}"
 77                  ItemsSource="{Binding Views}">
 78                  <ListBox.DataTemplates>
 79                      <DataTemplate
 80                          DataType="models:DownloadableContentModel">
 81                          <Panel Margin="10">
 82                              <Grid>
 83                                  <Grid.ColumnDefinitions>
 84                                      <ColumnDefinition Width="*" />
 85                                      <ColumnDefinition Width="Auto" />
 86                                  </Grid.ColumnDefinitions>
 87                                  <Grid
 88                                      Grid.Column="0">
 89                                      <Grid.ColumnDefinitions>
 90                                          <ColumnDefinition Width="*" />
 91                                          <ColumnDefinition Width="Auto" />
 92                                      </Grid.ColumnDefinitions>
 93                                      <TextBlock
 94                                          Grid.Column="0"
 95                                          HorizontalAlignment="Left"
 96                                          VerticalAlignment="Center"
 97                                          MaxLines="2"
 98                                          TextWrapping="Wrap"
 99                                          TextTrimming="CharacterEllipsis"
100                                          Text="{Binding Label}" />
101                                      <TextBlock
102                                          Grid.Column="1"
103                                          Margin="10 0"
104                                          HorizontalAlignment="Left"
105                                          VerticalAlignment="Center"
106                                          Text="{Binding TitleId}" />
107                                  </Grid>
108                                  <StackPanel
109                                      Grid.Column="1"
110                                      Spacing="10"
111                                      Orientation="Horizontal"
112                                      HorizontalAlignment="Right">
113                                      <Button
114                                          VerticalAlignment="Center"
115                                          HorizontalAlignment="Right"
116                                          Padding="10"
117                                          MinWidth="0"
118                                          MinHeight="0"
119                                          Click="OpenLocation">
120                                          <ui:SymbolIcon
121                                              Symbol="OpenFolder"
122                                              HorizontalAlignment="Center"
123                                              VerticalAlignment="Center" />
124                                      </Button>
125                                      <Button
126                                          VerticalAlignment="Center"
127                                          HorizontalAlignment="Right"
128                                          Padding="10"
129                                          MinWidth="0"
130                                          MinHeight="0"
131                                          Click="RemoveDLC">
132                                          <ui:SymbolIcon
133                                              Symbol="Cancel"
134                                              HorizontalAlignment="Center"
135                                              VerticalAlignment="Center" />
136                                      </Button>
137                                  </StackPanel>
138                              </Grid>
139                          </Panel>
140                      </DataTemplate>
141                  </ListBox.DataTemplates>
142                  <ListBox.Styles>
143                      <Style Selector="ListBoxItem">
144                          <Setter Property="Background" Value="Transparent" />
145                      </Style>
146                  </ListBox.Styles>
147              </ListBox>
148          </Border>
149          <Panel
150              Grid.Row="2"
151              HorizontalAlignment="Stretch">
152              <StackPanel
153                  Orientation="Horizontal"
154                  Spacing="10"
155                  HorizontalAlignment="Left">
156                  <Button
157                      Name="AddButton"
158                      MinWidth="90"
159                      Margin="5"
160                      Command="{Binding Add}">
161                      <TextBlock Text="{locale:Locale SettingsTabGeneralAdd}" />
162                  </Button>
163                  <Button
164                      Name="RemoveAllButton"
165                      MinWidth="90"
166                      Margin="5"
167                      Command="{Binding RemoveAll}">
168                      <TextBlock Text="{locale:Locale DlcManagerRemoveAllButton}" />
169                  </Button>
170              </StackPanel>
171              <StackPanel
172                  Orientation="Horizontal"
173                  Spacing="10"
174                  HorizontalAlignment="Right">
175                  <Button
176                      Name="SaveButton"
177                      MinWidth="90"
178                      Margin="5"
179                      Click="SaveAndClose">
180                      <TextBlock Text="{locale:Locale SettingsButtonSave}" />
181                  </Button>
182                  <Button
183                      Name="CancelButton"
184                      MinWidth="90"
185                      Margin="5"
186                      Click="Close">
187                      <TextBlock Text="{locale:Locale InputDialogCancel}" />
188                  </Button>
189              </StackPanel>
190          </Panel>
191      </Grid>
192  </UserControl>