ListControls icon indicating copy to clipboard operation
ListControls copied to clipboard

Support for attributes

Open desarrollo03TR opened this issue 7 years ago • 2 comments

Attributes like DisplayName or ReadOnly could be useful.

desarrollo03TR avatar Aug 15 '18 16:08 desarrollo03TR

You'll need to be more specific. In regards to what?

EWSoftware avatar Aug 15 '18 18:08 EWSoftware

For example, with this class:

public class Person
{
    [Browsable(false)]
    public string FirstName { get; set; }

    [Browsable(false)]
    public string LastName {get;set;}

    [DisplayName("Full Name")]
    public string FullName => $"{FirstName} {LastName}";
}

If a MultiColumnComboBox is binded with a List< Person>, the properties with Browsable(false) attribute will not generate columns, and the properties with DisplayName will generate columns with the specified name.

desarrollo03TR avatar Aug 15 '18 21:08 desarrollo03TR