Ghost1372

everything can be handy

Args

name Remarks
CancelRoutedEventArgs
FunctionEventArgs!1
KeyboardHookEventArgs
MouseHookEventArgs

You can use FunctionEventArgs!1 to create a custom event args

step 1: create a EventHandler

1
2
3
4
5
6
7
public event EventHandler<FunctionEventArgs<myArgument>> myEventChanged;

public class myArgument
{
public string OldValue { get; internal set; }
public string NewValue { get; internal set; }
}

step2: Notify change where necessary

1
myEventChanged?.Invoke(this, new FunctionEventArgs<myArgument>(OldValue = "Old", NewValue = "New"));
0%