Class CircularMarkTick
Represents the Tick of the circular scale. The Major/Minor ticks are set by using the TickStyle property.
Inherited Members
Namespace: Syncfusion.Windows.Gauge
Assembly: Syncfusion.Gauge.WPF.dll
Syntax
public class CircularMarkTick : TickBase
Remarks
The Ticks are of two types, Major and Minor Tick, which can be set by using the TickStyle property. MajorTick is placed at an interval specified by MajorIntervalValue and MinorTick is placed at an interval specified by MinorIntervalValue property.
Examples
using System;
using System.Windows;
using System.Windows.Controls;
using Syncfusion.Windows.Shared;
using Syncfusion.Windows.Gauge;
namespace CircularMarkTickSample
{
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 = 5;
m_scale.Radius = 116;
this.m_gauge.Scales.Add(m_scale);
CircularMarkTick m_majortick = new CircularMarkTick();
m_majortick.TickWidth = 4;
m_majortick.TickHeight = 9;
m_majortick.TickPlacement = ScalePlacement.Inside;
m_majortick.TickStyle = TickStyle.MajorTick;
m_majortick.BackgroundBrush = Brushes.White;
m_majortick.TickShape = TickShape.Ellipse;
CircularMarkTick m_minortick = new CircularMarkTick();
m_minortick.TickWidth = 1;
m_minortick.TickHeight = 4;
m_minortick.TickPlacement = ScalePlacement.Inside;
m_minortick.TickStyle = TickStyle.MinorTick;
m_minortick.BackgroundBrush = Brushes.White;
m_scale.Ticks.Add(m_minortick);
m_scale.Ticks.Add(m_majortick);
this.Content = m_gauge;
}
}
}
Constructors
CircularMarkTick()
Declaration
public CircularMarkTick()
Fields
TickHeightProperty
Identifies the TickHeight dependency property.
Declaration
public static readonly DependencyProperty TickHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TickShapeProperty
Identifies the TickShape dependency property.
Declaration
public static readonly DependencyProperty TickShapeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TickWidthProperty
Identifies the TickWidth dependency property.
Declaration
public static readonly DependencyProperty TickWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ValueProperty
Identifies the Value dependency property.
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
LogBase
Declaration
public double LogBase { get; set; }
Property Value
Type |
---|
System.Double |
TickHeight
Gets or sets the height of the mark tick. This is a dependency property.
Declaration
public double TickHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Default value is 0. |
TickShape
Gets or sets the shape of the mark tick. This is a dependency property.
Declaration
public TickShape TickShape { get; set; }
Property Value
Type | Description |
---|---|
TickShape | Type: TickShape Default value is TickShape.Rectangle. |
TickWidth
Gets or sets the width of the mark tick. This is a dependency property.
Declaration
public double TickWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double Default value is 0. |
Value
Gets or sets the value.
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The value. |
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. |
MeasureOverride(Size)
Measures the size in layout required for child elements and determines a size for the element.
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | constraint | 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. |
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. |
OnMouseMove(MouseEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.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. |
OnRender(DrawingContext)
Declaration
protected override void OnRender(DrawingContext drawingContext)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.DrawingContext | drawingContext |
OnTickShapeChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises TickShapeChanged event.
Declaration
protected virtual void OnTickShapeChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
Events
TickShapeChanged
Event that is raised when TickShape property is changed.
Declaration
public event PropertyChangedCallback TickShapeChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |