Поделиться через


InkAnalyzerBase.ModifyTopAlternate - метод (AnalysisAlternateBase, Boolean)

Обновлен: Ноябрь 2007

Changes the current top alternate to the specified 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
    true to set all of the ink leaf context nodes that correspond to the analysis alternate object to have a confirmed property of NodeTypeAndProperties applied to them; false to set all of the ink leaf context nodes that correspond to the analysis alternate object to have a confirmed property of None applied to them.

Возвращаемое значение

Тип: System.Boolean

Заметки

To get analysis alternates, use GetAlternates. To get the context nodes associated with an analysis alternate, use AnalysisAlternateBase.AlternateNodes.

To change the confirmation type for a context node, use ContextNodeBase.Confirm.

Примеры

The following example modifies the top alternate for the ContextNodeBaseCollection, theLineNodes. In this example, theLineNodes contains selected line nodes from the InkAnalyzerBase, theInkAnalyzerBase. The Boolean value confirmationEnabled indicates whether the application has enabled node confirmation. If the application has enabled node confirmation, the Boolean value confirmAutomatically indicates whether the existing confirmation type is cleared or maintained.

The example uses a helper method, SelectAnalysisAlternate, to select the analysis alternate to set as the top alternate.

' 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 с пакетом обновления 2 (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