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

1.3 KiB

MvvmCommunityApp

MVVM Community Toolkit Tutorial Reference

  • MVVM Community Toolkit have built in Source Generator. Thus, this will minimize the amount of boiler code need to write.

  • List of attributes with code generation capability

    • [ObservableProperty]
      • [NotifyPropertyChangedFor(nameof(FullName))]
      • [NotifyCanExecuteChangedFor(nameof(MyCommand))]
    • [RelayCommand]
      • [RelayCommand(CanExecute = nameof(CanGreetUser))]
  • Preparation

  • Code Generation

  • UWP SAmple

Notes

  • Most doumentation is based on UWP. Thus, some syntax is not compatible
  • UWP & WinUI3 can use {x:Bind ...}. WPF no applicable. Need to use original {Binding: ..} syntax
  • Alternatively, WPF x:Bind nuget may help resolve this (TBA).

C# 9