コンテキスト ノードのコレクションに対応する、認識された文字列のテキスト範囲を検索します。
名前空間 : System.Windows.Ink.AnalysisCore
アセンブリ : IACore (IACore.dll 内)
構文
'宣言
Public Sub GetTextRangeFromNodes ( _
nodesToSearch As ContextNodeBaseCollection, _
<OutAttribute> ByRef start As Integer, _
<OutAttribute> ByRef length As Integer _
)
'使用
Dim instance As InkAnalyzerBase
Dim nodesToSearch As ContextNodeBaseCollection
Dim start As Integer
Dim length As Integer
instance.GetTextRangeFromNodes(nodesToSearch, _
start, length)
public void GetTextRangeFromNodes(
ContextNodeBaseCollection nodesToSearch,
out int start,
out int length
)
public:
void GetTextRangeFromNodes(
ContextNodeBaseCollection^ nodesToSearch,
[OutAttribute] int% start,
[OutAttribute] int% length
)
public void GetTextRangeFromNodes(
ContextNodeBaseCollection nodesToSearch,
/** @attribute OutAttribute */ /** @ref */int start,
/** @attribute OutAttribute */ /** @ref */int length
)
public function GetTextRangeFromNodes(
nodesToSearch : ContextNodeBaseCollection,
start : int,
length : int
)
パラメータ
- nodesToSearch
型 : System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection
テキスト範囲を検索するコンテキスト ノードのコレクション。
- start
型 : System.Int32%
このメソッドが返されるとき、start パラメータにはテキスト範囲の開始点を示す 32 ビット符号付き整数が含まれます。このパラメータは初期化せずに渡されます。
- length
型 : System.Int32%
このメソッドが返されるとき、length パラメータにはテキスト範囲の長さを示す 32 ビット符号付き整数が含まれます。このパラメータは初期化せずに渡されます。
解説
nodesToSearch に、連続していない ContextNodeBase オブジェクトが含まれる場合、このメソッドはすべてのコンテキスト ノードが含まれる最小のテキスト範囲を返します。
InkAnalyzerBase に関連付けられていないコンテキスト ノードが nodesToSearch に含まれる場合、このメソッドは System.ArgumentException をスローします。
例
次の例では、InkAnalyzerBase、theInkAnalyzerBase の最初のライン ノードのテキスト範囲を取得します。
' Get all line nodes.
Dim theLineNodes As System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection = _
theInkAnalyzerBase.FindNodesOfType( _
System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Line)
' Remove all but the first line node.
If 0 < theLineNodes.Count Then
Dim firstLineNode As System.Windows.Ink.AnalysisCore.ContextNodeBase = theLineNodes(0)
theLineNodes.Clear()
theLineNodes.Add(firstLineNode)
End If
' Get the text range for the first line node.
Dim selectionStart As Integer = 0
Dim selectionLength As Integer = 0
If 0 < theLineNodes.Count Then
theInkAnalyzerBase.GetTextRangeFromNodes( _
theLineNodes, selectionStart, selectionLength)
End If
// Get all line nodes.
System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection theLineNodes =
theInkAnalyzerBase.FindNodesOfType(
System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Line);
// Remove all but the first line node.
if (0 < theLineNodes.Count)
{
System.Windows.Ink.AnalysisCore.ContextNodeBase firstLineNode = theLineNodes[0];
theLineNodes.Clear();
theLineNodes.Add(firstLineNode);
}
// Get the text range for the first line node.
int selectionStart = 0;
int selectionLength = 0;
if (0 < theLineNodes.Count)
{
theInkAnalyzerBase.GetTextRangeFromNodes(
theLineNodes, out selectionStart, out selectionLength);
}
プラットフォーム
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0