ComponentOne DateTimeEditors for WPF and Silverlight
Step 2 of 3: Customizing the C1TimeEditor
C1TimeEditor Control Help > C1TimeEditor Quick Start > Step 2 of 3: Customizing the C1TimeEditor

In this step, you will customize the C1TimeEditor control.

In the WPF project, select the C1TimeEditor control and then, in Visual Studio Properties window, set the following properties:

In the Silverlight project in Blend, select the C1TimeEditor control and then, in Properties panel, set the following properties:

  1. Set the C1TimeEditor.Format property to ShortTime. This will change the time format of the control so that it shows only hours and minutes.
  2. Set the C1TimeEditor.Increment property to "01:00:00". This will cause the value of the control to change by one hour each time a user clicks the spin button.
  3. Set the C1TimeEditor.Interval property to "1000". This will cause the control to hesitate for one second before changing the value of the control. 
  4. Set the current time to 5:00 p.m. by completing the following steps:
    1. In the XAML editor, add x:Name="C1TimeEditor1" to the <c1datetime:C1TimeEditor> tag so that the control will have a unique identifier for you to call in code.
    2. Open the MainPage.xaml.cs page.
    3. Place the following code beneath the InitializeComponent() method:

Now that you've customized the application, you can run the project and observe the run time behaviors of the control.