What is the correct type for keyUpToken in the following snippet for a Windows Store app?
keyUpToken = coreWindow->KeyUp +=
ref new TypedEventHandler<CoreWindow^, KeyEventArgs^>(this, &KeyState::OnKeyUp);
I'm currently using Windows::Foundation::EventRegistrationToken which seems to work fine (at least in my dev environment), but I was just looking at the documentation and it indicates that I should be using System.Runtime.InteropService.WindowsRuntime.EventRegistrationToken.
(Which I'm not even sure how to get to... should I add mscorlib.dll to my additional dependencies?)
If so, what is the point of Windows::Foundation::EventRegistrationToken?
Just a bit confused. Thanks!
EDIT: Or, if somebody can point me at a sample that does this the right way, that'd be really helpful!