Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: PropertyGrid: I don't want type names to show for ExpandableObjects

$
0
0
Hi,

In the example below, I'm binding the WPF Toolkit PropertyGrid to a School object, which contains Person objects. The Person objects can be expanded, thanks to the ExpandableObject attribute.

But how would I hide the type names? Those do not look good for the end-user.

Image
    [DisplayName("A person")]   
    public class Person
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Age { get; set; }
    }

    public class School
    {
        public Person Director { get; set; }
        [Xceed.Wpf.Toolkit.PropertyGrid.Attributes.ExpandableObject]
        public Person Handyman { get; set; }
        public string Name { get { return "NJ";}}
    }

Viewing all articles
Browse latest Browse all 2157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>