How can I add extra string parameter into Dispatchertimer Eventhandler ?.
I would like achieve something like this:
string ObjectName = "SomeObjectName";
System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick(ObjectName));
And function:
private void dispatcherTimer_Tick(object sender, EventArgs e, string ObjectName)
{
[...]
}
How Can I achieve that?
Edit:
My intention is add some animation for moving object. I've got canvas with few objects. I can move this objects on canvas by mouse clicking, i would like to add animations for this movement.