TextBox.SelectionLength Property
.NET Framework 3.0
Gets or sets a value indicating the number of characters in the current selection in the TextBox.
Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
/** @property */ public int get_SelectionLength () /** @property */ public void set_SelectionLength (int value)
public function get SelectionLength () : int public function set SelectionLength (value : int)
<object SelectionLength="int" .../>
Property Value
An integer specifying the number of characters in the current selection in the TextBox. Getting this property returns the number of characters in the current selection. Setting this property adjusts the length of the current selection to the specified value, keeping the beginning of the selection fixed. The default value is zero (0).Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.