IXRButtonBase::GetIsFocused (Compact 2013)
3/28/2014
This method retrieves a value that indicates whether the button control has the UI focus.
Syntax
virtual HRESULT STDMETHODCALLTYPE GetIsFocused(
__out bool* pIsFocused
) = 0;
Parameters
- pIsFocused
[out] Pointer to a Boolean value that indicates whether the button control has the UI focus. This value is true if the control has the focus; otherwise, it is false.
Return Value
Returns an HRESULT that indicates success or failure.
Remarks
The pClickModeProperty value is not set until the event handler for the GotFocus event has been called. This event handler is added in the IXRUIElement inherited class. The GotFocus event can be raised by a successful call to the inherited method IXRControl::Focus.
For more information, see IXRUIElement::AddGotFocusEventHandler.
Note
During application initialization, the XAML Runtime (XR) sets focus to the first focusable element in the visual tree. However, the GotFocus event is not triggered in this case unless you explicitly call IXRControl::Focus in the initialization procedure.
.NET Framework Equivalent
System.Windows.Controls.Primitives.ButtonBase.IsFocused
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |