[TemplatePart(Name="PART_BoxAnnotationRoot", Type=System.Windows.Controls.Border)] [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 BoxAnnotation : AnnotationBase, 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 BoxAnnotation at X1,X2,Y1,Y2 --> <!-- NOTE: XAxisId and YAxisId are optional if you use default Ids on a single X,Y Axis --> <s:BoxAnnotation X1="1" X2="2" Y1="3" Y2="4" BorderBrush="Orange" Background="#33FF6600" BorderThickness="2" CornerRadius="2" AnnotationCanvas="AboveChart" IsSelected="False" IsEditable="False" XAxisId="DefaultAxisId" YAxisId="DefaultAxisId" /> </s:SciChartSurface.Annotations> </s:SciChartSurface>
var sciChartSurface = new SciChartSurface(); sciChartSurface.XAxis = new NumericAxis() { Id = "DefaultAxisId" }; sciChartSurface.YAxis = new NumericAxis() { Id = "DefaultAxisId" }; // Declare a BoxAnnotation 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 BoxAnnotation() { X1 = 1, X2 = 2, Y1 = 3, Y2 = 4, BorderBrush = new SolidColorBrush(Colors.Orange), Background = new SolidColorBrush(Colors.FromArgb(0x33, 0xFF, 0x66, 0x00), BorderThickness = new Thickness(2), CornerRadius = new Thickness(2), AnnotationCanvas = AnnotationCanvas.AboveChart, IsSelected = false, IsEditable = false, XAxisId = "DefaultAxisId", YAxisId = "DefaultAxisId", });
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.BoxAnnotation
SciChart.Charting.Visuals.Annotations.BoxAnnotationForMvvm
SciChart.Charting.Visuals.Annotations.CompositeAnnotation
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