IXRTextBox::GetSelectionLength (Compact 2013)
3/28/2014
This method retrieves the number of characters in the current selection in this text box.
Syntax
virtual HRESULT STDMETHODCALLTYPE GetSelectionLength(
int* pSelectionLength
) = 0;
Parameters
- pSelectionLength
[out] Pointer to an integer value that indicates the number of characters in the current selection in this text box, or 0 if there is no selection.
Return Value
Returns an HRESULT that indicates success or failure.
Remarks
This method retrieves the number of characters in the current selection. When you call IXRTextBox::SetSelectionLength, it adjusts the length of the current selection to the specified value, keeping the beginning of the selection fixed.
If the specified selection length is longer than the amount of text, the selection length automatically adjusts so that the resulting selection is never more than the amount of text.
When you call SetSelectionLength and pass in a valid value, the SelectionChanged event is raised.
.NET Framework Equivalent
System.Windows.Controls.TextBox.SelectionLength
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |