Click here to Skip to main content
15,892,809 members
Home / Discussions / C#
   

C#

 
Generalmain []args parameter to run another instance Pin
hazzem elrefai15-Mar-04 22:57
hazzem elrefai15-Mar-04 22:57 
GeneralRe: main []args parameter to run another instance Pin
hazzem elrefai16-Mar-04 1:41
hazzem elrefai16-Mar-04 1:41 
GeneralDrag and Drop feature in TreeView Pin
viru15-Mar-04 21:04
viru15-Mar-04 21:04 
GeneralRe: Drag and Drop feature in TreeView Pin
Heath Stewart16-Mar-04 3:23
protectorHeath Stewart16-Mar-04 3:23 
GeneralWeb control questions Pin
Den2Fly15-Mar-04 19:55
Den2Fly15-Mar-04 19:55 
GeneralRe: Web control questions Pin
Heath Stewart16-Mar-04 3:19
protectorHeath Stewart16-Mar-04 3:19 
GeneralRe: Web control questions Pin
Den2Fly16-Mar-04 3:44
Den2Fly16-Mar-04 3:44 
GeneralRe: Web control questions Pin
Heath Stewart16-Mar-04 3:53
protectorHeath Stewart16-Mar-04 3:53 
If you don't need them, don't use them. Nothing says you have to. And if you don't want them to show up in the designer, override the properties and attribute them with BrowsableAttribute(false) and EditorBrowsableAttribute(EditorBrowsableState.Never), which is very common in many classes throughout the entire .NET FCL.

If you want to do it the hard way, the Width and Height are simple properties that store the width and height either in private fields your class can use or - more commonly - in the ViewState. The Style property is a little extra work but there are classes in the respectible ASP.NET namespaces that can help you parse and resolve these. Just read the documentation for the namespaces and browse the classes.

Seriously, though, just hide the members you don't want to support from the WebControl base class. You'll save yourself a lot of work. For example:
public class MyWebControl : WebControl
{
  // ...
  // Just don't use the Width in your code anywhere when you render.
  [Browsable(false)]
  [EditorBrowsable(EditorBrowsableState.Never)]
  public override Unit Width
  {
    get { return base.Width; }
    set { base.Width = value; }
  }
}


 

Microsoft MVP, Visual C#
My Articles
GeneralThank you so much -nt Pin
Den2Fly16-Mar-04 4:53
Den2Fly16-Mar-04 4:53 
GeneralDoubleBuffer Exception Pin
Amberite0015-Mar-04 16:40
Amberite0015-Mar-04 16:40 
GeneralRe: DoubleBuffer Exception Pin
John Fisher15-Mar-04 17:08
John Fisher15-Mar-04 17:08 
GeneralRe: DoubleBuffer Exception Pin
Amberite0015-Mar-04 17:32
Amberite0015-Mar-04 17:32 
GeneralRe: DoubleBuffer Exception Pin
John Fisher16-Mar-04 12:49
John Fisher16-Mar-04 12:49 
GeneralRe: DoubleBuffer Exception Pin
Heath Stewart16-Mar-04 3:15
protectorHeath Stewart16-Mar-04 3:15 
GeneralRe: DoubleBuffer Exception Pin
John Fisher16-Mar-04 12:48
John Fisher16-Mar-04 12:48 
GeneralRe: DoubleBuffer Exception Pin
Heath Stewart16-Mar-04 3:18
protectorHeath Stewart16-Mar-04 3:18 
QuestionInsert new Array ? Pin
azusakt15-Mar-04 16:24
azusakt15-Mar-04 16:24 
AnswerRe: Insert new Array ? Pin
John Fisher15-Mar-04 17:03
John Fisher15-Mar-04 17:03 
AnswerRe: Insert new Array ? Pin
Heath Stewart16-Mar-04 3:13
protectorHeath Stewart16-Mar-04 3:13 
GeneralConvert from true type font to vector image Pin
Zhang Songling15-Mar-04 15:32
Zhang Songling15-Mar-04 15:32 
GeneralRe: Convert from true type font to vector image Pin
Heath Stewart16-Mar-04 3:09
protectorHeath Stewart16-Mar-04 3:09 
QuestionC# and XSLT [ Bug ] ? Pin
Matthew Hazlett15-Mar-04 14:34
Matthew Hazlett15-Mar-04 14:34 
AnswerRe: C# and XSLT [ Bug ] ? Pin
Matthew Hazlett15-Mar-04 19:46
Matthew Hazlett15-Mar-04 19:46 
AnswerRe: C# and XSLT [ Bug ] ? Pin
Heath Stewart16-Mar-04 3:00
protectorHeath Stewart16-Mar-04 3:00 
Generaliterate through enum Pin
Christian Graus15-Mar-04 13:14
protectorChristian Graus15-Mar-04 13:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.