
[AbtLicenseProvider(SciChart.Charting.Licensing.AnnotationAbtLicenseProvider)] [DefaultProperty("Content")] [ContentProperty("Content")] [Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)] [StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)] [XmlLangProperty("Language")] [UsableDuringInitialization(true)] [RuntimeNameProperty("Name")] [UidProperty("Uid")] [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)] [NameScopeProperty("NameScope", System.Windows.NameScope)] public class CustomAnnotation : AnchorPointAnnotation, IAnchorPointAnnotation, IAnnotation, SciChart.Core.Framework.IHitTestable, SciChart.Core.Framework.ISuspendable
<!-- where xmlns:s="http://schemas.abtsoftware.co.uk/scichart"--> <s:SciChartSurface> <!-- RenderableSeries omitted for brevity --> <s:SciChartSurface.XAxis> <s:NumericAxis Id="DefaultAxisId"/> </s:SciChartSurface.XAxis> <s:SciChartSurface.YAxis> <s:NumericAxis Id="DefaultAxisId"/> </s:SciChartSurface.YAxis> <s:SciChartSurface.Annotations> <!-- Declare a CustomAnnotation at X1,X2 --> <!-- NOTE: XAxisId and YAxisId are optional if you use default Ids on a single X,Y Axis --> <s:CustomAnnotation X1="1" X2="2" HorizontalAnchorPoint="Center" VerticalAnchorPoint="Top" AnnotationCanvas="AboveChart" IsSelected="False" IsEditable="False" XAxisId="DefaultAxisId" YAxisId="DefaultAxisId"> <s:CustomAnnotation.Content> <Path Data="m 4 14 4 0 0 -8 3 0 -5 -5 -5 5 3 0 z" Fill="#571CB61C" Stroke="#FF00B400" StrokeThickness="1"/> </s:CustomAnnotation.Content> </s:CustomAnnotation> </s:SciChartSurface.Annotations> </s:SciChartSurface>
var sciChartSurface = new SciChartSurface(); sciChartSurface.XAxis = new NumericAxis() { Id = "DefaultAxisId" }; sciChartSurface.YAxis = new NumericAxis() { Id = "DefaultAxisId" }; // Declare a LineAnnotation at X1,X2,Y1,Y2 // NOTE: XAxisId and YAxisId are optional if you use default Ids on a single X,Y Axis sciChartSurface.Annotations.Add(new CustomAnnotation() { X1 = 1, X2 = 2 Stroke = new SolidColorBrush(Colors.Orange), HorizontalAnchorPoint = HorizontalAnchorPoint.Center, VerticalAnchorPoint = VerticalAnchorPoint.Top, AnnotationCanvas = AnnotationCanvas.AboveChart, IsSelected = false, IsEditable = false, XAxisId = "DefaultAxisId", YAxisId = "DefaultAxisId", Content = new Path() { Data = Geometry.Parse("m 4 14 4 0 0 -8 3 0 -5 -5 -5 5 3 0 z"), Fill = new SolidColorBrush(Color.FromArgb(0x57, 0x1C, 0xB6, 0x1C)), Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0xB4, 0x00)), StrokeThickness = 1, }, });
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
System.Windows.Controls.ContentControl
SciChart.Charting.ChartModifiers.ApiElementBase
SciChart.Charting.Visuals.Annotations.AnnotationBase
SciChart.Charting.Visuals.Annotations.AnchorPointAnnotation
SciChart.Charting.Visuals.Annotations.CustomAnnotation
SciChart.Charting.Visuals.Annotations.CustomAnnotationForMvvm
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2