ComponentOne DateTimeEditors for UWP
C1TimeEditor Help / C1TimeEditor Quick Start / Step 2 of 3: Customizing the Control
In This Topic
    Step 2 of 3: Customizing the Control
    In This Topic

    In this step, you will customize the C1TimeEditor control:

    1. 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. 
    1. 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 <DateTimeEditors: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 C1TimeEditor_Loaded event:
    Visual Basic
    Copy Code
    C1TimeEditor1.Value = New TimeSpan(17, 0, 0)
    

    C#
    Copy Code
    C1TimeEditor1.Value = new TimeSpan(17,0,0);
    

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

    See Also