What’s New in DXperience 12.1

Silverlight Form Layout Control

New Data Layout Control

The Data Layout Control is a data-aware version of the Layout Control and allows you to quickly build a layout of controls for the WPF and Silverlight platforms. Once bound to an object, the Data Layout Control fetches the object's public properties and automatically builds a layout for editing these properties.

Data Layout Control for WPF and Silverlight by DevExpress

C#
Visual Basic

[C#]

// DataLayoutControl on the left is bound to an object of the Person class:
public class Person {
    // Two items below will be combined by DataLayoutControl into borderless and titleless Name group
    [Display(GroupName = "<Name>", Name = "Last name")]
    public string LastName { get; set; }
    [Display(GroupName = "<Name>", Name = "First name", Order = 0)]
    public string FirstName { get; set; }

    //Four items below will go to a Contact tab within a tabbed Tabs group.
    [Display(GroupName = "{Tabs}/Contact", Order = 2), DataType(DataType.PhoneNumber)]
    public string Phone { get; set; }
    [Display(GroupName = "{Tabs}/Contact", Order = 4)]
    public string Email { get; set; }
    //Two items below will go to the Address group within the Contact tab.
    [Display(GroupName = "{Tabs}/Contact/Address", ShortName = "")]
    public string AddressLine1 { get; set; }
    [Display(GroupName = "{Tabs}/Contact/Address", ShortName = "")]
    public string AddressLine2 { get; set; }

    //Two items below will go to the horizontally oriented Personal group.
    [Display(GroupName = "Personal-", Name = "Birth date")]
    public DateTime BirthDate { get; set; }
    [Display(GroupName = "Personal-", Order = 3)]
    public Gender Gender { get; set; }

    //The four items below will go to the Job tab of the tabbed Tabs group
    [Display(GroupName = "{Tabs}/Job", Order = 6)]
    public string Group { get; set; }
    [Display(GroupName = "{Tabs}/Job", Name = "Hire date")]
    public DateTime HireDate { get; set; }
    [Display(GroupName = "{Tabs}/Job"), DataType(DataType.Currency)]
    public decimal Salary { get; set; }
    [Display(GroupName = "{Tabs}/Job", Order = 7)]
    public string Title { get; set; }
}

public enum Gender { Male, Female }

In-place editors for editing underlying data are selected based on a property's data type. For instance, a Check Edit control is used to edit Boolean properties, a ComboBox Edit control is used to edit enumeration properties, etc. You can mark properties on a bound object using specific attributes to indicate that these properties should be edited using multi-line text editors, password edit boxes, or text editors with a phone mask enabled.

Automatic arrangement of in-place editors into groups and tabbed groups is supported. You can mark a property on a bound object with a dedicated attribute specifying the name of a target group or tabbed group. The in-place editor will go directly into this group during layout generation. If there is no group/tabbed group with this name, it will be automatically created. As such, you can combine multiple editors into the same group, group box, tabbed group or individual tabs.

Examples of supported attributes are shown in the code above.

Related Demo: Data Layout Control
Related Help Topic: Data Layout Control
Miscellaneous

A new IsRequired property has been added that allows you to mark specific fields as those that require mandatory data input. Labels for mandatory items use bold fonts. In the following image, the first two layout items have this property enabled:

IsRequired Option - Layout Controls for WPF and Silverlight by DevExpress

1226275960
LIVE CHAT

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

Your Privacy - Legal Statements

Copyright © 1998-2013 Developer Express Inc.
ALL RIGHTS RESERVED
All trademarks or registered trademarks
are property of their respective owners