Pre loader

How to Customize the control handle of annotation?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

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?

  • You must to post comments
0
0

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

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies