Merge branch 'ui-userprofiles-and-misc' into 'master'

UI: User Profiles + General Fixes

See merge request [ryubing/ryujinx!173](https://git.ryujinx.app/ryubing/ryujinx/-/merge_requests/173)
This commit is contained in:
Neo 2025-12-07 03:59:12 -06:00
commit 31a0b016bf
16 changed files with 619 additions and 793 deletions

File diff suppressed because it is too large Load diff

View file

@ -16,14 +16,8 @@
<Design.DataContext> <Design.DataContext>
<viewModels:ProfileSelectorDialogViewModel /> <viewModels:ProfileSelectorDialogViewModel />
</Design.DataContext> </Design.DataContext>
<Grid Margin="10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RowDefinitions="*,Auto">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RowDefinitions="*,Auto"> <StackPanel>
<Border
CornerRadius="5"
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
BorderThickness="1">
<ListBox <ListBox
MaxHeight="300" MaxHeight="300"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@ -31,7 +25,6 @@
Background="Transparent" Background="Transparent"
ItemsSource="{Binding Profiles}" ItemsSource="{Binding Profiles}"
SelectionChanged="ProfilesList_SelectionChanged"> SelectionChanged="ProfilesList_SelectionChanged">
<ListBox.ItemsPanel> <ListBox.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel <WrapPanel
@ -40,17 +33,15 @@
Orientation="Horizontal" /> Orientation="Horizontal" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ListBox.ItemsPanel> </ListBox.ItemsPanel>
<ListBox.Styles> <ListBox.Styles>
<Style Selector="ListBoxItem"> <Style Selector="ListBoxItem">
<Setter Property="Margin" Value="5 5 0 5" /> <Setter Property="Margin" Value="5,0,0,0" />
<Setter Property="CornerRadius" Value="5" /> <Setter Property="CornerRadius" Value="5" />
</Style> </Style>
<Style Selector="Rectangle#SelectionIndicator"> <Style Selector="Rectangle#SelectionIndicator">
<Setter Property="Opacity" Value="0" /> <Setter Property="Opacity" Value="0" />
</Style> </Style>
</ListBox.Styles> </ListBox.Styles>
<ListBox.DataTemplates> <ListBox.DataTemplates>
<DataTemplate <DataTemplate
DataType="models:UserProfile"> DataType="models:UserProfile">
@ -58,6 +49,7 @@
PointerEntered="Grid_PointerEntered" PointerEntered="Grid_PointerEntered"
PointerExited="Grid_OnPointerExited"> PointerExited="Grid_OnPointerExited">
<Border <Border
Margin="5"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
ClipToBounds="True" ClipToBounds="True"
@ -69,37 +61,26 @@
<Image <Image
Width="96" Width="96"
Height="96" Height="96"
Margin="0,0,0,10"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Top" VerticalAlignment="Top"
Source="{Binding Image, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" /> Source="{Binding Image, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
<TextBlock <TextBlock
HorizontalAlignment="Stretch"
MaxWidth="90"
Text="{Binding Name}" Text="{Binding Name}"
Height="30"
MaxWidth="90"
TextAlignment="Center" TextAlignment="Center"
TextWrapping="Wrap" HorizontalAlignment="Center"
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
MaxLines="2" TextWrapping="Wrap"
Margin="5" /> MaxLines="2" />
</StackPanel> </StackPanel>
</Border> </Border>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
<DataTemplate
DataType="viewModels:BaseModel">
<Panel
Height="118"
Width="96">
<Panel.Styles>
<Style Selector="Panel">
<Setter Property="Background" Value="{DynamicResource ListBoxBackground}" />
</Style>
</Panel.Styles>
</Panel>
</DataTemplate>
</ListBox.DataTemplates> </ListBox.DataTemplates>
</ListBox> </ListBox>
</Border> </StackPanel>
</Grid> </Grid>
</UserControl> </UserControl>

View file

@ -13,7 +13,7 @@
<MenuItem <MenuItem
Command="{Binding ToggleFavorite}" Command="{Binding ToggleFavorite}"
CommandParameter="{Binding}" CommandParameter="{Binding}"
Header="{ext:Locale GameListContextMenuToggleFavorite}" Header="{Binding FavoriteStatusText}"
Icon="{ext:Icon fa-solid fa-star}" /> Icon="{ext:Icon fa-solid fa-star}" />
<MenuItem <MenuItem
Command="{Binding CreateApplicationShortcut}" Command="{Binding CreateApplicationShortcut}"

View file

@ -166,7 +166,7 @@ namespace Ryujinx.Ava.UI.Controls
UserResult result = await ContentDialogHelper.CreateConfirmationDialog( UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
LocaleManager.Instance[LocaleKeys.DialogUserProfileDeletionConfirmMessage], LocaleManager.Instance[LocaleKeys.DialogUserProfileDeletionConfirmMessage],
string.Empty, LocaleManager.Instance[LocaleKeys.IrreversibleActionNote],
LocaleManager.Instance[LocaleKeys.InputDialogYes], LocaleManager.Instance[LocaleKeys.InputDialogYes],
LocaleManager.Instance[LocaleKeys.InputDialogNo], LocaleManager.Instance[LocaleKeys.InputDialogNo],
string.Empty); string.Empty);

View file

@ -2091,6 +2091,8 @@ namespace Ryujinx.Ava.UI.ViewModels
} }
); );
public string FavoriteStatusText => SelectedApplication?.Favorite == false ? LocaleManager.Instance[LocaleKeys.GameListContextMenuAddToFavorites] : LocaleManager.Instance[LocaleKeys.GameListContextMenuRemoveFromFavorites];
public static RelayCommand<MainWindowViewModel> CreateApplicationShortcut { get; } = public static RelayCommand<MainWindowViewModel> CreateApplicationShortcut { get; } =
Commands.CreateConditional<MainWindowViewModel>(vm => vm?.SelectedApplication != null, Commands.CreateConditional<MainWindowViewModel>(vm => vm?.SelectedApplication != null,
viewModel => ShortcutHelper.CreateAppShortcut( viewModel => ShortcutHelper.CreateAppShortcut(

View file

@ -1,7 +1,7 @@
using Ryujinx.Ava.UI.Models; using Ryujinx.Ava.UI.Models;
using System; using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq; using System.Collections.Specialized;
namespace Ryujinx.Ava.UI.ViewModels namespace Ryujinx.Ava.UI.ViewModels
{ {
@ -9,20 +9,35 @@ namespace Ryujinx.Ava.UI.ViewModels
{ {
public UserProfileViewModel() public UserProfileViewModel()
{ {
Profiles = []; Profiles = new ObservableCollection<BaseModel>();
LostProfiles = []; LostProfiles = new ObservableCollection<UserProfile>();
IsEmpty = !LostProfiles.Any(); LostProfiles.CollectionChanged += LostProfilesChanged;
} }
public ObservableCollection<BaseModel> Profiles { get; set; } public ObservableCollection<BaseModel> Profiles { get; }
public ObservableCollection<UserProfile> LostProfiles { get; set; } public ObservableCollection<UserProfile> LostProfiles { get; }
public bool IsEmpty { get; set; } public bool IsEmpty => LostProfiles.Count == 0;
public void Dispose() public void Dispose()
{ {
GC.SuppressFinalize(this); LostProfiles.CollectionChanged -= LostProfilesChanged;
}
private void LostProfilesChanged(object sender, NotifyCollectionChangedEventArgs e)
{
OnPropertyChanged(nameof(IsEmpty));
}
public void UpdateLostProfiles(ObservableCollection<UserProfile> newProfiles)
{
LostProfiles.Clear();
foreach (var profile in newProfiles)
LostProfiles.Add(profile);
OnPropertyChanged(nameof(IsEmpty));
} }
} }
} }

View file

@ -27,7 +27,7 @@ namespace Ryujinx.Ava.UI.Views.Dialog
{ {
PrimaryButtonText = string.Empty, PrimaryButtonText = string.Empty,
SecondaryButtonText = string.Empty, SecondaryButtonText = string.Empty,
CloseButtonText = LocaleManager.Instance[LocaleKeys.UserProfilesClose], CloseButtonText = LocaleManager.Instance[LocaleKeys.SettingsButtonClose],
Content = new AboutView { ViewModel = viewModel } Content = new AboutView { ViewModel = viewModel }
}; };

View file

@ -14,7 +14,7 @@
mc:Ignorable="d" mc:Ignorable="d"
Focusable="True" Focusable="True"
x:DataType="models:TempProfile"> x:DataType="models:TempProfile">
<Grid Margin="0" ColumnDefinitions="Auto,*" RowDefinitions="*,Auto"> <Grid Margin="10" ColumnDefinitions="Auto,*" RowDefinitions="*,Auto">
<StackPanel <StackPanel
Grid.Row="0" Grid.Row="0"
Grid.Column="0" Grid.Column="0"
@ -48,9 +48,9 @@
BorderThickness="1"> BorderThickness="1">
<Panel> <Panel>
<ui:SymbolIcon <ui:SymbolIcon
FontSize="60" FontSize="70"
Width="96" Width="115"
Height="96" Height="115"
Margin="0" Margin="0"
Foreground="{DynamicResource AppListHoverBackgroundColor}" Foreground="{DynamicResource AppListHoverBackgroundColor}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@ -58,8 +58,8 @@
Symbol="Camera" /> Symbol="Camera" />
<Image <Image
Name="ProfileImage" Name="ProfileImage"
Width="96" Width="115"
Height="96" Height="115"
Margin="0" Margin="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Top" VerticalAlignment="Top"
@ -73,7 +73,7 @@
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Orientation="Horizontal" Orientation="Horizontal"
Margin="0 24 0 0" Margin="0,30,0,0"
Spacing="10"> Spacing="10">
<Button <Button
Width="50" Width="50"
@ -88,7 +88,7 @@
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Orientation="Horizontal" Orientation="Horizontal"
Margin="0 24 0 0" Margin="0,30,0,0"
Spacing="10"> Spacing="10">
<Button <Button
Name="DeleteButton" Name="DeleteButton"
@ -108,7 +108,7 @@
<Button <Button
Name="SaveButton" Name="SaveButton"
Click="SaveButton_Click"> Click="SaveButton_Click">
<TextBlock Text="{ext:Locale UserProfilesSetProfileImage}" /> <TextBlock Text="{ext:Locale Save}" />
</Button> </Button>
</StackPanel> </StackPanel>
</Grid> </Grid>

View file

@ -17,10 +17,9 @@ namespace Ryujinx.Ava.UI.Views.User
private NavigationDialogHost _parent; private NavigationDialogHost _parent;
private UserProfile _profile; private UserProfile _profile;
private bool _isNewUser; private bool _isNewUser;
public static uint MaxProfileNameLength => 0x20; public static uint MaxProfileNameLength => 0x20;
public bool IsDeletable => _profile.UserId != AccountManager.DefaultUserId; public bool IsDeletable => _profile.UserId != AccountManager.DefaultUserId;
public string UserEditorTitle => LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.UserEditorTitle, _profile.Name);
public UserEditorView() public UserEditorView()
{ {
InitializeComponent(); InitializeComponent();
@ -47,7 +46,7 @@ namespace Ryujinx.Ava.UI.Views.User
} }
((ContentDialog)_parent.Parent).Title = $"{LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle]} - " + ((ContentDialog)_parent.Parent).Title = $"{LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle]} - " +
$"{(_isNewUser ? LocaleManager.Instance[LocaleKeys.UserEditorTitleCreate] : LocaleManager.Instance[LocaleKeys.UserEditorTitle])}"; $"{(_isNewUser ? LocaleManager.Instance[LocaleKeys.UserEditorTitleNewUser] : UserEditorTitle)}";
AddPictureButton.IsVisible = _isNewUser; AddPictureButton.IsVisible = _isNewUser;
ChangePictureButton.IsVisible = !_isNewUser; ChangePictureButton.IsVisible = !_isNewUser;

View file

@ -18,7 +18,7 @@
<viewModels:UserFirmwareAvatarSelectorViewModel /> <viewModels:UserFirmwareAvatarSelectorViewModel />
</Design.DataContext> </Design.DataContext>
<Grid <Grid
Margin="0" Margin="10"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" RowDefinitions="Auto,*,Auto,Auto"> VerticalAlignment="Stretch" RowDefinitions="Auto,*,Auto,Auto">
<ListBox <ListBox
@ -62,12 +62,12 @@
Grid.Row="3" Grid.Row="3"
Orientation="Horizontal" Orientation="Horizontal"
Spacing="10" Spacing="10"
Margin="0 24 0 0" Margin="0,30,0,0"
HorizontalAlignment="Left"> HorizontalAlignment="Left">
<Button <Button
Width="50" Width="50"
MinWidth="50" MinWidth="50"
Height="35" Height="37"
Click="GoBack"> Click="GoBack">
<ui:SymbolIcon Symbol="Back" /> <ui:SymbolIcon Symbol="Back" />
</Button> </Button>
@ -76,7 +76,7 @@
Grid.Row="3" Grid.Row="3"
Orientation="Horizontal" Orientation="Horizontal"
Spacing="10" Spacing="10"
Margin="0 24 0 0" Margin="0,30,0,0"
HorizontalAlignment="Right"> HorizontalAlignment="Right">
<ui:ColorPickerButton <ui:ColorPickerButton
FlyoutPlacement="Top" FlyoutPlacement="Top"
@ -96,9 +96,10 @@
</ui:ColorPickerButton> </ui:ColorPickerButton>
<Button <Button
Content="{ext:Locale AvatarChoose}" Content="{ext:Locale AvatarChoose}"
Height="35" Height="37"
Name="ChooseButton" Click="ChooseButton_OnClick">
Click="ChooseButton_OnClick" /> <TextBlock Text="{ext:Locale AvatarChoose}" />
</Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
</UserControl> </UserControl>

View file

@ -15,7 +15,7 @@
<Design.DataContext> <Design.DataContext>
<viewModles:UserProfileImageSelectorViewModel /> <viewModles:UserProfileImageSelectorViewModel />
</Design.DataContext> </Design.DataContext>
<Grid <Grid Margin="10"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" RowDefinitions="Auto,70,Auto"> VerticalAlignment="Center" RowDefinitions="Auto,70,Auto">
<TextBlock <TextBlock

View file

@ -64,6 +64,7 @@ namespace Ryujinx.Ava.UI.Views.User
{ {
IReadOnlyList<IStorageFile> result = await ((Window)this.GetVisualRoot()!).StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions IReadOnlyList<IStorageFile> result = await ((Window)this.GetVisualRoot()!).StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
{ {
Title = LocaleManager.Instance[LocaleKeys.LoadSupportedImageFormatDialogTitle],
AllowMultiple = false, AllowMultiple = false,
FileTypeFilter = new List<FilePickerFileType> FileTypeFilter = new List<FilePickerFileType>
{ {
@ -73,6 +74,30 @@ namespace Ryujinx.Ava.UI.Views.User
AppleUniformTypeIdentifiers = ["public.jpeg", "public.png", "com.microsoft.bmp"], AppleUniformTypeIdentifiers = ["public.jpeg", "public.png", "com.microsoft.bmp"],
MimeTypes = ["image/jpeg", "image/png", "image/bmp"], MimeTypes = ["image/jpeg", "image/png", "image/bmp"],
}, },
new("JPG")
{
Patterns = ["*.jpg"],
AppleUniformTypeIdentifiers = ["public.jpeg"],
MimeTypes = ["image/jpeg"],
},
new("JPEG")
{
Patterns = ["*.jpeg"],
AppleUniformTypeIdentifiers = ["public.jpeg"],
MimeTypes = ["image/jpeg"],
},
new("PNG")
{
Patterns = ["*.png"],
AppleUniformTypeIdentifiers = ["public.png"],
MimeTypes = ["image/png"],
},
new("BMP")
{
Patterns = ["*.bmp"],
AppleUniformTypeIdentifiers = ["com.microsoft.bmp"],
MimeTypes = ["image/bmp"],
},
}, },
}); });

View file

@ -17,37 +17,49 @@
<Design.DataContext> <Design.DataContext>
<viewModels:UserProfileViewModel /> <viewModels:UserProfileViewModel />
</Design.DataContext> </Design.DataContext>
<Grid HorizontalAlignment="Stretch" <Grid Margin="10" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" RowDefinitions="*,Auto"> VerticalAlignment="Stretch" RowDefinitions="*,Auto">
<Border <Border
CornerRadius="5" CornerRadius="5"
BorderBrush="{DynamicResource AppListHoverBackgroundColor}" BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
BorderThickness="1" BorderThickness="1"
Grid.Row="0"> Grid.Row="0"
Padding="2.5">
<Panel> <Panel>
<ListBox <ListBox
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
ItemsSource="{Binding LostProfiles}"> ItemsSource="{Binding LostProfiles}">
<ListBox.Styles>
<Style Selector="ListBoxItem">
<Setter Property="Padding" Value="10" />
<Setter Property="Margin" Value="0" />
</Style>
<Style Selector="ListBoxItem:selected /template/ Rectangle#SelectionIndicator">
<Setter Property="IsVisible" Value="False" />
</Style>
</ListBox.Styles>
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<Border <Border
Margin="2"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
ClipToBounds="True" ClipToBounds="True"
CornerRadius="5"> CornerRadius="4">
<Grid Margin="0" ColumnDefinitions="*,Auto"> <Grid Margin="0" ColumnDefinitions="*,Auto">
<TextBlock <TextBlock
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Margin="5"
Text="{Binding UserId}" Text="{Binding UserId}"
TextAlignment="Start" TextAlignment="Start"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<Button Grid.Column="1" <Button Grid.Column="1"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Click="Recover" Margin="5"
CommandParameter="{Binding}" Command="{Binding Recover}"
Content="{ext:Locale Recover}"/> CommandParameter="{Binding}">
<TextBlock Text="{ext:Locale Recover}" />
</Button>
</Grid> </Grid>
</Border> </Border>
</DataTemplate> </DataTemplate>
@ -61,7 +73,7 @@
</Border> </Border>
<StackPanel <StackPanel
Grid.Row="1" Grid.Row="1"
Margin="0 24 0 0" Margin="0,30,0,0"
Orientation="Horizontal"> Orientation="Horizontal">
<Button <Button
Width="50" Width="50"

View file

@ -27,6 +27,7 @@ namespace Ryujinx.Ava.UI.Views.User
switch (arg.NavigationMode) switch (arg.NavigationMode)
{ {
case NavigationMode.New: case NavigationMode.New:
case NavigationMode.Back:
NavigationDialogHost parent = (NavigationDialogHost)arg.Parameter; NavigationDialogHost parent = (NavigationDialogHost)arg.Parameter;
_parent = parent; _parent = parent;
@ -42,10 +43,5 @@ namespace Ryujinx.Ava.UI.Views.User
{ {
_parent?.GoBack(); _parent?.GoBack();
} }
private void Recover(object sender, RoutedEventArgs e)
{
_parent?.RecoverLostAccounts();
}
} }
} }

View file

@ -19,12 +19,12 @@
<Design.DataContext> <Design.DataContext>
<viewModels:UserSaveManagerViewModel /> <viewModels:UserSaveManagerViewModel />
</Design.DataContext> </Design.DataContext>
<Grid RowDefinitions="Auto,*,Auto"> <Grid Margin="10" RowDefinitions="Auto,*,Auto">
<Grid <Grid
Grid.Row="0" Grid.Row="0"
Margin="0,0,0,5"
HorizontalAlignment="Stretch" ColumnDefinitions="Auto,*"> HorizontalAlignment="Stretch" ColumnDefinitions="Auto,*">
<StackPanel <StackPanel
Margin="0,0,0,10"
Spacing="10" Spacing="10"
Orientation="Horizontal" Orientation="Horizontal"
HorizontalAlignment="Left" HorizontalAlignment="Left"
@ -59,18 +59,18 @@
<Grid <Grid
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Margin="10,0, 0, 0" ColumnDefinitions="Auto,*"> Margin="20,0,0,10" ColumnDefinitions="Auto,*">
<TextBlock Text="{ext:Locale Search}" VerticalAlignment="Center" />
<TextBox <TextBox
Margin="10,0,0,0" Margin="5,0,0,0"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Text="{Binding Search}" /> Text="{Binding Search}"
Watermark="{ext:Locale Search}" />
</Grid> </Grid>
</Grid> </Grid>
<Border <Border
Grid.Row="1" Grid.Row="1"
Margin="0,5" Padding="2.5"
BorderThickness="1" BorderThickness="1"
BorderBrush="{DynamicResource AppListHoverBackgroundColor}" BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
CornerRadius="5" CornerRadius="5"
@ -84,7 +84,7 @@
<ListBox.Styles> <ListBox.Styles>
<Style Selector="ListBoxItem"> <Style Selector="ListBoxItem">
<Setter Property="Padding" Value="10" /> <Setter Property="Padding" Value="10" />
<Setter Property="Margin" Value="5" /> <Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="4" /> <Setter Property="CornerRadius" Value="4" />
</Style> </Style>
<Style Selector="ListBoxItem:selected /template/ Rectangle#SelectionIndicator"> <Style Selector="ListBoxItem:selected /template/ Rectangle#SelectionIndicator">
@ -168,7 +168,7 @@
</Border> </Border>
<StackPanel <StackPanel
Grid.Row="2" Grid.Row="2"
Margin="0 24 0 0" Margin="0,30,0,0"
Orientation="Horizontal"> Orientation="Horizontal">
<Button <Button
Width="50" Width="50"

View file

@ -18,14 +18,11 @@
<Design.DataContext> <Design.DataContext>
<viewModels:UserProfileViewModel /> <viewModels:UserProfileViewModel />
</Design.DataContext> </Design.DataContext>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RowDefinitions="*,Auto"> <Grid Margin="10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RowDefinitions="*,Auto">
<Border <StackPanel>
CornerRadius="5"
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
BorderThickness="1">
<ListBox <ListBox
MaxHeight="300" MaxHeight="300"
HorizontalAlignment="Stretch" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
SelectionChanged="ProfilesList_SelectionChanged" SelectionChanged="ProfilesList_SelectionChanged"
Background="Transparent" Background="Transparent"
@ -40,7 +37,7 @@
</ListBox.ItemsPanel> </ListBox.ItemsPanel>
<ListBox.Styles> <ListBox.Styles>
<Style Selector="ListBoxItem"> <Style Selector="ListBoxItem">
<Setter Property="Margin" Value="5 5 0 5" /> <Setter Property="Margin" Value="5,0,0,0" />
<Setter Property="CornerRadius" Value="5" /> <Setter Property="CornerRadius" Value="5" />
</Style> </Style>
<Style Selector="Rectangle#SelectionIndicator"> <Style Selector="Rectangle#SelectionIndicator">
@ -54,6 +51,7 @@
PointerEntered="Grid_PointerEntered" PointerEntered="Grid_PointerEntered"
PointerExited="Grid_OnPointerExited"> PointerExited="Grid_OnPointerExited">
<Border <Border
Margin="5"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
ClipToBounds="True" ClipToBounds="True"
@ -65,18 +63,20 @@
<Image <Image
Width="96" Width="96"
Height="96" Height="96"
Margin="0,0,0,10"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Top" VerticalAlignment="Top"
Source="{Binding Image, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" /> Source="{Binding Image, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
<TextBlock <TextBlock
HorizontalAlignment="Stretch"
MaxWidth="90"
Text="{Binding Name}" Text="{Binding Name}"
Height="30"
MaxWidth="90"
TextAlignment="Center" TextAlignment="Center"
TextWrapping="Wrap" HorizontalAlignment="Center"
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
MaxLines="2" TextWrapping="Wrap"
Margin="5" /> MaxLines="2" />
</StackPanel> </StackPanel>
</Border> </Border>
<Border <Border
@ -104,8 +104,8 @@
<DataTemplate <DataTemplate
DataType="viewModels:BaseModel"> DataType="viewModels:BaseModel">
<Panel <Panel
Height="118" Height="120"
Width="96"> Width="100">
<Button <Button
MinWidth="50" MinWidth="50"
MinHeight="50" MinHeight="50"
@ -119,19 +119,14 @@
Click="AddUser"> Click="AddUser">
<ui:SymbolIcon Symbol="Add" /> <ui:SymbolIcon Symbol="Add" />
</Button> </Button>
<Panel.Styles>
<Style Selector="Panel">
<Setter Property="Background" Value="{DynamicResource ListBoxBackground}"/>
</Style>
</Panel.Styles>
</Panel> </Panel>
</DataTemplate> </DataTemplate>
</ListBox.DataTemplates> </ListBox.DataTemplates>
</ListBox> </ListBox>
</Border> </StackPanel>
<StackPanel <StackPanel
Grid.Row="1" Grid.Row="1"
Margin="0 24 0 0" Margin="10,30,0,0"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Orientation="Horizontal" Orientation="Horizontal"
Spacing="10"> Spacing="10">
@ -146,12 +141,12 @@
</StackPanel> </StackPanel>
<StackPanel <StackPanel
Grid.Row="1" Grid.Row="1"
Margin="0 24 0 0" Margin="0,30,0,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Orientation="Horizontal"> Orientation="Horizontal">
<Button <Button
Click="Close"> Click="Close">
<TextBlock Text="{ext:Locale UserProfilesClose}" /> <TextBlock Text="{ext:Locale SettingsButtonClose}" />
</Button> </Button>
</StackPanel> </StackPanel>
</Grid> </Grid>