misc: chore: Use RyujinxControl<T> in more places

This commit is contained in:
Evan Husted
2025-03-05 22:18:13 -06:00
parent d87d3235e9
commit dfcb8a7fc0
11 changed files with 85 additions and 111 deletions

View File

@@ -6,26 +6,16 @@ using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.Common.Models;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.Systems.AppLibrary;
using Ryujinx.Ava.UI.Controls;
using Ryujinx.Common.Helper;
using System.Threading.Tasks;
namespace Ryujinx.Ava.UI.Views.Dialog
{
public partial class DownloadableContentManagerView : UserControl
public partial class DownloadableContentManagerView : RyujinxControl<DownloadableContentManagerViewModel>
{
public DownloadableContentManagerViewModel ViewModel;
public DownloadableContentManagerView()
{
DataContext = this;
InitializeComponent();
}
public DownloadableContentManagerView(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
{
DataContext = ViewModel = new DownloadableContentManagerViewModel(applicationLibrary, applicationData);
InitializeComponent();
}
@@ -36,8 +26,11 @@ namespace Ryujinx.Ava.UI.Views.Dialog
PrimaryButtonText = string.Empty,
SecondaryButtonText = string.Empty,
CloseButtonText = string.Empty,
Content = new DownloadableContentManagerView(applicationLibrary, applicationData),
Title = string.Format(LocaleManager.Instance[LocaleKeys.DlcWindowTitle], applicationData.Name, applicationData.IdBaseString),
Content = new DownloadableContentManagerView
{
ViewModel = new DownloadableContentManagerViewModel(applicationLibrary, applicationData)
}
};
Style bottomBorder = new(x => x.OfType<Grid>().Name("DialogSpace").Child().OfType<Border>());