Im using WPF which has a Storyboard class that has a Completed event.
I use it like so:
sb.Completed += AddControlToTaskbar;
private void AddControlToTaskbar(object sender, EventArgs args)
{
//...
}
How to I pass in the EventArgs to my method? Its always null, and I need it to be a custom class
Thanks
Mark
You don’t pass the
EventArgsto your method, the framework which dispatches the event does that. A common way to handle this is to wrap up yourAddControlToTaskbarmethod in a class which stores the state, e.g.:Your constructor stores the state.