CoreInputView.TryShow Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TryShow() |
Attempts to show (if hidden) the input pane associated with the CoreInputView. |
TryShow(CoreInputViewKind) |
Attempts to show (if hidden) the specified type of input pane associated with the CoreInputView. |
TryShow()
Attempts to show (if hidden) the input pane associated with the CoreInputView.
public:
virtual bool TryShow() = TryShow;
/// [Windows.Foundation.Metadata.Overload("TryShow")]
bool TryShow();
[Windows.Foundation.Metadata.Overload("TryShow")]
public bool TryShow();
function tryShow()
Public Function TryShow () As Boolean
Returns
bool
True if the request to show the input pane was accepted. Otherwise, false.
If this method is called from an app that is not in foreground, the request is rejected and false is returned.
- Attributes
Windows requirements
Device family |
Windows 10, version 1809 (introduced in 10.0.17763.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v7.0)
|
Remarks
This method is a "best effort" and guarantees only that the user has a way to interact with the focused control. For a docked a Soft Input Panel (SIP) like the Touch keyboard and handwriting panel, the pane is shown only if a hardware keyboard is not available.
If you set CoreTextEditContext.InputPaneDisplayPolicy to Manual
, use TryShow or TryShowPrimaryView to display the input pane, and TryHide or TryHidePrimaryView to hide the input pane.
See also
Applies to
TryShow(CoreInputViewKind)
Attempts to show (if hidden) the specified type of input pane associated with the CoreInputView.
public:
virtual bool TryShow(CoreInputViewKind type) = TryShow;
/// [Windows.Foundation.Metadata.Overload("TryShowWithKind")]
bool TryShow(CoreInputViewKind const& type);
[Windows.Foundation.Metadata.Overload("TryShowWithKind")]
public bool TryShow(CoreInputViewKind type);
function tryShow(type)
Public Function TryShow (type As CoreInputViewKind) As Boolean
Parameters
Returns
bool
True, if the request to show the input pane was accepted; otherwise false.
If this method is called from an app that is not in foreground, the request is rejected and false is returned.
- Attributes
Windows requirements
Device family |
Windows 10, version 1809 (introduced in 10.0.17763.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v7.0)
|
Remarks
If type is set to Default, a "best effort" is made to show the input pane while ensuring the user can still interact with the focused control. For example, a docked a Soft Input Panel (SIP), such as the Touch keyboard and handwriting panel, is shown only if a hardware keyboard is not available.
Use this method if you want to provide a specific user experience based on a specific input pane, such as the Windows emoji pane.
Primary view refers to either of the CoreInputViewKind.Keyboard or CoreInputViewKind.Handwriting views, while CoreInputView can be any of the values from CoreInputViewKind.
If you set CoreTextEditContext.InputPaneDisplayPolicy to 'Manual', use TryShow or TryShowPrimaryView to display the input pane, and TryHide or TryHidePrimaryView to hide the input pane.