Appearance and structure of the Clock control

27 Apr 20213 minutes to read

Color setting

The Clock control allows you to customize its gradient back color, hands color, minute line color, and border color.

Customizing color to the Clock

The Clock control has individual property to set color for gradient back color, hour hands color, minutes color, and border color.

this.clock1.BorderColor = Color.Violet;

this.clock1.EndGradientBackColor = Color.RoyalBlue;

this.clock1.HourHandColor = Color.SkyBlue;

this.clock1.MinuteColor = Color.LightPink;

this.clock1.MinuteHandColor = Color.LightSeaGreen;

this.clock1.SecondHandColor = Color.LightSteelBlue;

this.clock1.StartGradientBackColor = Color.Black;
Me.clock1.BorderColor = Color.Violet

Me.clock1.EndGradientBackColor = Color.RoyalBlue

Me.clock1.HourHandColor = Color.SkyBlue

Me.clock1.MinuteColor = Color.LightPink

Me.clock1.MinuteHandColor = Color.LightSeaGreen

Me.clock1.SecondHandColor = Color.LightSteelBlue


Customizing color to the Clock

Appearance setting

The Clock control allows you to customize the thickness of the hand and minute line. It also allows you to enable or disable the AM/PM, borders, minute, and second hand. The Clock control gives a transparent appearance.

Customization of hands thickness

Clock control allows you to adjust the thickness of hands and minute line.

this.clock1.HourHandThickness = 7;

this.clock1.MinuteHandThickness = 5;

this.clock1.SecondHandThickness = 2;

this.clock1.MinuteThickness = 4;
Me.clock1.HourHandThickness = 7

Me.clock1.MinuteHandThickness = 5

Me.clock1.SecondHandThickness = 2

Me.clock1.MinuteThickness = 4

Customization of hands thickness

Enable and disable properties

The Clock control allows you to enable or disable AM/PM, second hand, minute line, and border.

this.clock1.ShowAMorPM = true;

this.clock1.ShowBorder = false;

this.clock1.ShowMinute = false;

this.clock1.ShowSecondHand = false;
Me.clock1.ShowAMorPM = True

Me.clock1.ShowBorder = False

Me.clock1.ShowMinute = False

Me.clock1.ShowSecondHand = False

Enable and disable properties

Transparent support

Clock control supports transparent back ground.

this.clock1.IsTransparent = true;
Me.clock1.IsTransparent = True

Transparent support

How to show a fixed time in the Clock control

The Clock control usually displays the current time on the machine where it is hosted. To freeze the clock to display a fixed time, the Boolean property StopTimer can be used. Then, using the Clock control’s Now property, the desired time can be displayed or the default time will be displayed.

//Gets or sets the value to freeze or unfreeze time in the clock.

this.clock1.StopTimer = true;
//Gets or sets the value to freeze or unfreeze time in the clock.

Me.clock1.StopTimer = True