Files
2026-01-02 21:16:52 -05:00

47 lines
994 B
C#

using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Windows.Input;
namespace FASandbox;
// This is set up for quick testing purposes.
public class MainWindowViewModel : INotifyPropertyChanged
{
public MainWindowViewModel()
{
}
public event PropertyChangedEventHandler PropertyChanged;
private bool RaiseAndSetIfChanged<T>(ref T field, T value, [CallerMemberName]string propName = "")
{
if (!EqualityComparer<T>.Default.Equals(field, value))
{
field = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
return true;
}
return false;
}
}
public class Command : ICommand
{
public event EventHandler CanExecuteChanged;
public bool CanExecute(object parameter)
{
return true;
}
public void Execute(object parameter)
{
Debug.WriteLine("FIRED");
}
}