Class CircularRange
Represents the range visual element, which spans a range of consecutive values represented by a visual.
Inherited Members
Namespace: Syncfusion.Windows.Gauge
Assembly: Syncfusion.Gauge.WPF.dll
Syntax
public class CircularRange : RangeBase
Remarks
The Range's EndValue should be specified before StartValue because of the constraint that the StartValue should not be greater than EndValue
Examples
using System;
using System.Windows;
using System.Windows.Controls;
using Syncfusion.Windows.Shared;
using Syncfusion.Windows.Gauge;
namespace CircularRangeSample
{
public partial class Window1 : Window
{
private CircularScale m_scale;
private CircularGauge m_gauge;
public Window1()
{
InitializeComponent();
m_scale = new CircularScale();
m_gauge = new CircularGauge();
m_scale.ShadowOffset = 1;
m_scale.Minimum = 0;
m_scale.Maximum = 100;
m_scale.MinorIntervalValue = 2;
m_scale.MajorIntervalValue = 10;
m_scale.StartAngle = 120;
m_scale.GapSweepAngle = 300;
m_scale.ScaleBarSize = 1.5;
m_scale.Radius = 116;
this.m_gauge.Scales.Add(m_scale);
CircularRange range1 = new CircularRange();
range1.StartValue = 40;
range1.EndValue = 80;
range1.StartWidth = 5;
range1.EndWidth = 20;
range1.RangePosition = ScalePlacement.Inside;
range1.DistanceFromScale = 7;
m_scale.Ranges.Add(range1);
this.Content = m_gauge;
}
}
}
Constructors
CircularRange()
Initializes a new instance of the CircularRange class.
Declaration
public CircularRange()
Fields
IsLogarithmicProperty
Declaration
public static readonly DependencyProperty IsLogarithmicProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
IsLogarithmic
Declaration
public bool IsLogarithmic { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
ArrangeOverride(Size)
Positions child elements and determines a size for the element.
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | finalSize | The final area within the parent that this element should use to arrange itself and its children. |
Returns
Type | Description |
---|---|
System.Windows.Size | The actual size used. |
Remarks
The startOuterRadius,middleOuterRadius,endOuterRadius, startInnerRadius,middleInnerRadius and endInnerRadius were calculated according to the appropriate ScalePlacement values and then Range's PathFigure was created.
MeasureOverride(Size)
Measures the size in layout required for child elements and determines a size for the element.
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | availableSize | The available size that this element can give to child elements. |
Returns
Type | Description |
---|---|
System.Windows.Size | The size that this element determines it needs during layout. |
OnBindIndicatorChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises StartValueChanged/> event.
Declaration
protected override void OnBindIndicatorChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
Overrides
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized property is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The System.EventArgs that contains the event data. |
OnRender(DrawingContext)
Participates in rendering operations that are directed by the layout system.
Declaration
protected override void OnRender(DrawingContext drawingContext)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.DrawingContext | drawingContext | The drawing instructions for a specific element. |