Content-Length: 252460 | pFad | http://github.com/MichalKuracina/ICommand

5E GitHub - MichalKuracina/ICommand: Interface example
Skip to content

MichalKuracina/ICommand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICommand

Solution demonstrates how ICommand interface works in WPF.

using System;
using System.Windows.Input;

namespace wpf_icommand.ViewModels.Commands
{
    public class MessageCommand : ICommand
    {
        public event EventHandler CanExecuteChanged;
        private Action _execute;

        public MessageCommand(Action execute)
        {
            _execute = execute;
        }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public void Execute(object parameter)
        {
            _execute.Invoke();
        }
    }
}

Link to documentation -> docs.microsoft.com

About

Interface example

Topics

Resources

Stars

Watchers

Forks

Languages









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/MichalKuracina/ICommand

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy