I'm developing a C# .NET Custom Control and I want to prevent the user, while in design mode, from resizing the Height, while allowing them to reize the Width.
views:
35answers:
2Does not prevent shrinking the height--unless both are same. Plus, this blocks it even in runtime mode.
Russ
2010-08-13 16:09:44
Gio
2010-08-13 16:45:15
A:
Try using the 'DesignMode' property, this indicates that you are in design mode, i.e. from the UI designer mode....see here on MSDN...
public int Height(){
get{ }
set{ if (this.DesignMode) return;
else this.myHeight = value;
}
}
tommieb75
2010-08-13 16:18:34