Scenario
One may want to make a business property for storing and visualizing the event time only when the date part is not important (it can still be stored, though). For instance, this may be the check-in/check-out time for a worker or the session/exam start time:
Solutions
You can implement one of the following popular solutions that imply that your business class contains a property of the System.DateTime type:
1. Implement a custom Property Editor based on the WinForms TimeEdit and ASP.NET WebForms ASPxTimeEdit components. Review these help articles for more details:
Concepts > UI Construction > View Items > Implement Custom Property Editors
Task-Based Help > How to: Implement a Property Editor Using a DevExpress WinForms Control and DevExpress.ExpressApp.Win.Editors > DXPropertyEditor
WinForms Controls > DevExpress.XtraEditors > TimeEdit
Task-Based Help > How to: Implement a Property Editor Based on Custom Controls (ASP.NET) and DevExpress.ExpressApp.Web.Editors.ASPx > ASPxPropertyEditor
ASP.NET WebForms Controls> Data Editors > Editor Types > ASPxTimeEdit > ASPxTimeEdit Overview
Attached is a sample project showing a possible XAF integration of these components (see the DomainObject.cs, TimeEditPropertyEditor.cs and ASPxTimeEditPropertyEditor.cs files as well as the settings in the TimeEditIntegrationSample.Module.WXX\Model.DesignedDiffs.xafml files). Take special note that this is just an example, and you may require to further modify and test it according to your real business requirements.
OR
2. Customize the display format and edit mask settings for existing DateTime Property Editors:
Task-Based Help > How to: Customize a Built-in Property Editor (ASP.NET)
Task-Based Help > How to: Customize a Built-in Property Editor (WinForms)
3. Technically, there can be alternative solutions with the System.String and System.TimeSpan properties and custom masks, but they are less common or natural. You can learn more about this from public community resources like StackOverFlow:
http://stackoverflow.com/a/29509668
http://stackoverflow.com/search?q=.net+store+time+without+date
See Also
Concepts > Business Model Design > Data Types Supported by built-in Editors
Concepts > UI Construction > Using a Custom Control that is not Integrated by Default
Search keywords: TimeEdit, ASPxTimeEdit, time part, AM, PM, without date, custom property editor