/ src / Ryujinx / UI / Views / User / UserRecovererView.axaml
UserRecovererView.axaml
 1  <UserControl
 2      xmlns="https://github.com/avaloniaui"
 3      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 4      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 5      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 6      mc:Ignorable="d"
 7      d:DesignWidth="550"
 8      d:DesignHeight="450"
 9      Width="500"
10      Height="400"
11      xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
12      xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
13      xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
14      x:Class="Ryujinx.Ava.UI.Views.User.UserRecovererView"
15      x:DataType="viewModels:UserProfileViewModel"
16      Focusable="True">
17      <Design.DataContext>
18          <viewModels:UserProfileViewModel />
19      </Design.DataContext>
20      <Grid HorizontalAlignment="Stretch"
21            VerticalAlignment="Stretch">
22          <Grid.RowDefinitions>
23              <RowDefinition/>
24              <RowDefinition Height="Auto"/>
25          </Grid.RowDefinitions>
26          <Border
27              CornerRadius="5"
28              BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
29              BorderThickness="1"
30              Grid.Row="0">
31              <Panel>
32                  <ListBox
33                      HorizontalAlignment="Stretch"
34                      VerticalAlignment="Stretch"
35                      ItemsSource="{Binding LostProfiles}">
36                      <ListBox.ItemTemplate>
37                          <DataTemplate>
38                              <Border
39                                  Margin="2"
40                                  HorizontalAlignment="Stretch"
41                                  VerticalAlignment="Stretch"
42                                  ClipToBounds="True"
43                                  CornerRadius="5">
44                                  <Grid Margin="0">
45                                      <Grid.ColumnDefinitions>
46                                          <ColumnDefinition/>
47                                          <ColumnDefinition Width="Auto"/>
48                                      </Grid.ColumnDefinitions>
49                                      <TextBlock
50                                          HorizontalAlignment="Stretch"
51                                          Text="{Binding UserId}"
52                                          TextAlignment="Start"
53                                          TextWrapping="Wrap" />
54                                      <Button Grid.Column="1"
55                                              HorizontalAlignment="Right"
56                                              Click="Recover"
57                                              CommandParameter="{Binding}"
58                                              Content="{locale:Locale Recover}"/>
59                                  </Grid>
60                              </Border>
61                          </DataTemplate>
62                      </ListBox.ItemTemplate>
63                  </ListBox>
64                  <TextBlock
65                      IsVisible="{Binding IsEmpty}"
66                      TextAlignment="Center"
67                      Text="{locale:Locale UserProfilesRecoverEmptyList}"/>
68              </Panel>
69          </Border>
70          <StackPanel
71              Grid.Row="1"
72              Margin="0 24 0 0"
73              Orientation="Horizontal">
74              <Button
75                  Width="50"
76                  MinWidth="50"
77                  Click="GoBack">
78                  <ui:SymbolIcon Symbol="Back"/>
79              </Button>
80          </StackPanel>
81      </Grid>
82  </UserControl>