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:
- Set the C1TimeEditor.Format property to ShortTime. This will change the time format of the control so that it shows only hours and minutes.
- 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.
- Set the C1TimeEditor.Interval property to "1000". This will cause the control to hesitate for one second before changing the value of the control.
- Set the C1TimeEditor.Value property to "17:00:00".
In the Silverlight project in Blend, select the C1TimeEditor control and then, in Properties panel, set the following properties:
- Set the C1TimeEditor.Format property to ShortTime. This will change the time format of the control so that it shows only hours and minutes.
- 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.
- Set the C1TimeEditor.Interval property to "1000". This will cause the control to hesitate for one second before changing the value of the control.
- Set the current time to 5:00 p.m. by completing the following steps:
- 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.
- Open the MainPage.xaml.cs page.
- 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.