現在の最上位代替候補を、指定した AnalysisAlternateBase に変更し、代替候補に関連付けられたすべてのコンテキスト ノードの確認の型をクリアします。
名前空間 : System.Windows.Ink.AnalysisCore
アセンブリ : IACore (IACore.dll 内)
構文
'宣言
Public Function ModifyTopAlternate ( _
alternate As AnalysisAlternateBase _
) As Boolean
'使用
Dim instance As InkAnalyzerBase
Dim alternate As AnalysisAlternateBase
Dim returnValue As Boolean
returnValue = instance.ModifyTopAlternate(alternate)
public bool ModifyTopAlternate(
AnalysisAlternateBase alternate
)
public:
bool ModifyTopAlternate(
AnalysisAlternateBase^ alternate
)
public boolean ModifyTopAlternate(
AnalysisAlternateBase alternate
)
public function ModifyTopAlternate(
alternate : AnalysisAlternateBase
) : boolean
パラメータ
- alternate
型 : System.Windows.Ink.AnalysisCore.AnalysisAlternateBase
最上位代替候補として設定する代替候補。
戻り値
型 : System.Boolean
解説
分析代替候補を取得するには、GetAlternates を使用します。分析代替候補に関連付けられたコンテキスト ノードを取得するには、AnalysisAlternateBase.AlternateNodes を使用します。
コンテキスト ノードの確認の型を変更するには、Confirm を使用します。
例
次の例では、ContextNodeBaseCollection、theLineNodes の最上位代替候補を変更します。この例では、theLineNodes には InkAnalyzerBase、theInkAnalyzerBase から選択したライン ノードが含まれています。アプリケーションがノード確認を有効にしたかどうかを示すブール値 confirmationEnabled。アプリケーションがノード確認を有効にした場合、ブール値 confirmAutomatically は既存の確認の型がクリアされたか、保持されたかを示します。
この例では、ヘルパ メソッド SelectAnalysisAlternate を使用して、最上位代替候補として設定する分析代替候補を選択します。
' Get alternates for the specified line nodes.
Dim theAlternates As System.Windows.Ink.AnalysisCore.AnalysisAlternateBaseCollection = _
theInkAnalyzerBase.GetAlternates(theLineNodes)
' Use a helper method to get the user's choice of alternate.
Dim selectedAlternate As System.Windows.Ink.AnalysisCore.AnalysisAlternateBase = _
Me.SelectAnalysisAlternate(theAlternates)
' Set the chosen alternate as the top alternate.
If confirmationEnabled Then
' If node confirmation is enabled, use the current setting
' of confirmAutomatically to keep or clear the existing
' confirmation status of the line nodes.
theInkAnalyzerBase.ModifyTopAlternate( _
selectedAlternate, confirmAutomatically)
Else
' Otherwise, clear the confirmation as part of modifying
' the top alternate.
theInkAnalyzerBase.ModifyTopAlternate(selectedAlternate)
End If
// Get alternates for the specified line nodes.
System.Windows.Ink.AnalysisCore.AnalysisAlternateBaseCollection theAlternates =
theInkAnalyzerBase.GetAlternates(theLineNodes);
// Use a helper method to get the user's choice of alternate.
System.Windows.Ink.AnalysisCore.AnalysisAlternateBase selectedAlternate =
this.SelectAnalysisAlternate(theAlternates);
// Set the chosen alternate as the top alternate.
if (confirmationEnabled)
{
// If node confirmation is enabled, use the current setting
// of confirmAutomatically to keep or clear the existing
// confirmation status of the line nodes.
theInkAnalyzerBase.ModifyTopAlternate(
selectedAlternate, confirmAutomatically);
}
else
{
// Otherwise, clear the confirmation as part of modifying
// the top alternate.
theInkAnalyzerBase.ModifyTopAlternate(selectedAlternate);
}
プラットフォーム
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0
参照
参照
System.Windows.Ink.AnalysisCore 名前空間
System.Windows.Ink.AnalysisCore.AnalysisAlternateBase