Class SfCircularGauge
Represents a control that helps user to visualize the single numerical data.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Gauges
Assembly: Syncfusion.SfGauge.WPF.dll
Syntax
public class SfCircularGauge : Control, IDisposable
Constructors
SfCircularGauge()
Initializes a new instance of the SfCircularGauge class.
Declaration
public SfCircularGauge()
Fields
AnnotationsProperty
Using a DependencyProperty as the backing store for Annotations. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty AnnotationsProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CircularScaleStyleProperty
Using a DependencyProperty as the backing store for CircularScaleStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty CircularScaleStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
GaugeHeaderMarginProperty
Using a DependencyProperty as the backing store for GaugeHeaderMargin. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty GaugeHeaderMarginProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
GaugeHeaderPositionProperty
Using a DependencyProperty as the backing store for GaugeHeaderPosition. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty GaugeHeaderPositionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
GaugeHeaderProperty
Using a DependencyProperty as the backing store for CustomObject. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty GaugeHeaderProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
GaugeTypeProperty
Using a DependencyProperty as the backing store for GaugeTypes. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty GaugeTypeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HeaderAlignmentProperty
Using a DependencyProperty as the backing store for HeaderPositionType. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ScalesProperty
Using a DependencyProperty as the backing store for Scales. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScalesProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SpacingMarginProperty
Using a DependencyProperty as the backing store for SpacingMargin. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SpacingMarginProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SubScalesProperty
Using a DependencyProperty as the backing store for SubScales. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SubScalesProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
Annotations
Gets or sets the annotations for the circular gauge. It marks the specific area in the circular gauge. This is a bindable property.
Declaration
public CircularGaugeAnnotationCollection Annotations { get; set; }
Property Value
Type | Description |
---|---|
CircularGaugeAnnotationCollection | This property takes the CircularGaugeAnnotationCollection as value |
CircularScaleStyle
Gets or sets the style to the CircularScale in the SfCircularGauge.
Declaration
public Style CircularScaleStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Style | Style |
GaugeHeader
Gets or sets the header for CircularGauge.
Declaration
public object GaugeHeader { get; set; }
Property Value
Type | Description |
---|---|
System.Object | Object |
Examples
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Common;
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeWinRTSamples
{
public sealed partial class GaugePosition :SampleView
{
public GaugePosition()
{
InitializeComponent();
SfCircularGauge gauge = new SfCircularGauge();
gauge.GaugeHeader = "Syncfusion";
}
}
}
GaugeHeaderPosition
Gets or sets the position of the GaugeHeader of the SfCircularGauge.
Declaration
public Point GaugeHeaderPosition { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Point | Point |
Examples
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Common;
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeWinRTSamples
{
public sealed partial class GaugePosition :SampleView
{
public GaugePosition()
{
InitializeComponent();
SfCircularGauge gauge = new SfCircularGauge();
gauge.GaugeHeader = "Syncfusion";
gauge.GaugeHeaderPosition = new Point(100, 200);
}
}
}
GaugeType
Gets or sets the type of CircularGauge.
Declaration
public CircularGaugeTypes GaugeType { get; set; }
Property Value
Type | Description |
---|---|
CircularGaugeTypes | Object |
Examples
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Common;
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeWinRTSamples
{
public sealed partial class GaugePosition :SampleView
{
public GaugePosition()
{
InitializeComponent();
SfCircularGauge gauge = new SfCircularGauge();
gauge.GaugeType = CircularGaugeTypes.None;
}
}
}
HeaderAlignment
Gets or sets the alignments of the GaugeHeader of the SfCircularGauge.
Declaration
public HeaderAlignment HeaderAlignment { get; set; }
Property Value
Type | Description |
---|---|
HeaderAlignment | HeaderAlignment |
Examples
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Common;
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeWinRTSamples
{
public sealed partial class GaugePosition :SampleView
{
public GaugePosition()
{
InitializeComponent();
SfCircularGauge gauge = new SfCircularGauge();
gauge.GaugeHeader = "Syncfusion";
gauge.HeaderAlignment=HeaderAlignment.Center;
}
}
}
MainScale
Declaration
public CircularScale MainScale { get; set; }
Property Value
Type |
---|
CircularScale |
Scales
Gets or sets the collection of Scales to the ciruclar gauge.
Declaration
public ObservableCollection<CircularScale> Scales { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<CircularScale> | CircularScale |
Examples
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Common;
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeWinRTSamples
{
public sealed partial class GaugePosition :SampleView
{
public GaugePosition()
{
InitializeComponent();
SfCircularGauge gauge = new SfCircularGauge();
CircularScale scale = new CircularScale();
scale.Height = 300;
scale.Width = 300;
scale.StartAngle = 180;
scale.SweepAngle = 180;
scale.StartValue = 0;
scale.EndValue = 100;
scale.Height = 200;
scale.Width = 200;
gauge.Scales.Add(scale);
}
}
}
SpacingMargin
Gets or sets the outer margin of the SfCircularGauge.
Declaration
public double SpacingMargin { get; set; }
Property Value
Type | Description |
---|---|
System.Double | double |
Remarks
SpacingMargin property is used to place the SfCircularGauge in the center of the container. And also it decides the size of the SfCircularGauge. Value of the property should reside between 0.1 and 1.0. The default value is 1.0.
SubScales
Gets or sets the collection of subscales to be added in the same gauge.
Declaration
public ObservableCollection<CircularScale> SubScales { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<CircularScale> | ObservableCollection |
Remarks
Use Scales Property of CircularGauge to add CircularScale instead of using MainScale and SubScales Properties.
Examples
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Common;
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeWinRTSamples
{
public sealed partial class GaugePosition :SampleView
{
public GaugePosition()
{
InitializeComponent();
SfCircularGauge gauge = new SfCircularGauge();
CircularScale subScale1 = new CircularScale();
CircularScale subScale2 = new CircularScale();
subScale1.Height = 300;
subScale1.Width = 300;
subScale1.StartAngle = 180;
subScale1.SweepAngle = 180;
subScale1.SweepDirection = SweepDirection.Clockwise;
subScale1.StartValue = 0;
subScale1.EndValue = 100;
subScale1.Height = 200;
subScale1.Width = 200;
subScale2.StartAngle = 270;
subScale2.SweepAngle = 180;
subScale2.SweepDirection = SweepDirection.Clockwise;
subScale2.StartValue = 0;
subScale2.EndValue = 200;
gauge.SubScales.Add(subScale1);
gauge.SubScales.Add(subScale2);
}
}
}
Methods
Dispose()
Method to release allocated resources of SfCircularGauge.
Declaration
public void Dispose()
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnMouseLeave(MouseEventArgs)
Invoked when the MouseLeave
attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. |
OnMouseMove(MouseEventArgs)
Invoked when the MouseMove
attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. |
OnMouseUp(MouseButtonEventArgs)
Invoked when the MouseUp
attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. |