Add files for chapter 1

This commit is contained in:
Alvin Ashcraft
2023-04-25 09:46:52 -04:00
parent ad0f2c8f7f
commit b32599ed2c
17 changed files with 380 additions and 0 deletions
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WinUI3.SimpleSample
{
public class MainViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
private string _name;
public MainViewModel()
{
_name = "Bob Jones";
}
public string Name
{
get { return _name; }
set
{
if (_name == value) return;
_name = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Name)));
}
}
}
}