KeyboardInputBuffer KeyboardInputBuffer KeyboardInputBuffer Class

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

Syntax

Declaration

public sealed class KeyboardInputBufferpublic sealed class KeyboardInputBufferPublic NotInheritable Class KeyboardInputBuffer

Remarks

Windows Phone 8

This API is supported in native apps only.

Constructors summary

Initializes a new instance of the KeyboardInputBuffer.

Properties summary

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

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

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

Gets or sets the contents of the input buffer.

Methods summary

Selects a range of text in the input buffer.

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

Events summary

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

Occurs when the content changes in the input buffer.

Constructors

  • KeyboardInputBuffer()
    KeyboardInputBuffer()
    KeyboardInputBuffer()
    KeyboardInputBuffer()

    Initializes a new instance of the KeyboardInputBuffer.

    public KeyboardInputBuffer()public KeyboardInputBuffer()Public Function KeyboardInputBuffer() As

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; }public CoreInputScope InputScope { get; set; }Public ReadWrite Property InputScope As CoreInputScope

    Property Value

    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 uint SelectionLength { get; }public uint SelectionLength { get; }Public ReadOnly Property SelectionLength As uint

    Property Value

    • uint
      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 uint SelectionStart { get; }public uint SelectionStart { get; }Public ReadOnly Property SelectionStart As uint

    Property Value

    • uint
      uint
      uint

      The starting position of the current selection.

  • Text
    Text
    Text
    Text

    Gets or sets the contents of the input buffer.

    public string Text { get; set; }public string Text { get; set; }Public ReadWrite Property Text As string

    Property Value

    • string
      string
      string

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

Methods

  • Select(System.UInt32,System.UInt32)
    Select(System.UInt32,System.UInt32)
    Select(System.UInt32,System.UInt32)
    Select(System.UInt32,System.UInt32)

    Selects a range of text in the input buffer.

    public void Select(System.UInt32 start,System.UInt32 length)public void Select(System.UInt32 start,System.UInt32 length)Public Function Select(start As System.UInt32,length As System.UInt32) As void

    Parameters

    • start
      System.UInt32
      System.UInt32
      System.UInt32

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

    • length
      System.UInt32
      System.UInt32
      System.UInt32

      The length of the selection, in characters.

  • SelectFromTap(System.UInt32)
    SelectFromTap(System.UInt32)
    SelectFromTap(System.UInt32)
    SelectFromTap(System.UInt32)

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

    public void SelectFromTap(System.UInt32 characterIndex)public void SelectFromTap(System.UInt32 characterIndex)Public Function SelectFromTap(characterIndex As System.UInt32) As void

    Parameters

    • characterIndex
      System.UInt32
      System.UInt32
      System.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 SelectionChangedpublic event TypedEventHandler SelectionChangedPublic Event SelectionChanged
  • TextChanged
    TextChanged
    TextChanged
    TextChanged

    Occurs when the content changes in the input buffer.

    public event TypedEventHandler TextChangedpublic event TypedEventHandler TextChangedPublic Event TextChanged

Device family

Windows Mobile Extension SDK (introduced v10.0.10240.0)

API contract

Windows.Phone.PhoneInternalContract (introduced v1)

Attributes

Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Phone.UI.Core.dll