Hi, Andrew. I want to change the style of the control handle of annotation, including color, size, shape and so on. Forthmore, I want to and a rotating handle, even the control handle of corner radius in BoxAnnotation. Could you give me some suggestions?
- wang siyuan asked 8 years ago
- You must login to post comments
Hi Wang,
The AnnotationBase.ResizingGripsStyle property allows you to template the control handles of the annotation.
For example:
<Style x:Key="GripStyle" TargetType="Thumb">
<Setter Property="Background" Value="Red" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="BorderBrush" Value="Purple" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="Width" Value="20" />
<Setter Property="Height" Value="15" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Ellipse Fill="{TemplateBinding Background}" Stroke="{TemplateBinding Foreground}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<s:BoxAnnotation Background="Green"
BorderBrush="Black"
IsEditable="True"
ResizingGripsStyle="{StaticResource GripStyle}"
X1="2"
X2="7"
Y1="2"
Y2="7" />
Will change the resizing grip to an ellipse.
Please also see https://www.scichart.com/questions/question/custom-annotation-selection-markers where we have the full control template of the resizing grips if you wish to do further customisation.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 8 years ago
- That's great, many thanks.
- You must login to post comments
Please login first to submit.