InkAnalyzerBase.ModifyTopAlternate - метод (AnalysisAlternateBase)
Обновлен: Ноябрь 2007
Changes the current top alternate to the specified AnalysisAlternateBase and clears the confirmation type for all context nodes associated with the alternate.
Пространство имен: 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
The alternate to set as the top alternate.
Возвращаемое значение
Тип: 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 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
См. также
Ссылки
ModifyTopAlternate - перегрузка
System.Windows.Ink.AnalysisCore - пространство имен
System.Windows.Ink.AnalysisCore.AnalysisAlternateBase