You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
LivreLand/PersonalMVVMToolkit/BaseViewModel.cs

48 lines
808 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PersonalMVVMToolkit
{
public class BaseViewModel<TModel> : ObservableObject
{
#region Fields
private TModel model;
#endregion
#region Properties
public TModel Model
{
get => model;
private set
{
SetProperty(ref model, value);
}
}
#endregion
#region Constructor
public BaseViewModel(TModel model)
{
Model = model;
}
public BaseViewModel()
{
Model = default(TModel);
}
#endregion
}
public class BaseViewModel : ObservableObject { }
}