优化更新代码,添加界面功能并整合
This commit is contained in:
25
WPFluent/Input/IRelayCommand{T}.cs
Normal file
25
WPFluent/Input/IRelayCommand{T}.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace WPFluent.Input;
|
||||
|
||||
/// <summary>
|
||||
/// A generic interface representing a more specific version of <see cref="IRelayCommand"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type used as argument for the interface methods.</typeparam>
|
||||
public interface IRelayCommand<in T> : IRelayCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a strongly-typed variant of <see cref="ICommand.CanExecute(object)"/>.
|
||||
/// </summary>
|
||||
/// <param name="parameter">The input parameter.</param>
|
||||
/// <returns>Whether or not the current command can be executed.</returns>
|
||||
/// <remarks>Use this overload to avoid boxing, if <typeparamref name="T"/> is a value type.</remarks>
|
||||
bool CanExecute(T? parameter);
|
||||
|
||||
/// <summary>
|
||||
/// Provides a strongly-typed variant of <see cref="ICommand.Execute(object)"/>.
|
||||
/// </summary>
|
||||
/// <param name="parameter">The input parameter.</param>
|
||||
/// <remarks>Use this overload to avoid boxing, if <typeparamref name="T"/> is a value type.</remarks>
|
||||
void Execute(T? parameter);
|
||||
}
|
||||
Reference in New Issue
Block a user