468,556 Members | 2,324 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,556 developers. It's quick & easy.

Re: Control Properties of Type System.Drawing.Color

"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:er****************@TK2MSFTNGP02.phx.gbl...
Actually, it is a custom control that inherits System.Web.UI.Control. My
code for the BackgroundColor property is:

Public WriteOnly Property BackgroundColor() As System.Drawing.Color
Set(ByVal value As System.Drawing.Color)
Me._backgroundcolor = value
End Set
End Property

Me._backgroundcolor is declared as:

Private _backgroundcolor As System.Drawing.Color

I know that my syntax for the property declaration is correct, I have used
it many times in other classes for other types (such as String, Integer,
etc.), just never with System.Drawing.Color. Any ideas? Thanks.
Since this is derived from a Web class, I can't really help much, being a
desktop guy, but I have to wonder: why WriteOnly?
Oct 27 '08 #1
1 2001
Sometimes when developing my controls I don't add the Get's until later so
that I can see more of the properties on the screen at once. And since it is
a control intended primarily for declarative usage, it will allow me to use
it normally when testing. Yes, I do plan on adding the Get's before putting
it on my site, and maybe I do have a strange style, but most of the controls
I write are simply for the enjoyment, so who cares?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Jeff Johnson" <i.***@enough.spamwrote in message
news:eA**************@TK2MSFTNGP06.phx.gbl...
"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:er****************@TK2MSFTNGP02.phx.gbl...
>Actually, it is a custom control that inherits System.Web.UI.Control. My
code for the BackgroundColor property is:

Public WriteOnly Property BackgroundColor() As System.Drawing.Color
Set(ByVal value As System.Drawing.Color)
Me._backgroundcolor = value
End Set
End Property

Me._backgroundcolor is declared as:

Private _backgroundcolor As System.Drawing.Color

I know that my syntax for the property declaration is correct, I have
used it many times in other classes for other types (such as String,
Integer, etc.), just never with System.Drawing.Color. Any ideas? Thanks.

Since this is derived from a Web class, I can't really help much, being a
desktop guy, but I have to wonder: why WriteOnly?

Oct 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by MikeY | last post: by
2 posts views Thread by Mevar81 | last post: by
reply views Thread by Chris Millar | last post: by
reply views Thread by Duncan Mole | last post: by
3 posts views Thread by Marty McFly | last post: by
1 post views Thread by Wimpie van Lingen | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.