Re: Where does the designer code come from?
- From: "schneider" <eschneider.news.ms@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 20 Sep 2007 11:08:56 -0500
Thanks, that's what I was looking for. Looking to improve the designer code
for my components.
Schneider
"Sigurbjörn Valdimarsson" <sigurbj@xxxxxxxxxxx> wrote in message
news:OvWQZ25%23HHA.600@xxxxxxxxxxxxxxxxxxxxxxx
You might want to look at CodeDomSerializer and the
DesignerSerializerAttribute.
"schneider" <eschneider@xxxxxxxxxxxxx> wrote in message
news:u4jLI2ByHHA.3564@xxxxxxxxxxxxxxxxxxxxxxx
Yes, I guess I should have said "What .NET objects are used to generate
the code?" I want to alter the behavior.
Thanks,
Schneider
"OD" <webmaster @ e-naxos dot com> wrote in message
news:mn.7b647d77437ca577.18651@xxxxxxxxxxxxxxxx
How does the designer determine what code is used in the form designer
code?
For example 1, when you drag a control (using the object name?):
private System.Windows.Forms.TextBox txtUserName;
this.txtUserName = new System.Windows.Forms.TextBox();
When you drag a component onto the designer surface, VS is knowing the
class, then using reflection, it can get the list of public properties
and events. As all components must implement IComponent (providing
functionnality required by all components) and must inherit from
Control, it is easy to generate the "new" code and to manage other
common component behaviors.
Nothing really magic, just object programming :-)
--
OD___
www.e-naxos.com
.
- References:
- Re: Where does the designer code come from?
- From: Sigurbjörn Valdimarsson
- Re: Where does the designer code come from?
- Prev by Date: How can I change component access modifier through code?
- Next by Date: RE: Trap a build start event from designer
- Previous by thread: Re: Where does the designer code come from?
- Next by thread: How can I change component access modifier through code?
- Index(es):
Relevant Pages
|
Loading