Class LinearScale
Represents the linear scale.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Gauges
Assembly: Syncfusion.SfGauge.UWP.dll
Syntax
public class LinearScale : Control, IDisposable
Constructors
LinearScale()
Initializes a new instance of the LinearScale class.
Declaration
public LinearScale()
Fields
BindRangeStrokeToLabelsProperty
Using a DependencyProperty as the backing store for BindRangeStrokeToLabels. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty BindRangeStrokeToLabelsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
BindRangeStrokeToTicksProperty
Using a DependencyProperty as the backing store for BindRangeStrokeToTicks. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty BindRangeStrokeToTicksProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
CornerRadiusProperty
Declaration
public static readonly DependencyProperty CornerRadiusProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
CultureProperty
Using a DependencyProperty as the backing store for Culture. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty CultureProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
CustomLabelsProperty
Using a DependencyProperty as the backing store for CustomLabels. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty CustomLabelsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ElementsPositionModeProperty
Using a DependencyProperty as the backing store for ElementsPosition. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ElementsPositionModeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
GradientStopsProperty
Declaration
public static readonly DependencyProperty GradientStopsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
IntervalProperty
Using a DependencyProperty as the backing store for Interval. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty IntervalProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LabelFormatProperty
Using a DependencyProperty as the backing store for LabelFormat. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelFormatProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LabelOffsetProperty
Using a DependencyProperty as the backing store for LabelOffset. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelOffsetProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LabelPositionFactorProperty
Using a DependencyProperty as the backing store for LabelPositionFactor. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelPositionFactorProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LabelPositionProperty
Using a DependencyProperty as the backing store for LabelPosition. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelPositionProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LabelPostfixProperty
Declaration
public static readonly DependencyProperty LabelPostfixProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LabelPrefixProperty
Declaration
public static readonly DependencyProperty LabelPrefixProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LabelSizeProperty
Using a DependencyProperty as the backing store for LabelSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelSizeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LabelStrokeProperty
Using a DependencyProperty as the backing store for LabelStroke. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelStrokeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LabelTemplateProperty
Using a DependencyProperty as the backing store for LabelTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LabelTemplateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MajorTickOffsetProperty
Declaration
public static readonly DependencyProperty MajorTickOffsetProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MajorTickSizeProperty
Using a DependencyProperty as the backing store for MajorTickSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MajorTickSizeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MajorTickStrokeProperty
Using a DependencyProperty as the backing store for MajorTickStroke. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MajorTickStrokeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MajorTickStrokeThicknessProperty
Using a DependencyProperty as the backing store for MajorTickStrokeThickness. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MajorTickStrokeThicknessProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MaximumLabelsProperty
Declaration
public static readonly DependencyProperty MaximumLabelsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MaximumProperty
Using a DependencyProperty as the backing store for Maximum. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MaximumProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MinimumProperty
Using a DependencyProperty as the backing store for Minimum. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MinimumProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MinorTickOffsetProperty
Declaration
public static readonly DependencyProperty MinorTickOffsetProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MinorTickSizeProperty
Using a DependencyProperty as the backing store for MinorTickSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MinorTickSizeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MinorTicksPerIntervalProperty
Using a DependencyProperty as the backing store for MinorTicksPerInterval. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MinorTicksPerIntervalProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MinorTickStrokeProperty
Declaration
public static readonly DependencyProperty MinorTickStrokeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
MinorTickStrokeThicknessProperty
Using a DependencyProperty as the backing store for MinorTickStrokeThickness. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MinorTickStrokeThicknessProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
OpposedPositionProperty
Declaration
public static readonly DependencyProperty OpposedPositionProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
PointersProperty
Using a DependencyProperty as the backing store for Pointers. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty PointersProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
RangePositionProperty
Using a DependencyProperty as the backing store for RangePosition. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty RangePositionProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
RangesProperty
Using a DependencyProperty as the backing store for Ranges. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty RangesProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ScaleBarBorderBrushProperty
Using a DependencyProperty as the backing store for ScaleBarBorderBrush. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarBorderBrushProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ScaleBarBorderThicknessProperty
Using a DependencyProperty as the backing store for ScaleBarBorderThickness. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarBorderThicknessProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ScaleBarLengthProperty
Using a DependencyProperty as the backing store for ScaleBarLength. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarLengthProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ScaleBarPositionFactorProperty
Using a DependencyProperty as the backing store for ScaleBarPositionFactor. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarPositionFactorProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ScaleBarSizeProperty
Using a DependencyProperty as the backing store for ScaleBarSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarSizeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ScaleBarStrokeProperty
Using a DependencyProperty as the backing store for ScaleBarStroke. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleBarStrokeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ScaleDirectionProperty
Using a DependencyProperty as the backing store for ScaleDirection. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ScaleDirectionProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ScaleOffsetProperty
Declaration
public static readonly DependencyProperty ScaleOffsetProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ShowLabelsProperty
Using a DependencyProperty as the backing store for ShowLabels.
Declaration
public static readonly DependencyProperty ShowLabelsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ShowTicksProperty
Declaration
public static readonly DependencyProperty ShowTicksProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TickPositionFactorProperty
Using a DependencyProperty as the backing store for TickPositionFactor. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TickPositionFactorProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TickPositionProperty
Using a DependencyProperty as the backing store for TickPosition. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TickPositionProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Properties
BindRangeStrokeToLabels
Gets or sets a value indicating whether the color of labels should be similar to the color of ranges.
Declaration
public bool BindRangeStrokeToLabels { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Ranges.Add(new LinearRange() { StartValue = 0, EndValue = 30 });
linearGauge.MainScale.BindRangeStrokeToLabels = true;
this.Layout.Children.Add(linearGauge);
}
}
}
BindRangeStrokeToTicks
Gets or sets a value indicating whether the color of ticks should be similar to the color of ranges.
Declaration
public bool BindRangeStrokeToTicks { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Ranges.Add(new LinearRange() { StartValue = 0, EndValue = 30 });
linearGauge.MainScale.BindRangeStrokeToTicks = true;
this.Layout.Children.Add(linearGauge);
}
}
}
CornerRadius
Gets or sets a value to draw the rounded corner for scale bar
Declaration
public CornerRadius CornerRadius { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.CornerRadius |
Culture
Gets or sets the culture for linear scale labels.
Declaration
public CultureInfo Culture { get; set; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo | The default value is CultureInfo.CurrentCulture |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Culture = new System.Globalization.CultureInfo("fr-FR");
this.Layout.Children.Add(linearGauge);
}
}
}
CustomLabels
Gets or sets the custom labels for linear scale.
Declaration
public double[] CustomLabels { get; set; }
Property Value
Type |
---|
System.Double[] |
ElementsPositionMode
Gets or sets the position of elements with respect to the linear scale.
Declaration
public LinearScalePositionModes ElementsPositionMode { get; set; }
Property Value
Type |
---|
LinearScalePositionModes |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ElementPosition = LinearScalePositionModes.Custom;
this.Layout.Children.Add(linearGauge);
}
}
}
GradientStops
Declaration
public ObservableCollection<GaugeGradientStop> GradientStops { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<GaugeGradientStop> |
Interval
Gets or sets the interval for major ticks in the linear scale.
Declaration
public double Interval { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Interval = 20;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelFormat
Gets or sets the format for labels in the linear scale.
Declaration
public string LabelFormat { get; set; }
Property Value
Type |
---|
System.String |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelFormat = "$ #";
this.Layout.Children.Add(linearGauge);
}
}
}
LabelOffset
Gets or sets the offset value to show space between ticks and labels.
Declaration
public double LabelOffset { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelOffset = 5;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelPosition
Gets or sets the position of labels with respect to the linear scale.
Declaration
public LinearLabelsPosition LabelPosition { get; set; }
Property Value
Type |
---|
LinearLabelsPosition |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelPosition = LinearLabelsPosition.Above;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelPositionFactor
Gets or sets the factor value to position labels based upon the scale.
Declaration
public double LabelPositionFactor { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
It shows effect only if ElementsPosition of linear scale is set as Custom.
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelPositionFactor = 0.5;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelPostfix
Gets or sets the LabelPostfix value that can attached at the end of the labels.
Declaration
public string LabelPostfix { get; set; }
Property Value
Type | Description |
---|---|
System.String | string |
Remarks
Used to add some extentions to the labels like % symbol can be added to labels while displaying the percentage values in SfLinearGauge.
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelStroke = new
SolidColorBrush(Colors.Blue);
linearGauge.MainScale.LabelPostfix="%";
this.Layout.Children.Add(linearGauge);
}
}
}
LabelPrefix
Gets or sets the LabelPrefix value that can be added before the labels.
Declaration
public string LabelPrefix { get; set; }
Property Value
Type | Description |
---|---|
System.String | string |
Remarks
Used to add some prefix to the labels like $ symbol can be added to labels while displaying the dollar values in SfLinearGauge.
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelStroke = new
SolidColorBrush(Colors.Blue);
linearGauge.MainScale.LabelPrefix="$";
this.Layout.Children.Add(linearGauge);
}
}
}
LabelSize
Gets or sets the font size of the labels in the linear scale.
Declaration
public double LabelSize { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelSize = 12;
this.Layout.Children.Add(linearGauge);
}
}
}
LabelStroke
Gets or sets the color of the labels in the linear scale.
Declaration
public Brush LabelStroke { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelStroke = new
SolidColorBrush(Colors.Blue);
this.Layout.Children.Add(linearGauge);
}
}
}
LabelTemplate
Gets or sets the template for labels in the linear scale.
Declaration
public DataTemplate LabelTemplate { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.DataTemplate |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.LabelTemplate = this.Resources["DefaultLabelTemplate"] as DataTemplate;
this.Layout.Children.Add(linearGauge);
}
}
}
MajorTickOffset
Gets or sets MajorTickOffset that decides the offset of major ticks in the LinearScale.
Declaration
public double MajorTickOffset { 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();
SfLinearGauge gauge = new SfLinearGauge();
LinearScale scale = new LinearScale();
scale.MajorTickOffset = 10;
gauge.Scales.add(scale);
}
}
}
MajorTickSize
Gets or sets the length of major ticks in the linear scale.
Declaration
public double MajorTickSize { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MajorTickSize = 10;
this.Layout.Children.Add(linearGauge);
}
}
}
MajorTickStroke
Gets or sets the color of the major ticks in the linear scale.
Declaration
public Brush MajorTickStroke { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MajorTickStroke = new SolidColorBrush(Colors.Green);
this.Layout.Children.Add(linearGauge);
}
}
}
MajorTickStrokeThickness
Gets or sets the thickness of the major ticks in the linear scale.
Declaration
public double MajorTickStrokeThickness { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MajorTickStrokeThickness = 4;
this.Layout.Children.Add(linearGauge);
}
}
}
Maximum
Gets or sets the maximum value of the linear scale
Declaration
public double Maximum { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Maximum = 90;
this.Layout.Children.Add(linearGauge);
}
}
}
MaximumLabels
Declaration
public int MaximumLabels { get; set; }
Property Value
Type |
---|
System.Int32 |
Minimum
Gets or sets the minimum value of the linear scale
Declaration
public double Minimum { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Minimum = 10;
this.Layout.Children.Add(linearGauge);
}
}
}
MinorTickOffset
Gets or sets MinorTickOffset that decides the offset of minor ticks in the LinearScale.
Declaration
public double MinorTickOffset { 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();
SfLinearGauge gauge = new SfLinearGauge();
LinearScale scale = new LinearScale();
scale.MinorTickOffset = 10;
gauge.Scales.add(scale);
}
}
}
MinorTickSize
Gets or sets the length of minor ticks in the linear scale.
Declaration
public double MinorTickSize { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MinorTickSize = 10;
this.Layout.Children.Add(linearGauge);
}
}
}
MinorTicksPerInterval
Gets or sets the number of minor ticks that has to be placed in-between the major ticks in the linear scale.
Declaration
public int MinorTicksPerInterval { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MinorTicksPerInterval = 3;
this.Layout.Children.Add(linearGauge);
}
}
}
MinorTickStroke
Gets or sets the color of the minor ticks in the linear scale.
Declaration
public Brush MinorTickStroke { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MinorTickStroke = new SolidColorBrush(Colors.Orange);
this.Layout.Children.Add(linearGauge);
}
}
}
MinorTickStrokeThickness
Gets or sets the thickness of the minor ticks in the linear scale.
Declaration
public double MinorTickStrokeThickness { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.MinorTickStrokeThickness = 4;
this.Layout.Children.Add(linearGauge);
}
}
}
OpposedPosition
Declaration
public bool OpposedPosition { get; set; }
Property Value
Type |
---|
System.Boolean |
Pointers
Gets or sets the collection of linear pointers.
Declaration
public LinearPointerCollection Pointers { get; set; }
Property Value
Type |
---|
LinearPointerCollection |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Pointers.Add(new LinearPointer() { Value = 30 });
this.Layout.Children.Add(linearGauge);
}
}
}
RangePosition
Gets or sets the position of ranges with respect to the linear scale.
Declaration
public LinearRangesPosition RangePosition { get; set; }
Property Value
Type |
---|
LinearRangesPosition |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.RangePosition = LinearRangesPosition.Below;
this.Layout.Children.Add(linearGauge);
}
}
}
Ranges
Gets or sets the collection of linear ranges.
Declaration
public LinearRangeCollection Ranges { get; set; }
Property Value
Type |
---|
LinearRangeCollection |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.Ranges.Add(new LinearRange() { StartValue = 0, EndValue = 30 });
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarBorderBrush
Gets or sets the border color of the linear scale bar.
Declaration
public Brush ScaleBarBorderBrush { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarBorderBrush = new
SolidColorBrush(Colors.Red);
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarBorderThickness
Gets or sets the border thickness of the linear scale bar.
Declaration
public Thickness ScaleBarBorderThickness { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Thickness |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI.Xaml;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarBorderThickness = new Thickness(2);
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarLength
Gets or sets the length of the linear scale bar.
Declaration
public double ScaleBarLength { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarLength = 450;
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarPositionFactor
Gets or sets the factor value to position ScaleBars based upon the scale.
Declaration
public double ScaleBarPositionFactor { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
It shows effect only if ElementsPosition of linear scale is set as Custom.
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarSize = 10;
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarSize
Gets or sets the size of the linear scale bar.
Declaration
public double ScaleBarSize { get; set; }
Property Value
Type |
---|
System.Double |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarSize = 50;
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleBarStroke
Gets or sets the color of the linear scale bar.
Declaration
public Brush ScaleBarStroke { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Media.Brush |
Examples
using Syncfusion.UI.Xaml.Gauges;
using Windows.UI;
using Windows.UI.Xaml.Media;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleBarStroke = new
SolidColorBrush(Colors.Gray);
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleDirection
Gets or sets the direction of the linear scale.
Declaration
public LinearScaleDirection ScaleDirection { get; set; }
Property Value
Type |
---|
LinearScaleDirection |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.ScaleDirection =
LinearScaleDirection.Backward;
this.Layout.Children.Add(linearGauge);
}
}
}
ScaleOffset
Gets or sets the ScaleOffset.
Declaration
public double ScaleOffset { get; set; }
Property Value
Type |
---|
System.Double |
ShowLabels
Declaration
public bool ShowLabels { get; set; }
Property Value
Type |
---|
System.Boolean |
ShowTicks
Declaration
public bool ShowTicks { get; set; }
Property Value
Type |
---|
System.Boolean |
TickPosition
Gets or sets the position of ticks with respect to the linear scale.
Declaration
public LinearTicksPosition TickPosition { get; set; }
Property Value
Type |
---|
LinearTicksPosition |
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.TickPosition = LinearTicksPosition.Above;
this.Layout.Children.Add(linearGauge);
}
}
}
TickPositionFactor
Gets or sets the factor value to position ticks based upon the scale.
Declaration
public double TickPositionFactor { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
It shows effect only if ElementsPosition of linear scale is set as Custom.
Examples
using Syncfusion.UI.Xaml.Gauges;
namespace GaugeSample
{
public sealed partial class LinearGauge
{
public LinearGauge()
{
InitializeComponent();
SfLinearGauge linearGauge = new SfLinearGauge();
linearGauge.MainScale = new LinearScale();
linearGauge.MainScale.TickSize = 10;
this.Layout.Children.Add(linearGauge);
}
}
}
Methods
Dispose()
Method to release allocated resources of LinearScale.
Declaration
public void Dispose()
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.
Declaration
protected override void OnApplyTemplate()