By default, the C1TimeEditor control displays the time in a long format that includes seconds, but it can also display time in a shorter format or into a time span format. In this topic, you will learn how to change the time format in the designer, in XAML, and in code.
In the Designer
To change the time format, complete the following steps:
In XAML
To change the time format, place Format="ShortTime" to the <DateTimeEditors:C1TimeEditor>tag so that the markup resembles the following:
Markup |
Copy Code
|
---|---|
<DateTimeEditors:C1TimeEditor Format="ShortTime">
|
In Code
To change the time format, complete the following steps:
Visual Basic Copy Code Imports C1.WPF.DateTimeEditors
C# Copy Codeusing C1.WPF.DateTimeEditors;
Visual Basic Copy Code C1TimeEditor1.Format = C1TimeEditorFormat.ShortTime
C# Copy Code C1TimeEditor1.Format = C1TimeEditorFormat.ShortTime;
This Topic Illustrates the Following:
In this topic, you set the Format to ShortTime, which provides a shortened time display. The final result will resemble the following image: