6e02cac952
* remove content dialog placeholder from all windows * remove redundant window argument * redesign user profile window * wip * use avalonia auto name generator * add edit and new user options * move profile image selection to content dialog * remove usings * fix updater * address review * adjust avatar dialog size * add validation for user editor * fix typo * Shorten some labels
55 lines
2.9 KiB
XML
55 lines
2.9 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d"
|
|
Padding="0"
|
|
Margin="0"
|
|
xmlns:Locale="clr-namespace:Ryujinx.Ava.Common.Locale"
|
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.Ui.ViewModels"
|
|
xmlns:models="clr-namespace:Ryujinx.Ava.Ui.Models"
|
|
xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls"
|
|
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
|
x:Class="Ryujinx.Ava.Ui.Controls.UserEditor">
|
|
<UserControl.Resources>
|
|
<controls:BitmapArrayValueConverter x:Key="ByteImage" />
|
|
</UserControl.Resources>
|
|
<Grid Margin="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Left">
|
|
<Image
|
|
Margin="0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Top"
|
|
Height="96" Width="96"
|
|
Name="ProfileImage"
|
|
Source="{Binding Image, Converter={StaticResource ByteImage}}" />
|
|
<Button Margin="5" Content="{Locale:Locale UserProfilesChangeProfileImage}"
|
|
Name="ChangePictureButton"
|
|
Click="ChangePictureButton_Click"
|
|
HorizontalAlignment="Stretch"/>
|
|
<Button Margin="5" Content="{Locale:Locale UserProfilesSetProfileImage}"
|
|
Name="AddPictureButton"
|
|
Click="ChangePictureButton_Click"
|
|
HorizontalAlignment="Stretch"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Stretch" Grid.Column="1" Spacing="10"
|
|
Margin="5, 10">
|
|
<TextBox Name="NameBox" Width="300" Text="{Binding Name}" MaxLength="{Binding MaxProfileNameLength}"
|
|
HorizontalAlignment="Stretch" />
|
|
<TextBlock Text="{Binding UserId}" Name="IdLabel" />
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Orientation="Horizontal" Spacing="10" HorizontalAlignment="Right">
|
|
<Button Content="{Locale:Locale Save}" Name="SaveButton" Click="SaveButton_Click"/>
|
|
<Button HorizontalAlignment="Right" Content="{Locale:Locale Discard}"
|
|
Name="CloseButton" Click="CloseButton_Click"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|