Changing visual appearance of interaction points of annotations in WPF
In This Topic
In "Author" mode the interaction between user and annotations is performed using interaction controllers. Each interaction controller consists from a set of interaction areas (resizing points, points of polygon, rotation point, rotation assistant, etc).
SDK provides the helper-class
WpfAnnotationInteractionAreaAppearanceManager, which allows to change the visual appearance settings of interaction areas of visual tool derived from
WpfUserInteractionVisualTool class.
Here is C#/VB.NET code that shows how to change radius of interaction points (resizing points, points of polygon, rotation point) used by user for interaction with annotations:
public MainWindow()
{
//...
Vintasoft.Imaging.Wpf.UI.VisualTools.UserInteraction.WpfInteractionAreaAppearanceManager appearanceManager =
new Vintasoft.Imaging.Wpf.UI.VisualTools.UserInteraction.WpfInteractionAreaAppearanceManager();
appearanceManager.VisualTool = annotationViewer.AnnotationVisualTool;
// set distance from annotation to rotation point
appearanceManager.RotationPointDistance = 30;
// set radius of rotation point
appearanceManager.RotationPointRadius = 10;
// set radius of resize point
appearanceManager.ResizePointsRadius = 10;
// set radius of polygon point
appearanceManager.PolygonPointRadius = 8;
}
Public Sub New()
'...
Dim appearanceManager As New Vintasoft.Imaging.Wpf.UI.VisualTools.UserInteraction.WpfInteractionAreaAppearanceManager()
appearanceManager.VisualTool = annotationViewer.AnnotationVisualTool
' set distance from annotation to rotation point
appearanceManager.RotationPointDistance = 30
' set radius of rotation point
appearanceManager.RotationPointRadius = 10
' set radius of resize point
appearanceManager.ResizePointsRadius = 10
' set radius of polygon point
appearanceManager.PolygonPointRadius = 8
End Sub