GamepadReading.IsDPadUpPressed Property

Indicates whether D-pad up is pressed.

Syntax

public:
property bool IsDPadUpPressed {
         bool get ();
}  

Property value

Type: bool 

 True if D-pad up is pressed; false otherwise.

Remarks

The following code shows how to use this property.

void Game::Update(float totalTime, float elapsedTime)
{
    auto gamepads = Gamepad::GetGamepads();

    for ( unsigned int i = 0; i < gamepads->Size; ++i )
    {
        IGamepadReading^ reading = gamepads->GetAt(i)->GetCurrentReading();

        if ( reading->IsDPadUpPressed )
        {
            // Add logic for D-pad up pressed.
        }
    }
}  

Note

This is a cross-OS call. For more information, see Cross-OS Calls.

Requirements

Namespace: Windows.Xbox.Input

Metadata: windows.winmd

See also

Reference

GamepadReading Class

GamepadReading Members

Windows.Xbox.Input Namespace