In my work to create a WebPartBase, that will Skin a webpart and control its ContextSecurity (ie disallow its use in WSS or SPS or allow only on Specific Area) I discovered that the inherited properties for DefaultHeight (the method I previously used to auto configure the Height property) no longer worked.  After a bit of fiddling it made sense as my webpartbases Xml root was not the same as the inherited class.  Once I changed my DWP to reflect the XML root of the WebPartBase, it sprang into life.

Then sudden realisation, well this will be the same for the MS webpart class. So a bit of reflector and I find MS XmlRoot and try the Height attribute in my DWP.

<Height xmlns=”http://schemas.microsoft.com/WebPart/v2″&gt;100<Height>

Hurrah !!!!!!

This should work for any of the inbuilt base settings, (provided they take strings) other types have given me problems on my own default settings.

Now no longer do I need my proxy property to acheive this.

You know sometimes this Sharepoint stuff makes sense.

Advertisements