Class CircularPointer
CircularPointer is a class that includes properties and methods to define different types of pointers
Inheritance
Namespace: Syncfusion.UI.Xaml.Gauges
Assembly: Syncfusion.SfGauge.WPF.dll
Syntax
public class CircularPointer : Control
Constructors
CircularPointer()
Initializes a new instance of the CircularPointer class.
Declaration
public CircularPointer()
Fields
AnimationDurationProperty
Declaration
public static readonly DependencyProperty AnimationDurationProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
EnableAnimationProperty
Declaration
public static readonly DependencyProperty EnableAnimationProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
EnableDraggingProperty
Declaration
public static readonly DependencyProperty EnableDraggingProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
KnobFillProperty
Declaration
public static readonly DependencyProperty KnobFillProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
KnobRadiusFactorProperty
Declaration
public static readonly DependencyProperty KnobRadiusFactorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
KnobStrokeProperty
Declaration
public static readonly DependencyProperty KnobStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
KnobStrokeThicknessProperty
Declaration
public static readonly DependencyProperty KnobStrokeThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
NeedleLengthFactorProperty
Using a DependencyProperty as the backing store for NeedleLengthFactor. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty NeedleLengthFactorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
NeedlePointerStrokeProperty
Declaration
public static readonly DependencyProperty NeedlePointerStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
NeedlePointerStrokeThicknessProperty
Declaration
public static readonly DependencyProperty NeedlePointerStrokeThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
NeedlePointerTypeProperty
Using a DependencyProperty as the backing store for NeedlePointerType. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty NeedlePointerTypeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
NeedlePointerVisibilityProperty
Declaration
public static readonly DependencyProperty NeedlePointerVisibilityProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
OffsetProperty
Declaration
public static readonly DependencyProperty OffsetProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
PointerCapDiameterProperty
Declaration
public static readonly DependencyProperty PointerCapDiameterProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
PointerCapStrokeProperty
Declaration
public static readonly DependencyProperty PointerCapStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
PointerTypeProperty
Declaration
public static readonly DependencyProperty PointerTypeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
RangeCapProperty
Declaration
public static readonly DependencyProperty RangeCapProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
RangeEndOffsetProperty
Declaration
public static readonly DependencyProperty RangeEndOffsetProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
RangePointerStrokeProperty
Declaration
public static readonly DependencyProperty RangePointerStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
RangePointerStrokeThicknessProperty
Declaration
public static readonly DependencyProperty RangePointerStrokeThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
RangePointerVisibilityProperty
Declaration
public static readonly DependencyProperty RangePointerVisibilityProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
RangeStartOffsetProperty
Declaration
public static readonly DependencyProperty RangeStartOffsetProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
RangeStartProperty
Using a DependencyProperty as the backing store for RangeStart. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty RangeStartProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolPointerHeightProperty
Using a DependencyProperty as the backing store for SymbolPointerHeight. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SymbolPointerHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolPointerStrokeProperty
Declaration
public static readonly DependencyProperty SymbolPointerStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolPointerTemplateProperty
Using a DependencyProperty as the backing store for SymbolPointerTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SymbolPointerTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolPointerVisibilityProperty
Declaration
public static readonly DependencyProperty SymbolPointerVisibilityProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolPointerWidthProperty
Using a DependencyProperty as the backing store for SymbolPointerWidth. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SymbolPointerWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolProperty
Using a DependencyProperty as the backing store for Symbol. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SymbolProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TailFillProperty
Using a DependencyProperty as the backing store for TailFill. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TailFillProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TailLengthFactorProperty
Using a DependencyProperty as the backing store for TailLengthFactor. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TailLengthFactorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TailStrokeProperty
Using a DependencyProperty as the backing store for TailStroke. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TailStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TailStrokeThicknessProperty
Using a DependencyProperty as the backing store for TailStrokeThickness. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TailStrokeThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TimerProperty
Declaration
public static readonly DependencyProperty TimerProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TimeValueProperty
Declaration
public static readonly DependencyProperty TimeValueProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ValueDiffProperty
Declaration
public static readonly DependencyProperty ValueDiffProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ValueProperty
Using a DependencyProperty as the backing store for Value. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
AnimationDuration
Gets or sets the duration of the pointer animation in milliseconds.
Declaration
public int AnimationDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer denotes the duration of animation in milliseconds. The default value is |
Remarks
animation duration property is used to set animation duration for pointer.
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.NeedlePointer;
pointer.AnimationDuration = 2000;
}
}
}
EnableAnimation
Gets or sets value indicating whether this element can be animated.
Declaration
public bool EnableAnimation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if ; otherwise, false. |
Remarks
EnableAnimation property is used to animate the movement of the pointer when the Value is of the pointer is changed. Its default value is true.
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.NeedlePointer;
pointer.EnableAnimation = false;
}
}
}
EnableDragging
Gets or sets a value indicating whether the pointer can be draggable or not.
Declaration
public bool EnableDragging { get; set; }
Property Value
Type |
---|
System.Boolean |
KnobFill
Gets or sets the knob fill color.
Declaration
public Brush KnobFill { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
KnobRadiusFactor
Gets or sets the knob radius factor. Its range is from 0 to 1.
Declaration
public double KnobRadiusFactor { get; set; }
Property Value
Type |
---|
System.Double |
KnobStroke
Gets or sets the knob stroke color.
Declaration
public Brush KnobStroke { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
KnobStrokeThickness
Gets or sets the knob stroke thickness.
Declaration
public double KnobStrokeThickness { get; set; }
Property Value
Type |
---|
System.Double |
NeedleLengthFactor
Gets or sets the value which helps to calculate the NeedleLength of the CircularPointer.
Declaration
public double NeedleLengthFactor { get; set; }
Property Value
Type | Description |
---|---|
System.Double | double |
Remarks
NeedleLengthFactor property is used to calculate the NeedleLength based on the size of the SfCircularGauge. Value of the property should reside between 0.1 and 1.0. The default value is 0.75.
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.NeedlePointer;
pointer.NeedleLengthFactor = 0.5;
gauge.MainScale.Pointers.Add(pointer);
}
}
}
NeedlePointerStroke
Gets or sets the brush that describes the NeedlePointerStroke of the CircularPointer.
Declaration
public Brush NeedlePointerStroke { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | Brush |
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.NeedlePointer;
pointer.NeedlePointerStroke = new SolidColorBrush(Colors.White);
gauge.MainScale.Pointers.Add(pointer);
}
}
}
NeedlePointerStrokeThickness
Gets or sets the thickness value of the NeedlePointer of the CircularPointer.
Declaration
public double NeedlePointerStrokeThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | double |
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.NeedlePointer;
pointer.NeedlePointerStrokeThickness = 2;
gauge.MainScale.Pointers.Add(pointer);
}
}
}
NeedlePointerType
Gets or sets the type of needle pointer.
Declaration
public NeedlePointerType NeedlePointerType { get; set; }
Property Value
Type | Description |
---|---|
NeedlePointerType | NeedlePointerType |
Remarks
The type of needle pointer can be set by using NeedlePointerType property and it’s includes following option. Rectangle, Triangle,Tapered, and Arrow. Default value of NeedlePointerType property is NeedlePointerType.Rectangle.
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.NeedlePointer;
pointer.NeedlePointerType = NeedlePointerType.Triangle;
gauge.MainScale.Pointers.Add(pointer);
}
}
}
NeedlePointerVisibility
Gets or sets user interface visibility of the NeedlePointer.
Declaration
public Visibility NeedlePointerVisibility { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Visibility | Visibility |
Remarks
There are three types of pointers. While choosing a pointer using the PointerType property the other two pointers' visibility property will be set to Collapsed. Default value is Visible.
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();
CircularPointer needlePointer = new CircularPointer();
needlePointer.Value = 80;
needlePointer.PointerType = PointerType.NeedlePointer;
needlePointer.NeedlePointerVisibility = Visibility.Collapsed;
gauge.MainScale.Pointers.Add(needlePointer);
}
}
}
Offset
Gets or sets the offset position of range and symbol pointer. Its range is from 0 to 1. Set RangePointerPosition as custom to enable offset behavior.
Declaration
public double Offset { get; set; }
Property Value
Type |
---|
System.Double |
PointerCapDiameter
Gets or sets the PointerCapDiameter value that decides the size of the PointerCap of the NeedlePointer .
Declaration
public double PointerCapDiameter { get; set; }
Property Value
Type | Description |
---|---|
System.Double | double |
Remarks
This property used to change the size of the NeedlePointer cap.
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.NeedlePointer;
pointer.PointerCapDiameter = 20;
gauge.MainScale.Pointers.Add(pointer);
}
}
}
PointerCapStroke
Gets or sets the brush that describes the PointerCapStroke of the CircularPointer.
Declaration
public Brush PointerCapStroke { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | Brush |
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.NeedlePointer;
pointer.PointerCapStroke = new SolidColorBrush(Colors.White);
gauge.MainScale.Pointers.Add(pointer);
}
}
}
PointerType
Gets or sets Type of the CircularPointer.
Declaration
public PointerType PointerType { get; set; }
Property Value
Type | Description |
---|---|
PointerType | PointerType |
Remarks
There are three types of pointers. User can choose a pointer using the PointerType property. Options are 1. NeedlePointer (Default) 2. RangePointer 3. Symbolointer
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.NeedlePointer;
gauge.MainScale.Pointers.Add(pointer);
}
}
}
RangeCap
Gets or sets the range cap on start and end position of range pointer.
Declaration
public RangeCap RangeCap { get; set; }
Property Value
Type |
---|
RangeCap |
RangeEndOffset
Gets or sets the range pointer end offset position. Its range is from 0 to 1.
Declaration
public double RangeEndOffset { get; set; }
Property Value
Type |
---|
System.Double |
RangePointerStroke
Gets or sets the brush that describes the RangePointerStroke of the CircularPointer.
Declaration
public Brush RangePointerStroke { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | Brush |
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.RangePointer;
pointer.RangePointerStroke = new SolidColorBrush(Colors.White);
gauge.MainScale.Pointers.Add(pointer);
}
}
}
RangePointerStrokeThickness
Gets or sets the thickness of the RangePointer of the CircularPointer.
Declaration
public double RangePointerStrokeThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | double |
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.RangePointer;
pointer.RangePointerStrokeThickness = 10;
gauge.MainScale.Pointers.Add(pointer);
}
}
}
RangePointerVisibility
Gets or sets user interface (UI) visibility of RangePointer.
Declaration
public Visibility RangePointerVisibility { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Visibility | Visibility |
Remarks
There are three types of pointers. While choosing a pointer using the PointerType property the other two pointers' visibility property will be set to Collapsed. Default value is Visible.
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();
CircularPointer needlePointer = new CircularPointer();
needlePointer.Value = 80;
needlePointer.PointerType = PointerType.NeedlePointer;
needlePointer.RangePointerVisibility = Visibility.Collapsed;
gauge.MainScale.Pointers.Add(needlePointer);
}
}
}
RangeStart
Declaration
public double RangeStart { get; set; }
Property Value
Type |
---|
System.Double |
RangeStartOffset
Gets or sets the range pointer start offset position. Its range is from 0 to 1.
Declaration
public double RangeStartOffset { get; set; }
Property Value
Type |
---|
System.Double |
Symbol
Gets or sets the Symbol value that decides the shape of the SymbolPointer .
Declaration
public Symbol Symbol { get; set; }
Property Value
Type | Description |
---|---|
Symbol | double |
Remarks
This property used to change the symbol of the SymbolPointer.
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.SymbolPointer;
pointer.Symbol = Symbol.Ellipse;
pointer.SymbolPointerHeight = 20;
pointer.SymbolPointerWidth = 20;
gauge.MainScale.Pointers.Add(pointer);
}
}
}
SymbolPointerHeight
Gets or sets the SymbolPointerHeight value that decides the size of the SymbolPointer .
Declaration
public double SymbolPointerHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | double |
Remarks
This property used to change the size of the SymbolPointer.
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.SymbolPointer;
pointer.SymbolPointerHeight = 20;
pointer.SymbolPointerWidth = 20;
gauge.MainScale.Pointers.Add(pointer);
}
}
}
SymbolPointerStroke
Gets or sets the brush that describes the SymbolPointerStroke of the CircularPointer.
Declaration
public Brush SymbolPointerStroke { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | Brush |
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.SymbolPointer;
pointer.SymbolPointerStroke = new SolidColorBrush(Colors.White);
gauge.MainScale.Pointers.Add(pointer);
}
}
}
SymbolPointerTemplate
Gets or sets the template for the custom symbol for the SymbolPointer.
Declaration
public DataTemplate SymbolPointerTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | DataTemplate |
Remarks
SymbolPointerTemplate will get applied when the Symbol property of the CircularPointer is set to Custom.
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.SymbolPointer;
pointer.Symbol = Symbol.Custom;
pointer.SymbolPointerTemplate = Resources["star"];
gauge.MainScale.Pointers.Add(pointer);
}
}
}
SymbolPointerVisibility
Gets or sets the user interface (UI) visibility of SymbolPointer.
Declaration
public Visibility SymbolPointerVisibility { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Visibility | Visibility |
Remarks
There are three types of pointers. While choosing a pointer using the PointerType property the other two pointers' visibility property will be set to Collapsed. Default value is Visible.
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();
CircularPointer needlePointer = new CircularPointer();
needlePointer.Value = 80;
needlePointer.PointerType = PointerType.NeedlePointer;
needlePointer.SymbolPointerVisibility = Visibility.Collapsed;
gauge.MainScale.Pointers.Add(needlePointer);
}
}
}
SymbolPointerWidth
Gets or sets the SymbolPointerWidth value that decides the size of the SymbolPointer .
Declaration
public double SymbolPointerWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | double |
Remarks
This property used to change the size of the SymbolPointer.
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();
CircularPointer pointer = new CircularPointer();
pointer.Value = 80;
pointer.PointerType = PointerType.SymbolPointer;
pointer.SymbolPointerHeight = 20;
pointer.SymbolPointerWidth = 20;
gauge.MainScale.Pointers.Add(pointer);
}
}
}
TailFill
Gets or sets the fill color to needle pointer’s tail.
Declaration
public Brush TailFill { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
TailLengthFactor
Gets or sets the length factor to needle pointer’s tail. It’s range is 0 to 1.
Declaration
public double TailLengthFactor { get; set; }
Property Value
Type |
---|
System.Double |
TailStroke
Gets or sets the stroke to needle pointer’s tail.
Declaration
public Brush TailStroke { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
TailStrokeThickness
Gets or sets the stroke thickness to needle pointer’s tail.
Declaration
public double TailStrokeThickness { get; set; }
Property Value
Type |
---|
System.Double |
Value
Gets or sets the Value that decides the position of the CircularPointer in the CircularScale.
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
System.Double | double |
Remarks
Value property is one of the most important property. Based on the Value property pointer has been positioned on the CircularScale. Value should resides between the start and end value of the scale. If the value of this property is less than StartValue of the CircularScale, then the StartValue of the CircularScale is set to the Value of the pointer. Similarly EndValue of the CircularScale is set to the Value of the pointer when Value is greater that EndValue of the scale.
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();
CircularPointer needlePointer = new CircularPointer();
needlePointer.Value = 80;
needlePointer.PointerType = PointerType.NeedlePointer;
gauge.MainScale.Pointers.Add(needlePointer);
}
}
}
Methods
add_PointerPositionChanged(CircularPointer.PointerPositionChangedEventHandler)
Declaration
public void add_PointerPositionChanged(CircularPointer.PointerPositionChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
CircularPointer.PointerPositionChangedEventHandler | value |
OnApplyTemplate()
Declaration
public override void OnApplyTemplate()
OnMouseDown(MouseButtonEventArgs)
Invoked when the MouseDown
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 OnMouseDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs 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. |
remove_PointerPositionChanged(CircularPointer.PointerPositionChangedEventHandler)
Declaration
public void remove_PointerPositionChanged(CircularPointer.PointerPositionChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
CircularPointer.PointerPositionChangedEventHandler | value |
Events
PointerPositionChanged
Occurs when pointer position is changed
Declaration
public event CircularPointer.PointerPositionChangedEventHandler PointerPositionChanged
Event Type
Type |
---|
CircularPointer.PointerPositionChangedEventHandler |
ValueChangeCompleted
Called when the user is done selecting a new value of the pointer by dragging.
Declaration
public event EventHandler<ValueChangedEventArgs> ValueChangeCompleted
Event Type
Type |
---|
System.EventHandler<ValueChangedEventArgs> |
Remarks
This event shouldn't be used to update the pointer value (use onValueChanged for that), but rather to notify the new value before when the user has completed selecting a new value by drag . ///
See Also
ValueChanged
Called during a drag when the user is selecting a new value for the pointer by dragging.
Declaration
public event EventHandler<ValueChangedEventArgs> ValueChanged
Event Type
Type |
---|
System.EventHandler<ValueChangedEventArgs> |
Remarks
This event is used to know the pointer value changed, when the user change pointer value dynamically or changing pointer value by dragging.
See Also
ValueChangeStarted
Called when the user starts selecting a new value of pointer by dragging.
Declaration
public event EventHandler<ValueChangedEventArgs> ValueChangeStarted
Event Type
Type |
---|
System.EventHandler<ValueChangedEventArgs> |
Remarks
This event shouldn't be used to update the pointer value (use ValueChanged event for that), but rather to be notified when the user has started selecting a new value by starting a drag. The value passed will be the last value that the pointer had before the change began.
See Also
ValueChanging
Called during a drag when the user is selecting before a new value for the pointer by dragging
Declaration
public event EventHandler<ValueChangingEventArgs> ValueChanging
Event Type
Type |
---|
System.EventHandler<ValueChangingEventArgs> |
Remarks
This event shouldn't be used to update the pointer value (use ValueChanged event for that), but rather to know the new value before when the user has completed selecting a new value by drag.