InputPane Class

Definition

Enables an app to receive notifications when the docked touch keyboard, or Soft Input Panel (SIP), is about to be displayed or hidden, and to determine which portion of the application's window is obscured by the input pane.

Note

The InputPane APIs provide accurate occlusion information for a docked panel only. For Windows 10 Creators Fall Update and newer, we reccomend using the following APIs to handle occlusion by docked, undocked, moveable, and transitory input panes such as Soft Input Panels (SIP), Input Method Editor (IME) candidate windows, floating toolbars, and so on.

public ref class InputPane sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class InputPane final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class InputPane
Public NotInheritable Class InputPane
Inheritance
Object Platform::Object IInspectable InputPane
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The input pane appears when the user performs an action that requires them to enter information, such as selecting a text entry field. By default, Windows handles the input pane events and repositions content so that users can see where they are typing. If you set CoreTextEditContext.InputPaneDisplayPolicy to Manual in your app, you are responsible for showing and hiding the input pane using TryShow and TryHide. Use this class to override the default behavior and customize the input pane.

In some cases, overlay UI such as an InputPane is not fully supported. This includes:

Call GetForCurrentView to get an InputPane object.

After you register to receive input pane notifications, the system calls your event delegate whenever the input pane is shown or hidden for the window that was visible when you called the GetForCurrentView method.

Note

This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX).

Version history

Windows version SDK version Value added
1903 18362 GetForUIContext

Properties

OccludedRect

Gets the region of the app window obscured by the input pane.

Visible

Gets or sets a value that indicates whether the input pane is shown.

Important

Valid for Xbox device family only.

For universal apps, the OccludedRect property indicates the region of the app window obstructed by the input pane.

Methods

GetForCurrentView()

Gets the InputPane object associated with the application window that is currently visible.

GetForUIContext(UIContext)

Gets the InputPane object associated with the view with the specified context identifier.

TryHide()

Tries to hide the InputPane, if it is visible.

TryShow()

Tries to show the InputPane, if it is hidden.

This method is a "best effort" and guarantees only that the user has a way to enter text in the focused control. The touch keyboard, or Soft Input Panel (SIP), is shown only if a hardware keyboard is not available.

Events

Hiding

Occurs when the input pane starts sliding out of view.

Showing

Occurs when the input pane starts sliding into view.

Applies to

See also