Forum General

Bind a list view to property attributes

tvaltval Member ✭✭

I have a class with app settings in it. The properties look similar to below and each property has a category and display name. I would like to bind a ListView to it--is it possible to bind the list view to property attributes in the xaml page? For example, I want the ViewCell within the list view to show only settings from the "Map" category, with one label showing the DisplayName and another label showing the value? If not, is there another way of accomplishing this?

[Browsable(true)]
    [XmlElement("UtmZone")]
    [DisplayName( "UTM Zone")]
    [Category("Map")]
    public int UtmZone
    {
        get
        {
            return System.Convert.ToInt32(Settings["UtmZone"]);
        }
        set
        {
            Settings["UtmZone"] = value;
        }
    }
Tagged:

Answers

Sign In or Register to comment.