Skip to content

fedandburk/net-mvvmcross-extensions

Repository files navigation

Extensions for MvvmCross

GitHub Nuget CI CD CodeFactor

Extensions is a .NET library with common extensions and helpers for MvvmCross.

Installation

Use NuGet package manager to install this library.

Install-Package Fedandburk.MvvmCross.Extensions

Usage

using Fedandburk.MvvmCross.Extensions;

ICommand Extensions

To check the execution ability and run the IMvxAsyncCommand asynchronously:

await Command.SafeExecuteAsync(parameter);

To cancel the IMvxAsyncCommand execution with IsRunning check:

Command.CancelExecution();

To raise CanExecuteChanged when one of the target properties changed:

Subscription = Command.RelayOn(
    NotifyPropertyChanged,
    () => NotifyPropertyChanged.Property
);

INotifyPropertyChanged Extensions

To subscribe for changes of INotifyPropertyChanged properties:

Subscription = this.WeakSubscribe(EventHandler, () => PropertyOne, () => PropertyTwo);

About

A collection of extensions for MvvmCross.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •  

Languages