Hide automatic "Parent" field in properties pane
-
Tuesday, September 27, 2011 8:17 AM
I´m using inheritance in my metamodel. Is there a way to hide the "Parent" field in the properties pane.
I dont want to enable users to define them by that field, because some code behind will do the job for a reason.
Thanks,
Jakob
All Replies
-
Tuesday, September 27, 2011 8:51 AMOwner
By "Parent field", you mean the properties defined in the base class? If so, you could set IsBrowsable to false in each of the properties in the base class. For more about how to control what users see in the properties window, see Customizing the Properties Window.
- Alan -MSFT- Proposed As Answer by Alan Cameron Wills -Microsoft Employee, Owner Tuesday, September 27, 2011 8:51 AM
- Unproposed As Answer by Alan Cameron Wills -Microsoft Employee, Owner Tuesday, September 27, 2011 9:28 AM
-
Tuesday, September 27, 2011 9:05 AM
No, i meant the "Parent" property. It´s a dropdown, where i can select an entity on the model, which should be the parent of the current selected entity. It´s not a real property - it will create/change the base-child relationship of two entities.
This parent "property" is generated automatically for every class having a base class, therefore there is no IsBrowsableproperty to change...
-
Tuesday, September 27, 2011 9:28 AMOwner
I think that the Parent field that you're seeing is the left-hand role of the embedding relationship. Either the base or the derived class in your model is at the child (right-hand) end of an embedding relationship. You can select the left-hand branch of that relationship and set Is Property Browsable to false.
That would have the effect of hiding the Parent relationship for all sub-classes.
(In a DSL, the usual OO conventions apply - at runtime, each single instance object has properties of both base and derived domain classes - the base properties aren't delegated to a separate object.)
- Alan -MSFT- Proposed As Answer by Alan Cameron Wills -Microsoft Employee, Owner Tuesday, September 27, 2011 9:28 AM
- Marked As Answer by Jakob Strauch Tuesday, September 27, 2011 12:43 PM
-
Tuesday, September 27, 2011 12:43 PMWell, you were right. I´ve used the Role name "Parent" of an relationship and didn´t realized it! Thanks and sorry for the confusion :-)

