So you have your web part and you want to pre-configure the height of the web part at time of deployment, rather than have the support department have to set the height everywhere your part has automatically been added etc.

I found this Gem on how to create preconfigured custom properrties here
and just adpated it for Base properties (with a slight bodge), there may be a better way but I don’t have time to find it (I did try overriding/new the Height property but it wouldn’t have it).

In your web part code create a custom property for DefaultHeight in your class e.g.

public class TeamWebPart : Microsoft.SharePoint.WebPartPages.WebPart
public string DefaultHeight{
get {
return this.Height;
set {
this.Height = value;

Then using the techniques described in the blog entry, enter the following line in the DWP file.

DefaultHeight xmlns=”http://EonUK/Oberon/RemedyWebPart/TeamWebPart”>150DefaultHeight>

When deployed this has the effect of Setting the Height of the Part to 150 pixels.

This technique could be used for width or any of the base properties exposed by WebPart.