content & viewmodel object creation helper with out param, touch up firmware install step

This commit is contained in:
GreemDev
2025-11-22 18:35:37 -06:00
parent 325e13a490
commit 9b0fa3bf6d
3 changed files with 40 additions and 12 deletions

View File

@@ -2,6 +2,8 @@ using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Presenters;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Controls;
using Ryujinx.Ava.UI.ViewModels;
using System.Threading.Tasks;
namespace Ryujinx.Ava.Systems.SetupWizard
@@ -52,6 +54,15 @@ namespace Ryujinx.Ava.Systems.SetupWizard
return this;
}
public SetupWizardPageBuilder WithContent<TControl, TViewModel>(out TViewModel boundViewModel)
where TControl : RyujinxControl<TViewModel>, new()
where TViewModel : BaseModel, new()
{
boundViewModel = new();
return WithContent<TControl>(boundViewModel);
}
public SetupWizardPageBuilder WithActionContent(LocaleKeys content) =>
WithActionContent(LocaleManager.Instance[content]);