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


AnalysisStatus.AppliedChangesRegion - свойство

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

Returns the region of the document where the InkAnalyzer has changed the ContextNode tree.

Пространство имен:  System.Windows.Ink
Сборка:  IAWinFX (в IAWinFX.dll)

Синтаксис

'Декларация
Public ReadOnly Property AppliedChangesRegion As AnalysisRegion
'Применение
Dim instance As AnalysisStatus
Dim value As AnalysisRegion

value = instance.AppliedChangesRegion
public AnalysisRegion AppliedChangesRegion { get; }
public:
property AnalysisRegion^ AppliedChangesRegion {
    AnalysisRegion^ get ();
}
/** @property */
public AnalysisRegion get_AppliedChangesRegion()
public function get AppliedChangesRegion () : AnalysisRegion

Значение свойства

Тип: System.Windows.Ink.AnalysisRegion
The AnalysisRegion of the document where changes were updated.

Заметки

AppliedChangesRegion is used when the application must locate the area that changed. For example, the application might draw a special tag that the user clicks when modifying the analysis results.

Примеры

The following example is an ResultsUpdated event handler that is called when BackgroundAnalyze() completes an analysis. In the event handler, a Rectangle that represents the AppliedChangesRegion is drawn on an InkCanvas named theInkCanvas.

Sub theInkAnalyzer_ResultsUpdated(ByVal sender As Object, _
                                  ByVal e As ResultsUpdatedEventArgs)

    Dim status As AnalysisStatus = e.Status

    ' Draw a rectangle around the changed region.
    If status.Successful Then

        Dim bounds As Rect = status.AppliedChangesRegion.GetBounds()
        Dim box As Rectangle = New Rectangle()

        box.Width = bounds.Width
        box.Height = bounds.Height
        InkCanvas.SetTop(box, bounds.Top)
        InkCanvas.SetLeft(box, bounds.Left)

        box.Stroke = Brushes.Black
        theInkCanvas.Children.Add(box)
    End If

End Sub 'theInkAnalyzer_ResultsUpdated
void theInkAnalyzer_ResultsUpdated(object sender, ResultsUpdatedEventArgs e)
{
    AnalysisStatus status = e.Status;

    // Draw a rectangle around the changed region.
    if (status.Successful)
    {
        Rect bounds = status.AppliedChangesRegion.GetBounds();
        Rectangle box = new Rectangle();

        box.Width = bounds.Width;
        box.Height = bounds.Height;
        InkCanvas.SetTop(box, bounds.Top);
        InkCanvas.SetLeft(box, bounds.Left);

        box.Stroke = Brushes.Black;
        theInkCanvas.Children.Add(box);
    }

}

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

AnalysisStatus Класс

AnalysisStatus - члены

System.Windows.Ink - пространство имен