Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Commit

Permalink
Added CanExecuteManager docs #3
Browse files Browse the repository at this point in the history
  • Loading branch information
godrose committed May 28, 2018
1 parent c900caa commit 1d780e7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,36 @@

namespace LogoFX.Client.Mvvm.Commanding
{
/// <inheritdoc />
public class CanExecuteManager : ICanExecuteManager
{
/// <inheritdoc />
public EventHandler CanExecuteHandler { get; private set; }

#if WINDOWS_UWP || NETFX_CORE

/// <inheritdoc />
public void AddHandler(EventHandler eventHandler)
{
CanExecuteHandler += eventHandler;
}

/// <inheritdoc />
public void RemoveHandler(EventHandler eventHandler)
{
CanExecuteHandler -= eventHandler;
}
#endif

#if NET
/// <inheritdoc />
public void AddHandler(EventHandler eventHandler)
{
CommandManager.RequerySuggested += eventHandler;
CanExecuteHandler += eventHandler;
}

/// <inheritdoc />
public void RemoveHandler(EventHandler eventHandler)
{
CommandManager.RequerySuggested -= eventHandler;
Expand Down

0 comments on commit 1d780e7

Please sign in to comment.