aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Ava/Ui/Controls/UserEditor.axaml
blob: fed5f8cb2db5b6039b870c04ecadc5d885178b30 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<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>