ComponentOne DateTimeEditors for WPF and Silverlight
Removing the Spin Buttons
C1TimeEditor Control Help > C1TimeEditor Task-Based Help > Removing the Spin Buttons

You can remove the C1TimeEditor control's spin buttons by setting the C1TimeEditor.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
    Copy Code
    C1TimeEditor1.ShowButtons = False
    

     

    C#
    Copy Code
    c1TimeEditor1.ShowButtons = false;
    

     

  3. Run the project.

This Topic Illustrates the Following:

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