Invisible properties

Jan 5, 2011 at 7:56 PM

I have some properties for which I do not want to have any visible editor or category tab.

How can this be accomplished?

 

Thanks,

Bill

Coordinator
Jan 5, 2011 at 8:02 PM

Did you try using the attribute [Browsable(false)]?

Jan 5, 2011 at 8:17 PM

no, I ended up doing this:

                PropertyDialog dlg = new PropertyDialog { DataContext = DataContext};
                dlg.PropertyControl.ShowReadOnlyProperties = false;
                dlg.PropertyControl.ShowTabs = false;
                dlg.PropertyControl.ShowCategoriesAs = ShowCategoriesAs.Expander;
                dlg.ShowDialog();

I'll try the Browsable attr.

Maybe there's some better way to skin the cat?

Thanks,

Bill

Jan 5, 2011 at 8:19 PM

that works too and it makes more sense.

 

Thanks,

 

Bill

Coordinator
Jan 6, 2011 at 3:37 AM

It should also be possible to make a property visible/invisible dynamically. If your property is "Address" you can add a bool property "IsAddressVisible" to control the visibility of the Address property. Remember to raise INotifyPropertyChanged to make it work. See the examples.