|
|
|
|
@ -1,26 +1,21 @@
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using CommunityToolkit.Mvvm.Input;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MvvmCommunityApp.viewmodels
|
|
|
|
|
{
|
|
|
|
|
public class MainWindowViewModel : ObservableObject
|
|
|
|
|
public partial class MainWindowViewModel : ObservableObject
|
|
|
|
|
{
|
|
|
|
|
public string Title { get; set; }
|
|
|
|
|
public RelayCommand AddCommand { get; }
|
|
|
|
|
|
|
|
|
|
public MainWindowViewModel()
|
|
|
|
|
public MainWindowViewModel()
|
|
|
|
|
{
|
|
|
|
|
Title = "MyIocName";
|
|
|
|
|
//
|
|
|
|
|
AddCommand = new RelayCommand(DoAdd);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void DoAdd()
|
|
|
|
|
[RelayCommand]
|
|
|
|
|
private void Add()
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Do Add");
|
|
|
|
|
}
|
|
|
|
|
|