From e7ed4e24e76ddffb6d837d84c57e1ef1fed88b9b Mon Sep 17 00:00:00 2001 From: Yik Teng Hie Date: Mon, 6 Feb 2023 14:50:38 +0800 Subject: [PATCH] README.md --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7af2da7..6c3f357 100644 --- a/README.md +++ b/README.md @@ -1 +1,22 @@ -# MvvmCommunityApp \ No newline at end of file +# MvvmCommunityApp + +## MVVM Community Toolkit Tutorial Reference ## + +- MVVM Community Toolkit have built in [Source Generator](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/generators/overview). +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](https://blogs.msmvps.com/bsonnino/2021/02/13/implementing-the-mvvm-pattern-in-a-wpf-app-with-the-mvvm-community-toolkit/) +- [Code Generation](https://blogs.msmvps.com/bsonnino/2022/08/06/the-mvvm-pattern-revisited-with-the-mvvm-community-toolkit-8-0/) +- [UWP SAmple](https://github.com/CommunityToolkit/MVVM-Samples) + +## 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](https://github.com/levitali/CompiledBindings) nuget may help resolve this (TBA).