更新:2007 年 11 月
获取当前撰写的长度(以 Unicode 符号为单位)。
命名空间:
System.Windows.Documents 程序集:
PresentationFramework(在 PresentationFramework.dll 中)
Public ReadOnly Property CompositionLength As Integer
Dim instance As FrameworkTextComposition
Dim value As Integer
value = instance.CompositionLength
public int CompositionLength { get; }
public:
property int CompositionLength {
int get ();
}
/** @property */
public int get_CompositionLength()
public function get CompositionLength () : int
CompositionLength 属性指示自上次 TextInput 事件以来已输入的字符数。只有在发生 TextInputStart 或 TextInputUpdate 事件时,此属性才有意义。 当发生 TextInput 事件时,CompositionLength 为 –1,ResultLength 属性指示撰写的长度。
.NET Framework 3.5 版中引入了 CompositionLength。有关更多信息,请参见 .NET Framework 3.5 体系结构。
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
.NET Framework
受以下版本支持:3.5 SP1、3.0 SP1
参考