dotnet add package MoleculeSoftware.Packages.CovalentMVVM --version 1.0.0
NuGet\Install-Package MoleculeSoftware.Packages.CovalentMVVM -Version 1.0.0
<PackageReference Include="MoleculeSoftware.Packages.CovalentMVVM" Version="1.0.0" />
paket add MoleculeSoftware.Packages.CovalentMVVM --version 1.0.0
#r "nuget: MoleculeSoftware.Packages.CovalentMVVM, 1.0.0"
// Install MoleculeSoftware.Packages.CovalentMVVM as a Cake Addin #addin nuget:?package=MoleculeSoftware.Packages.CovalentMVVM&version=1.0.0 // Install MoleculeSoftware.Packages.CovalentMVVM as a Cake Tool #tool nuget:?package=MoleculeSoftware.Packages.CovalentMVVM&version=1.0.0
Covalent MVVM is a collection of base components used by all WPF MVVM applications developed by Molecule Software. The initial version contains the following
- BaseViewmodel which inherits INotifyPropertyChanged and utilizes the power of PropertyChanged.Fody to reduce or totally eliminate the need to call OnPropertyChanged(). All ViewModels should inherit from this BaseViewmodel. Note, you will need to add PropertyChanged.Fody to your core project.
- RelayCommand which inherits ICommand. This command accepts a lambda and a "can execute" and can be bound to WPF UI components for execution of that lambda.
- ParameterRelayCommand allows the UI component to pass itself or another value as a parameter, handy for passing SecureString objects or any other value that cannot be directly bound by the UI. Note that base interfaces (especially those for managing passwords) are not part of this library at this time. I will be adding those interfaces in a future update once they are crafted to be as compatible across as many projects as possible.
NOTE: In order to use the features of PropertyChanged.Fody, you will need to install the nuget package into your core project. This is required because Fody must generate a FodyWeavers.XML file in your assembly.
NOTE: PropertyChanged.Fody will not notify the UI of changes to properties within a collection. If you modify a collection, call OnPropertyChanged(-name-of-property-) in order to manually fire the PropertyChanged event. Example: OnPropertyChanged(nameof(SomeProperty)); Always use "nameof" because it will prevent issues caused by property name changes.
While this package is designed specifically for Molecule Software, it should provide any WPF MVVM developer with a quick implementation of these critical base components which are required across a myriad of projects. Please check for updates and enhancements as I identify any additional functionality that may be helpful to developers. Also, please feel free to provide suggestions for future enhancements. I would like to make this package a go-to for as many developers as possible.
Special thanks goes to Simon Kropp for producing PropertyChanged.Fody. It's a life saver!
|.NET Framework||net471 net472 net48|
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.