This documentation is archived and is not being maintained.

AnnotationHelper.ClearHighlightsForSelection Method

Clears all highlight annotations from the current selection of the viewer control associated with the given AnnotationService.

Namespace:  System.Windows.Annotations
Assembly:  PresentationFramework (in PresentationFramework.dll)

public static void ClearHighlightsForSelection(
	AnnotationService service
)
You cannot use methods in XAML.

Parameters

service
Type: System.Windows.Annotations.AnnotationService

The annotation service from which to remove highlight annotations.

ExceptionCondition
ArgumentNullException

service is null.

ArgumentException

service is not enabled.

If the current viewer selection is zero length or does not overlap any annotation highlights, ClearHighlightsForSelection performs no operation.

If the current viewer selection overlaps a highlight only partially, only the portion of the selection that overlaps is cleared and the unselected portion of the annotation highlight remains.

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.

.NET Framework

Supported in: 3.5, 3.0
Show: