README.md
parent
aa2832cb9c
commit
e7ed4e24e7
@ -1 +1,22 @@
|
||||
# MvvmCommunityApp
|
||||
# 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).
|
||||
|
||||
Loading…
Reference in New Issue