次の方法で共有


InkAnalyzerBase.ModifyTopAlternate メソッド (AnalysisAlternateBase, Boolean)

現在の最上位代替候補を、指定した AnalysisAlternateBase に変更します。

名前空間 :  System.Windows.Ink.AnalysisCore
アセンブリ :  IACore (IACore.dll 内)

構文

'宣言
Public Function ModifyTopAlternate ( _
    alternate As AnalysisAlternateBase, _
    confirmAutomatically As Boolean _
) As Boolean
'使用
Dim instance As InkAnalyzerBase
Dim alternate As AnalysisAlternateBase
Dim confirmAutomatically As Boolean
Dim returnValue As Boolean

returnValue = instance.ModifyTopAlternate(alternate, _
    confirmAutomatically)
public bool ModifyTopAlternate(
    AnalysisAlternateBase alternate,
    bool confirmAutomatically
)
public:
bool ModifyTopAlternate(
    AnalysisAlternateBase^ alternate, 
    bool confirmAutomatically
)
public boolean ModifyTopAlternate(
    AnalysisAlternateBase alternate,
    boolean confirmAutomatically
)
public function ModifyTopAlternate(
    alternate : AnalysisAlternateBase, 
    confirmAutomatically : boolean
) : boolean

パラメータ

  • confirmAutomatically
    型 : System.Boolean
    分析代替候補オブジェクトに対応するすべてのインク リーフ コンテキスト ノードを設定して、確認するプロパティ NodeTypeAndProperties をそれらのノードに適用する場合は、true。分析代替候補オブジェクトに対応するすべてのインク リーフ コンテキスト ノードを設定して、確認するプロパティ None をそれらのノードに適用する場合は、false。

戻り値

型 : System.Boolean

解説

分析代替候補を取得するには、GetAlternates を使用します。分析代替候補に関連付けられたコンテキスト ノードを取得するには、AnalysisAlternateBase.AlternateNodes を使用します。

コンテキスト ノードの確認の型を変更するには、ContextNodeBase.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

参照

参照

InkAnalyzerBase クラス

InkAnalyzerBase メンバ

ModifyTopAlternate オーバーロード

System.Windows.Ink.AnalysisCore 名前空間

System.Windows.Ink.AnalysisCore.AnalysisAlternateBase

System.Windows.Ink.AnalysisCore.ContextNodeBase

System.Windows.Ink.AnalysisCore.ConfirmationType