UserRecoverer.axaml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d"
  6. d:DesignWidth="800"
  7. d:DesignHeight="450"
  8. MinWidth="500"
  9. MinHeight="400"
  10. xmlns:Locale="clr-namespace:Ryujinx.Ava.Common.Locale"
  11. xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
  12. xmlns:viewModels="clr-namespace:Ryujinx.Ava.Ui.ViewModels"
  13. x:Class="Ryujinx.Ava.Ui.Controls.UserRecoverer"
  14. Focusable="True">
  15. <Design.DataContext>
  16. <viewModels:UserProfileViewModel />
  17. </Design.DataContext>
  18. <Grid HorizontalAlignment="Stretch"
  19. VerticalAlignment="Stretch">
  20. <Grid.RowDefinitions>
  21. <RowDefinition Height="Auto"/>
  22. <RowDefinition Height="Auto"/>
  23. <RowDefinition/>
  24. </Grid.RowDefinitions>
  25. <Button Grid.Row="0"
  26. Margin="5"
  27. Height="30"
  28. Width="50"
  29. MinWidth="50"
  30. HorizontalAlignment="Left"
  31. Command="{Binding GoBack}">
  32. <ui:SymbolIcon Symbol="Back"/>
  33. </Button>
  34. <TextBlock Grid.Row="1"
  35. Text="{Locale:Locale UserProfilesRecoverHeading}"/>
  36. <ListBox
  37. Margin="5"
  38. Grid.Row="2"
  39. HorizontalAlignment="Stretch"
  40. VerticalAlignment="Stretch"
  41. Items="{Binding LostProfiles}">
  42. <ListBox.ItemTemplate>
  43. <DataTemplate>
  44. <Border
  45. Margin="2"
  46. HorizontalAlignment="Stretch"
  47. VerticalAlignment="Stretch"
  48. ClipToBounds="True"
  49. CornerRadius="5">
  50. <Grid Margin="0">
  51. <Grid.ColumnDefinitions>
  52. <ColumnDefinition/>
  53. <ColumnDefinition Width="Auto"/>
  54. </Grid.ColumnDefinitions>
  55. <TextBlock
  56. HorizontalAlignment="Stretch"
  57. Text="{Binding UserId}"
  58. TextAlignment="Left"
  59. TextWrapping="Wrap" />
  60. <Button Grid.Column="1"
  61. HorizontalAlignment="Right"
  62. Command="{Binding Recover}"
  63. CommandParameter="{Binding}"
  64. Content="{Locale:Locale Recover}"/>
  65. </Grid>
  66. </Border>
  67. </DataTemplate>
  68. </ListBox.ItemTemplate>
  69. </ListBox>
  70. </Grid>
  71. </UserControl>