SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

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.