mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-17 22:36:58 +00:00
misc: Add CommunityToolkit.Mvvm for observable property generation; apply it to MainWindowViewModel for now.
This commit is contained in:
parent
19d2883a35
commit
61ae427a4d
5 changed files with 76 additions and 563 deletions
|
|
@ -1,18 +1,10 @@
|
|||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
public class BaseModel : INotifyPropertyChanged
|
||||
public class BaseModel : ObservableObject
|
||||
{
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
protected void OnPropertiesChanged(string firstPropertyName, params ReadOnlySpan<string> propertyNames)
|
||||
{
|
||||
OnPropertyChanged(firstPropertyName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue