Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Collapse]Concepts
  [Expand]Application Solution Components
   Client-Side Mobile Application
  [Collapse]Business Model Design
    Business Model Design Basics
    Built-in Business Classes for Most Popular Scenarios
   [Expand]Business Model Design with Entity Framework
   [Expand]Business Model Design with XPO
    Non-Persistent Objects
    PropertyChanged Event in Business Classes
   [Collapse]Data Types Supported by built-in Editors
     Key Properties
    [Expand]String Properties
    [Expand]Numeric Properties
    [Expand]Date and Time Properties
    [Expand]Boolean Properties
    [Expand]BLOB Image Properties
    [Expand]Collection Properties
    [Expand]Reference (Foreign Key, Complex Type) Properties
    [Expand]File Attachment Properties
    [Expand]Type Properties
    [Expand]Enumeration Properties
    [Expand]Criteria Properties
    [Collapse]Color Properties
      Color Properties in XPO
      Color Properties in Entity Framework
      Color Properties in Domain Components
     Geolocation Properties
     Miscellaneous Property Types
    Mapping Complex Types to the Database
   [Expand]Types Info Subsystem
    Connect an XAF Application to a Database Provider
    Data Annotations in Data Model
    Create and Update the Application's Database
  [Expand]Application Model
  [Expand]UI Construction
  [Expand]Extend Functionality
  [Expand]Data Manipulation and Business Logic
  [Expand]Security System
  [Expand]Localization
  [Expand]System Module
  [Expand]Extra Modules
  [Expand]Debugging and Error Handling
  [Expand]Filtering
  [Expand]Application Life Cycle
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Deployment
 [Expand]Task-Based Help
  Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Color Properties

In XAF the Color and Nullable<Color> properties can be displayed using the ColorEdit control in WinForms applications and the ASPxComboBox control in ASP.NET applications.

WinForms

ASP.NET

Mobile

Expanded Examples

Expanded WinForms Property Editors for System.Drawing.Color Properties

Each WinForms Property Editor has a control that displays a corresponding property in a Detail View, and a repository item that displays a property in a List Editor that supports in-place editing. Both the control and repository item are shown below.

ColorPropertyEditor

Control: ColorEdit.

Repository Item: RepositoryItemColorEdit.

Description:

Used for Color properties by default. Use Alt + Down Arrow to expand the editor's drop-down window.

Expanded ASP.NET Property Editors for System.Drawing.Color Properties

Each ASP.NET Property Editor has controls that display a property in a Detail View's View and Edit mode (see DetailView.ViewEditMode). These controls are listed below.

  • ASPxColorPickerPropertyEditor from the ASP.NET System Module

    View mode control: The ColorEditDisplayPanel control which wraps ColorEditDisplayControl. It displays an image with the color sample and a label with the color name. Use the ColorEditDisplayControl.ShowDisplayText property to hide the label.

    Edit mode control: ASPxColorEdit.

    Description:

    Allows users to select a color from a drop-down window with a color table or use the color picker to specify a custom color.

  • ASPxColorPropertyEditor from the ASP.NET System Module

    View mode control: ASPxImageLabelControl from the ASP.NET System Module. It displays an image with the color sample and a label with the color name.

    Edit mode control: ASPxComboBox.

    Description:

    Used for Color properties in legacy applications. You can switch to the ASPxColorPickerPropertyEditor using the IModelRegisteredPropertyEditor.EditorType property or the ViewItems | PropertyEditors | System.Drawing.Color node in the Model Editor.

Expanded Mobile Property Editors for System.Drawing.Color Properties

Each Mobile Property Editor has widgets that display a property in a Detail View's View and Edit mode (see DetailView.ViewEditMode). These widgets are listed below.

MobileColorPickerPropertyEditor

View mode control: ColorPicker that uses the dxColorBox widget with the readOnly property is set to true.

Edit mode control: ColorPicker that uses the dxColorBox widget.

Description:

Allows users to select a color from a drop-down window with a color table or use the color picker to specify a custom color. Supported only by tablet devices.

How would you rate this topic?​​​​​​​