12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Windows.Input;
- namespace FastReport.Preview
- {
- public partial class WpfPreviewControl
- {
- /// <summary>
- /// Represents a preview command.
- /// </summary>
- public class PreviewCommand : ICommand
- {
- private Action action;
- /// <inheritdoc/>
- public event EventHandler CanExecuteChanged;
- /// <inheritdoc/>
- public bool CanExecute(object parameter) => true;
- /// <inheritdoc/>
- public void Execute(object parameter) => action();
- internal PreviewCommand(Action action)
- {
- this.action = action;
- }
- }
- }
- }
|