Skip to main content

Scale.ShowMinorTickmarks Property

Gets or sets whether the minor tickmarks should be visible on a scale or not.

Namespace: DevExpress.Xpf.Gauges

Assembly: DevExpress.Xpf.Gauges.v22.2.dll

NuGet Package: DevExpress.Wpf.Gauges


public DefaultBoolean ShowMinorTickmarks { get; set; }

Property Value

Type Description

A DefaultBoolean enumeration value that specifies the visibility of minor tickmarks on a scale.

Available values:

Name Description Return Value

The value is true.



The value is false.



The value is specified by a global option or a higher-level object.



Set the ShowMinorTickmarks property value to either DefaultBoolean.True or DefaultBoolean.False to control the visibility of minor tickmarks on a Circular or Linear scale.

Note that by default, the ShowMinorTickmarks property is set to DefaultBoolean.Default. This means that the visibility of minor tickmarks is defined by the current model of a gauge control, set by the CircularGaugeControl.Model or LinearGaugeControl.Model properties.

The table below illustrates the property behavior.

ShowMinorTickmarks = True ShowMinorTickmarks = False
Scale_ShowMajor(Minor) tickmarks-true Scale_ShowMinorTickmarks-false

For more information on minor tickmarks, refer to the tickmarks (Circular scale) and tickmarks (Linear scale) documents.


In some cases you may need to place several circular scales within the main scale. The following example demonstrates how to create a typical watch with several scales (the main scale will show the current time, while the minor scales will show the current day, week and month).

To place several scales inside the main scale, it’s necessary to create the appropriate ItemsPanelTemplate object and assign it to the AnalogGaugeControl.ScalePanelTemplate property. This template defines a Grid panel with 2 rows and 4 columns.

After that, the ColumnSpan and RowSpan attached properties are set to 2 and 4 for the main scale, so that it occupies the entire grid area. For other circular scales, Column and Row properties define their positions inside the grid area (and therefore inside the main scale).

View Example

using System;
using System.Windows;
using System.Windows.Threading;

namespace ScalesLayoutSample {

    public partial class MainWindow : Window {
        public MainWindow() {
            DataContext = new ClockViewModel();

    public class ClockViewModel : DependencyObject {
        public static readonly DependencyProperty HourProperty = 
            DependencyProperty.Register("Hour", typeof(double), typeof(ClockViewModel));
        public static readonly DependencyProperty MinuteProperty = 
            DependencyProperty.Register("Minute", typeof(double), typeof(ClockViewModel));
        public static readonly DependencyProperty SecondProperty = 
            DependencyProperty.Register("Second", typeof(double), typeof(ClockViewModel));
        public static readonly DependencyProperty DayOfWeekProperty = 
            DependencyProperty.Register("DayOfWeek", typeof(double), typeof(ClockViewModel));
        public static readonly DependencyProperty DayOfMonthProperty = 
            DependencyProperty.Register("DayOfMonth", typeof(double), typeof(ClockViewModel));
        public static readonly DependencyProperty MonthOfYearProperty = 
            DependencyProperty.Register("MonthOfYear", typeof(double), typeof(ClockViewModel));

        public double Hour {
            get { return (double)GetValue(HourProperty); }
            set { SetValue(HourProperty, value); }

        public double Minute {
            get { return (double)GetValue(MinuteProperty); }
            set { SetValue(MinuteProperty, value); }

        public double Second {
            get { return (double)GetValue(SecondProperty); }
            set { SetValue(SecondProperty, value); }

        public double DayOfWeek {
            get { return (double)GetValue(DayOfWeekProperty); }
            set { SetValue(DayOfWeekProperty, value); }

        public double DayOfMonth {
            get { return (int)GetValue(DayOfMonthProperty); }
            set { SetValue(DayOfMonthProperty, value); }

        public double MonthOfYear {
            get { return (double)GetValue(MonthOfYearProperty); }
            set { SetValue(MonthOfYearProperty, value); }

        readonly DispatcherTimer timer = new DispatcherTimer();

        public ClockViewModel() {
            timer.Tick += new EventHandler(OnTimedEvent);

        void Update() {
            DateTime currentDate = DateTime.Now;

            Second = (currentDate.Second / 60.0) * 12;
            Minute = ((currentDate.Minute + currentDate.Second / 60.0) / 60.0) * 12;
            Hour = (currentDate.Hour % 12) + currentDate.Minute / 60.0;

            DayOfMonth = currentDate.Day;
            DayOfWeek = (int)currentDate.DayOfWeek;
            MonthOfYear = currentDate.Month;

        void OnTimedEvent(object source, EventArgs e) {

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowMinorTickmarks property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also