|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
namespace DataGridFilterLibrary
{
public class DataGridFilterCommand : ICommand
{
private readonly Action<object> action;
public DataGridFilterCommand(Action<object> action)
{
this.action = action;
}
public void Execute(object parameter)
{
if (action != null) action(parameter);
}
public bool CanExecute(object parameter)
{
return true;
}
public event EventHandler CanExecuteChanged
{
add { CommandManager.RequerySuggested += value; }
remove { CommandManager.RequerySuggested -= value; }
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.