ComponentOne DateTimeEditors for WPF: DateTimeEditors for WPF Task-Based Help > C1TimeEditor Task-Based Help > Removing the Spin Buttons

Removing the Spin Buttons

You can remove the C1TimeEditor control's spin buttons by setting the ShowButtons property to False. In this topic, you will learn how to set the ShowButtons property to False in the designer, in XAML, and in code.

In the Designer

Complete the following steps:

1.   Click the C1TimeEditor control once to select it.

2.   In the Properties window, clear the ShowButtons check box.

In XAML

To remove the spin buttons, place ShowButtons="False" to the <my:C1TimeEditor> tag so that the markup resembles the following:

 

<my:C1TimeEditor ShowButtons="False"/>

In Code

Complete the following steps:

1.   Open the Window1.xaml.cs page.

2.   Place the following code beneath the InitializeComponent() method:

      Visual Basic

C1TimeEditor1.ShowButtons = False

      C#

c1TimeEditor1.ShowButtons = false;

3.   Run the project.

*This Topic Illustrates the Following:

The following image depicts a C1TimeEditor control with its spin buttons removed.

 


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.