KeyboardInputBuffer KeyboardInputBuffer KeyboardInputBuffer KeyboardInputBuffer Class

Definition

Provides access to a text buffer that is used to aggregate user input to the Software Input Panel keyboard on the phone.

public : sealed class KeyboardInputBuffer : IKeyboardInputBuffer
struct winrt::Windows::Phone::UI::Core::KeyboardInputBuffer : IKeyboardInputBuffer
public sealed class KeyboardInputBuffer : IKeyboardInputBuffer
Public NotInheritable Class KeyboardInputBuffer Implements IKeyboardInputBuffer
Attributes
Windows 10 requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneInternalContract (introduced v1)

Remarks

Windows Phone 8

This API is supported in native apps only.

Constructors

KeyboardInputBuffer() KeyboardInputBuffer() KeyboardInputBuffer() KeyboardInputBuffer()

Initializes a new instance of the KeyboardInputBuffer class.

public : KeyboardInputBuffer()
KeyboardInputBuffer() const;
public KeyboardInputBuffer()
Public Sub New()

Properties

InputScope InputScope InputScope InputScope

Gets or sets the input scope which determines the set of keys displayed on the Software Input Panel keyboard on the phone

public : CoreInputScope InputScope { get; set; }
CoreInputScope InputScope(); void InputScope(CoreInputScope inputscope);
public CoreInputScope InputScope { get; set; }
Public ReadWrite Property InputScope As CoreInputScope
Value
CoreInputScope CoreInputScope

The input scope.

Remarks

The default input scope is CoreInputScope::Text.

SelectionLength SelectionLength SelectionLength SelectionLength

Gets the number of characters in the current selection in the input buffer.

public : unsigned int SelectionLength { get; }
uint32_t SelectionLength();
public uint SelectionLength { get; }
Public ReadOnly Property SelectionLength As uint
Value
uint uint

The number of characters in the current selection, or 0 if there is no selection.

SelectionStart SelectionStart SelectionStart SelectionStart

Gets the starting position of the text selected in the input buffer.

public : unsigned int SelectionStart { get; }
uint32_t SelectionStart();
public uint SelectionStart { get; }
Public ReadOnly Property SelectionStart As uint
Value
uint uint

The starting position of the current selection.

Text Text Text Text

Gets or sets the contents of the input buffer.

public : Platform::String Text { get; set; }
winrt::hstring Text(); void Text(winrt::hstring text);
public string Text { get; set; }
Public ReadWrite Property Text As string
Value
string string

A string containing the text contents of the input buffer. The default is an empty string ("").

Methods

Select(UInt32, UInt32) Select(UInt32, UInt32) Select(UInt32, UInt32) Select(UInt32, UInt32)

Selects a range of text in the input buffer.

public : void Select(unsigned int start, unsigned int length)
void Select(uint32_t start, uint32_t length) const;
public void Select(UInt32 start, UInt32 length)
Public Function Select(start As UInt32, length As UInt32) As void
Parameters
start
UInt32 UInt32

The zero-based index of the first character in the selection.

length
UInt32 UInt32

The length of the selection, in characters.

SelectFromTap(UInt32) SelectFromTap(UInt32) SelectFromTap(UInt32) SelectFromTap(UInt32)

Selects a range of text as if the user had tapped on the specified character in the input buffer.

public : void SelectFromTap(unsigned int characterIndex)
void SelectFromTap(uint32_t characterIndex) const;
public void SelectFromTap(UInt32 characterIndex)
Public Function SelectFromTap(characterIndex As UInt32) As void
Parameters
characterIndex
UInt32 UInt32

The character in the text input buffer from which the tap selection is performed.

Events

SelectionChanged SelectionChanged SelectionChanged SelectionChanged

Occurs when the text selection within the input buffer has changed.

public : event TypedEventHandler SelectionChanged<KeyboardInputBuffer, CoreSelectionChangedEventArgs>
// Register
event_token SelectionChanged(TypedEventHandler<KeyboardInputBuffer, CoreSelectionChangedEventArgs> const& handler) const;

// Revoke with event_token
void SelectionChanged(event_token const& cookie) const;

// Revoke with event_revoker
SelectionChanged_revoker SelectionChanged(auto_revoker_t, TypedEventHandler<KeyboardInputBuffer, CoreSelectionChangedEventArgs> const& handler) const;
public event TypedEventHandler SelectionChanged<KeyboardInputBuffer, CoreSelectionChangedEventArgs>
Public Event TypedEventHandler SelectionChanged( Of ( Of KeyboardInputBuffer ), ( Of CoreSelectionChangedEventArgs ))

TextChanged TextChanged TextChanged TextChanged

Occurs when the content changes in the input buffer.

public : event TypedEventHandler TextChanged<KeyboardInputBuffer, CoreTextChangedEventArgs>
// Register
event_token TextChanged(TypedEventHandler<KeyboardInputBuffer, CoreTextChangedEventArgs> const& handler) const;

// Revoke with event_token
void TextChanged(event_token const& cookie) const;

// Revoke with event_revoker
TextChanged_revoker TextChanged(auto_revoker_t, TypedEventHandler<KeyboardInputBuffer, CoreTextChangedEventArgs> const& handler) const;
public event TypedEventHandler TextChanged<KeyboardInputBuffer, CoreTextChangedEventArgs>
Public Event TypedEventHandler TextChanged( Of ( Of KeyboardInputBuffer ), ( Of CoreTextChangedEventArgs ))