These map to the
PointerPointProperty.IsXButton1Pressed/IsXButton2Pressed properties, which you can get from PointerEventArgs either at a control level or globally for the whole app (via Window::Current->CoreWindow):
// handle only for a specific control, in which case you should probably also capture input to the element
void MyPage::MyPanel_PointerPressed(Object^ sender, PointerRoutedEventArgs^ e)
{
bool backPressed = e->GetCurrentPoint(MyPanel)->Properties->IsXButton1Pressed;
bool forwardPressed = e->GetCurrentPoint(MyPanel)->Properties->IsXButton2Pressed;
}
// OR, handle globally at CoreWindow level
void MyPage::CoreWindow_PointerPressed(CoreWindow^ sender, PointerEventArgs^ args)
{
bool backPressed = args->CurrentPoint->Properties->IsXButton1Pressed;
bool forwardPressed = args->CurrentPoint->Properties->IsXButton2Pressed;
}
However I believe these give the current live state of the buttons, and so would always be false by the time you get PointerReleased. You'd have to check the state in the corresponding PointerDown.