InkAnalyzer.DirtyRegion Property
Gets the area that has changed since the last analysis operation.
Namespace: System.Windows.Ink
Assembly: IAWinFX (in IAWinFX.dll)
Syntax
'Declaration
Public ReadOnly Property DirtyRegion As AnalysisRegion
'Usage
Dim instance As InkAnalyzer
Dim value As AnalysisRegion
value = instance.DirtyRegion
public AnalysisRegion DirtyRegion { get; }
public:
property AnalysisRegion^ DirtyRegion {
AnalysisRegion^ get ();
}
public function get DirtyRegion () : AnalysisRegion
Property Value
Type: System.Windows.Ink.AnalysisRegion
The area that has changed since the last analysis operation.
Remarks
This property identifies areas that need to be analyzed or reanalyzed. InkAnalyzer methods add, remove, or update stroke data for the DirtyRegion. To manually mark an area for reanalysis, use the DirtyRegion object's Union method.
If called, the Analyze or BackgroundAnalyze methods analyze ink within the DirtyRegion of the InkAnalyzer.
This property may contain nonadjacent areas.
Examples
This example demonstrates user-initiated ink analysis within an application. An event handler, analyzeButton_Click, handles the user request for analysis results. The event handler performs analysis only if the InkAnalyzer object's DirtyRegion is not empty.
Sub analyzeButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
' Only start ink analysis if the dirty region is not empty.
If Not Me.theInkAnalyzer.DirtyRegion.IsEmpty Then
' Perform the ink analysis.
Dim theStatus As AnalysisStatus = Me.theInkAnalyzer.Analyze()
' Update the analysis results on the form.
Me.UpdateResults()
End If
End Sub 'analyzeButton_Click
void analyzeButton_Click(object sender, RoutedEventArgs e)
{
// Only start ink analysis if the dirty region is not empty.
if (!this.theInkAnalyzer.DirtyRegion.IsEmpty)
{
// Perform the ink analysis.
AnalysisStatus theStatus =
this.theInkAnalyzer.Analyze();
// Update the analysis results on the form.
this.UpdateResults();
}
}
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
InkAnalyzerBaseBackgroundAnalyze
InkAnalyzerRemoveStroke
InkAnalyzerRemoveStrokes