A more generic `DelegateCommand` In an effort to create ever-improving code, I've written a DelegateCommand that takes a generic type parameter to be acted upon. It's pretty trivial, so it should hopefully be easy to review.

In order to do this, I had to create two interfaces: IGenericCommand and IWindowsUniversalCommand.

/// &lt;summary&gt;
/// Requires the implementation of &lt;code&gt;System.Windows.Input.ICommand&lt;/code&gt; as well.
/// &lt;/summary&gt;
/// &lt;typeparam name="T"&gt;&lt;/typeparam&gt;
public interface IGenericCommand&lt;T&gt; : ICommand
{
    /// &lt;summary&gt;
    /// A generic version of &lt;code&gt;System.Windows.Input.ICommand.CanExecute(object)&lt;/code&gt;.
    /// &lt;/summary&gt;
    /// &lt;param name="parameter"&gt;&lt;/param&gt;
    /// &lt;returns&gt;&lt;/returns&gt;
    bool CanExecute(T parameter);
    /// &lt;summary&gt;
    /// A generic version of &lt;code&gt;System.Windows.Input.ICommand.Execute(object)&lt;/code&gt;.
    /// &lt;/summary&gt;
    /// &lt;param name="parameter"&gt;&lt;/param&gt;
    void Execute(T parameter);
}

/// &lt;summary&gt;
/// Requires the implementation of &lt;code&gt;System.Windows.Input.ICommand&lt;/code&gt; as well.
/// &lt;/summary&gt;
interface IWindowsUniversalCommand : ICommand
{
    /// &lt;summary&gt;
    /// Should refresh whether or not the &lt;code&gt;ICommand&lt;/code&gt; can execute, or call &lt;code&gt;System.Windows.Input.ICommand.CanExecuteChanged&lt;/code&gt;.
    /// &lt;/summary&gt;
    void RaiseCanExecuteChanged();
}


Then I created an abstract class WindowsUniversalCommand which implements some of the basic logic needed for the command, to save from having to repeat it regularly. (Just in case I create other commands for Windows Universal Apps.)

public abstract class WindowsUniversalCommand : IWindowsUniversalCommand
{
    public abstract bool CanExecute(object parameter);
    public abstract void Execute(object parameter);

#if WINDOWS_UWP
    // The .NET version on Windows RT (Universal Apps) does not support the `CommandManager` trick below, so we just make a regular event and fire it.
    public event EventHandler CanExecuteChanged;
#else
    // Programmes that are not Windows Universal Apps support the `CommandManager` trick.
    public event EventHandler CanExecuteChanged
    {
        add { CommandManager.RequerySuggested += value; }
        remove { CommandManager.RequerySuggested -= value; }
    } 
#endif

    protected virtual void OnCanExecuteChanged(EventArgs e)
    {
        var handler = CanExecuteChanged;
        handler?.Invoke(this, e);
    }

    /// &lt;summary&gt;
    /// This method is required for Windows Universal Apps (WinRT). Non-WinRT programmes may simply ignore this method.
    /// &lt;/summary&gt;
    public void RaiseCanExecuteChanged() =&gt; OnCanExecuteChanged(EventArgs.Empty);
}


The two abstract methods are required so that WindowsUniversalCommand can satisfy the ICommand interface.

Lastly, I have a DelegateCommand&lt;T&gt;.

public class DelegateCommand&lt;T&gt; : WindowsUniversalCommand, IGenericCommand&lt;T&gt;
{
    private readonly Func&lt;T, bool&gt; _canExecuteMethod;
    private readonly Action&lt;T&gt; _executeMethod;

    public DelegateCommand(Action&lt;T&gt; executeMethod, Func&lt;T, bool&gt; canExecuteMethod = null)
    {
        _executeMethod = executeMethod;
        _canExecuteMethod = canExecuteMethod;
    }

    public override bool CanExecute(object parameter) =&gt; parameter is T ? CanExecute((T)parameter) : false;

    public override void Execute(object parameter) =&gt; Execute((T)parameter);

    public bool CanExecute(T parameter) =&gt; _canExecuteMethod == null || _canExecuteMethod.Invoke(parameter);

    public void Execute(T parameter) =&gt; _executeMethod?.Invoke(parameter);
}
public override bool CanExecute(object parameter) =&gt; parameter is T ? CanExecute((T)parameter) : false;


Beware of a lesser known gotcha. This may not work as expected for parameter that's not "really" a T (it's not in Ts inheritance tree), only has an explicit cast operator defined allowing it to be casted to T. 

In that case while (T) parameter would return a T instance,  CanExecute won't even be called because your is check would prevent this from happening.

Other than that, I'd have some remarks related to naming and code style (rather subjective, so treat them as suggestions or food for thought more than claims your code is incorrect)

public interface IGenericCommand&lt;T&gt; : ICommand


There's no use in putting "generic" in the name. Any C# programmer knows that &lt;T&gt; indicates generics by itself. Case in point: in .NET we've got IEnumerable and IEnumerable&lt;T&gt; - not IGenericEnumerable&lt;T&gt;. (So "drop the the" ;) )

/// &lt;typeparam name="T"&gt;&lt;/typeparam&gt;

/// &lt;param name="parameter"&gt;&lt;/param&gt;
/// &lt;returns&gt;&lt;/returns&gt;


In my opinion such empty tags are of no use, all they do is clutter the codebase.

private readonly Func&lt;T, bool&gt; _canExecuteMethod;
private readonly Action&lt;T&gt; _executeMethod;


It's a matter of taste, but here I would ditch the "Method" suffix, as these aren't necessarily "methods". Note that you didn't name the class MethodCommand. Why not just _canExecute and _onExecute?

public bool CanExecute(T parameter) =&gt; _canExecuteMethod == null || _canExecuteMethod.Invoke(parameter);


Since you're using the null safety operator already, this could be simplified to _canExecuteMethod?.Invoke(parameter) ?? true.