# 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). ## C# 9 - [record](https://www.c-sharpcorner.com/article/c-sharp-9-0-introduction-to-record-types/) - [Tutorial](https://www.infoq.com/articles/records-c9-tugce-ozdeger/) - .NET 5 - VS2019 and above