Pre loader

insert image to box annotation as background?

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

0
0
      <s:SciChartSurface.Annotations>
            <s:BoxAnnotation X1="25" X2="75" Y1="0" Y2="100" Background="#33FFFFFF" 
                BorderBrush="#55FFFFFF" BorderThickness="3" Padding="5">

                <s:BoxAnnotation.Template>

                    <ControlTemplate TargetType="s:BoxAnnotation">


                        <Border x:Name="PART_BoxAnnotationRoot" 
           Margin="{TemplateBinding Margin}"
           Background="{TemplateBinding Background}"
           BorderBrush="{TemplateBinding BorderBrush}"
           BorderThickness="{TemplateBinding BorderThickness}"
           CornerRadius="{TemplateBinding CornerRadius}">
                            <Viewbox Margin="{TemplateBinding Padding}" >
                                <TextBlock Text="Hello CustomAnnotation World!"></TextBlock>

                            </Viewbox>
                        </Border>

                    </ControlTemplate>
                </s:BoxAnnotation.Template>
            </s:BoxAnnotation>
        </s:SciChartSurface.Annotations>

by below tag or a code?

Version
last
  • You must to post comments
0
0

Im not sure I understand the question.

To put an image inside an annotation, you simply change the control template to contain an image.

<s:SciChartSurface.Annotations>
      <s:BoxAnnotation X1="25" X2="75" Y1="0" Y2="100" >

          <s:BoxAnnotation.Template>

              <ControlTemplate TargetType="s:BoxAnnotation">


                  <Border x:Name="PART_BoxAnnotationRoot"
     Margin="{TemplateBinding Margin}"
     Background="{TemplateBinding Background}"
     BorderBrush="{TemplateBinding BorderBrush}"
     BorderThickness="{TemplateBinding BorderThickness}"
     CornerRadius="{TemplateBinding CornerRadius}">
                      <Image source="YOUR IMAGE SOURE"/>
                  </Border>

              </ControlTemplate>
          </s:BoxAnnotation.Template>
      </s:BoxAnnotation>
  </s:SciChartSurface.Annotations>

We have an example here https://support.scichart.com/index.php?/Knowledgebase/Article/View/17209/33/custom-annotations—adding-a-watermark-to-a-chart

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