Style attributes vs ServerControl properties

L

Lance Barger

I am wondering why there is some overlap in the way some visual
properties of server controls can be set. For example
btn.Style("color") = "white" has the same effect as btn.Forecolor =
Color.White. Is it simply because Microsoft decided to implement all
of the style attributes for the server controls or does it go deeper
than that.

Thanks in advance.
Lance Barger
 
T

Teemu Keiski

Hi,

having strongly-typed properties like ForeColor make using the control
interface very simple and probably what was important benefit, design-time
environment can provide better design-time experience (indexing to the style
collection is not so elegant), though collection editor does exist, but
still. With ForeColor you can get the color picker in VS.NEt and so on. Also
when thinking declarative syntax and its mapping to the control properties,
it makes sense why it is implemented this way. I don't think it goes any
deeper than that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top