Hello,
You can add the TypedEventHandler for PointerPressed and so on in CoreWindow class in this way:
window->PointerPressed +=
ref new TypedEventHandler<CoreWindow^, PointerEventArgs^>(this, &YourAppClass::OnPointerPressed);
window->PointerMoved +=
ref new TypedEventHandler<CoreWindow^, PointerEventArgs^>(this, &YourAppClass::OnPointerMoved);
window->PointerReleased +=
ref new TypedEventHandler<CoreWindow^, PointerEventArgs^>(this, &YourAppClass::OnPointerReleased);
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.core.corewindow.aspx
If you want to add a button click event for some control. You can add the function name in the Click property in xaml element.
<Button x:Name="Scenario1Launch" Content="Launch Dialog" Margin="0,0,10,0" Click="Scenario1Launch_Click"/>
You can follow this sample codes
http://code.msdn.microsoft.com/windowsapps/Message-dialog-sample-00c928f5
Best regards,
Jesse
Jesse Jiang [MSFT]
MSDN Community Support | Feedback to us
