Syncfusion.Gauge.WPF
Members  Example 


Syncfusion.Windows.Gauge Namespace : CircularGauge Class

CircularGauge Class

Represents the CircularGauge UI element.
Object Model
CircularGauge ClassCustomLabelsCollection ClassCircularCustomLabel ClassGaugeAdorner ClassImagesCollection ClassGaugeImage ClassScaleCollection ClassCircularScale ClassStateIndicatorsCollection ClassStateIndicator Class
Syntax
'Declaration
 
<SkinTypeAttribute(SkinVisualStyle=Skin.Office2003, 
   Type=Syncfusion.Windows.Gauge.CircularGauge, 
   XamlResource="/Syncfusion.Gauge.WPF;component/Themes/Office2003Style.xaml")>
<StyleTypedPropertyAttribute(Property="MajorTickStyle", StyleTargetType=Syncfusion.Windows.Gauge.CircularMarkTick)>
<XmlLangPropertyAttribute("Language")>
<UsableDuringInitializationAttribute(True)>
<RuntimeNamePropertyAttribute("Name")>
<UidPropertyAttribute("Uid")>
<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
<NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
Public Class CircularGauge 
   Inherits GaugeBase
'Usage
 
Dim instance As CircularGauge
[SkinType(SkinVisualStyle=Skin.Office2003, 
   Type=Syncfusion.Windows.Gauge.CircularGauge, 
   XamlResource="/Syncfusion.Gauge.WPF;component/Themes/Office2003Style.xaml")]
[StyleTypedProperty(Property="MajorTickStyle", StyleTargetType=Syncfusion.Windows.Gauge.CircularMarkTick)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public class CircularGauge : GaugeBase 
Remarks
Circular gauges are perfect for presenting values of a specific range. It can be used to create sophisticated gaming applications, dashboards, clocks, industrial equipments and many more.In short it could be used for almost anything one could ever imagine of, for representing a range of values in Circular form. Circular gauge can accommodate multiple scales, pointers, ranges, state indicators, labels and images.It has a virtual bounded rectangle around it. The top-left corner of the virtual bounded rectangle is represented by the co-ordinate(0, 0) and that of the bottom-right is represented by (100, 100).Each and every gauge element is drawn inside the bounded rectangle based on the location property.
Example
XAML Object Element Usage

C#
public partial class CircularGauge : Control

The following example shows how to create a CircularGauge in XAML.

The following example shows how to create a CircularGauge in C#.

public partial class CircularGauge : Control
using System.Windows;
using System.Windows.Controls;
using Syncfusion.Windows.Shared;
using Syncfusion.Windows.Gauge;
namespace CircularGaugeSample
{
    public partial class Window1 : Window
    {
       private CircularScale m_scale;
       private StateIndicator m_indicator;
       public Window1()
       {
            InitializeComponent();
            m_scale = new CircularScale();
            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.circularGauge1.Scales.Add( m_scale );
            CircularLabelTick majorLabelTick = new CircularLabelTick();
            majorLabelTick.FontSize = 11;
            majorLabelTick.TickStyle = TickStyle.MajorTick;
            majorLabelTick.TickPlacement = ScalePlacement.Inside;
            majorLabelTick.DistanceFromScale = 5;
            CircularMarkTick majorTick = new CircularMarkTick();
            majorTick.TickWidth = 4;
            majorTick.TickHeight = 9;
            majorTick.TickStyle = TickStyle.MajorTick;
            majorTick.BackgroundBrush = new SolidColorBrush( Color.FromRgb( 0, 59, 137 ) );
            majorTick.TickShape = TickShape.Ellipse;
            CircularMarkTick minorTick = new CircularMarkTick();
            minorTick.TickWidth = 1;
            minorTick.TickHeight = 4;
            minorTick.TickStyle = TickStyle.MinorTick;
            minorTick.BackgroundBrush = new SolidColorBrush( Color.FromRgb( 0, 59, 137 ) );
            m_scale.Ticks.Add( minorTick );
            m_scale.Ticks.Add( majorTick );
            m_scale.Ticks.Add( majorLabelTick );
            m_scale.PointerCap.PointerCapRadius = 5;
            m_scale.PointerCap.BackgroundBrush = new RadialGradientBrush( Color.FromRgb( 194, 207, 229 ), Color.FromRgb( 46, 94, 160 ) );
            CircularPointer pointer1 = new CircularPointer();
            pointer1.BackgroundBrush = new LinearGradientBrush( Color.FromRgb( 194, 207, 229 ), Color.FromRgb( 46, 94, 160 ), 90 );
            pointer1.PointerPlacement = ScalePlacement.Outside;
            m_scale.Pointers.Add( pointer1 );
            m_indicator = new StateIndicator();
            m_indicator.StateRanges.Add( new StateRange( 10, 20 ) );
            m_indicator.StateRanges.Add( new StateRange( 50, 60 ) );
            m_indicator.BackgroundBrush = new RadialGradientBrush( Colors.White, Colors.DarkGreen );
            m_indicator.ActiveBackgroundBrush = new RadialGradientBrush( Colors.White, Colors.Red );
            m_indicator.IndicatorWidth = 20;
            m_indicator.IndicatorHeight = 20;
            m_indicator.Location = new Point( 50, 80 );
            circularGauge1.StateIndicators.Add( m_indicator );
        }
    }
}
Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Control
                     Syncfusion.Windows.Gauge.GaugeBase
                        Syncfusion.Windows.Gauge.CircularGauge
                           Syncfusion.Windows.Gauge.Olap.OlapCircularGauge

AssemblyVersion

Syncfusion.Gauge.WPF: 18.2460.0.44

See Also