OnComponentChanged/Events not fired at DesignTime with Custom Control/Designer
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolscs' list.


Maurice Joseph
I'm creating a custom web control to be modified in the VS designer.

I'm using a very simple class to get my feet wet.

The AngelPage (extends WebControl) which exposes a custom class,
DefaultHeader. I'd like to modify the DefaultHeader properties at
design time.

In addition to these two classes, I've also created a TypeConverter and
a ControlDesigner (PageDesigner) class. I have two basic problems:
1. The properties are correctly displayed in the designer, however, the
modified values are never being written to the Test.aspx file
(expectation is too see modified values appended to tag reference in
HTML view)
2. When debugging this project (using devenv), I noticed the
onComponentChanged event is never fired.

I suspect both of problems share a common root cause. I'm sure it
amounts to a very simple problem. Is there an additional step to
registering a custom designer to fire events for modified properties?

Any help would be greatly appreciated. Code files inlined as zip for
reference

Thank you

begin 666 DefaultHeader.zip
M4$L#!!0````(`"Z_V2P*#S:W*@,``/X'```O````=V]R:R]V<W,O<W)C+T%N
M9V5L+T-O;7!O;F5N="]522]086=E1&5S:6=N97(N8W.555%/VS 0?@X2_\'J
M7E()I9MX6\>DTHY1B0E$RWA /#C)$;PY=F0[33O$?]_9L=/0EDFKJB:^^^[N
M._OSM=9,%&2QT0;*\?%1W5LF\^M=RTS1!I>[YGM(#YB2N_EA:S(#S0KQCA,?
M4RF,DESO(J:RK*0`87[('/B_O>\4F5%#]P,YA\PP*?8JSA@MA-2&97NN):P-
MVHZ/!"U!5S0#,A$%%NYX8#?'1R_'1]%H-")?=%V65&V^^O6B79(<=*989:N3
M)ZG(#2V@I0XJ";&C7G!5IYQE).-4ZS=H\IGXC0L61-OR4:78BAK/SX:0ROXX
M]E%(V$\5#ZWCI?6_VD</*%>@%,N!I%)R,N%<-K<8]P=\3!1%!9CH18&I%39%
MN8;QJ\\418<RK23+R5PPPRC'1/&\VT.2A;?A-GU*-20]^!8S=G[7W1F)NWZ'
M'6+<=;3/0AMES_<[F'8?EJR$2U/RN%=ZX3#WBAG<<-U@%0$-Z5MC3\)&6HUX
M[+,)X+>.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P;VYE;G0O54DO4&%G941E<VEG;F5R+F-S
M4$L!`A0`% ````@`-@#:+*2'H;BU`P``D@T``# ``````````0`@`+:!=P,`
M`'=O<FLO=G-S+W-R8R]!;F=E;"]#;VUP;VYE;G0O54DO1&5F875L=$AE861E
M<BYC<U!+`0(4`!0````(`#$!VBP"FD4M,P0``.0,```Y``````````$`( "V
M@7H'``!W;W)K+W9S<R]S<F,O06YG96PO0V]M<&]N96YT+U5)+T1E9F%U;'1(
M96%D97)#;VYV97)T97(N8W-02P$"% `4````" !(`-HL<6(ZA18"``![! ``
M+ `````````!`" `MH$$# ``=V]R:R]V<W,O<W)C+T%N9V5L+T-O;7!O;F5N
M="]522]!;F=E;%!A9V4N8W-02P$"% `4````" `L`=HLPIH_7#("``"T`P``
M/P`````````!`" `MH%D#@``26YE='!U8B]W=W=R;V]T+U!R;VIE8W1!;F=E
M;"]!<'!L:6-A=&EO;B]!9&UI;B]497-T06YG96Q522YA<W!X4$L!`A0`% ``
M``@`+ ':+&^J1N4``@``KP0``$(``````````0`@`+:!\Q ``$EN971P=6(O
M=W=W<F]O="]0<F]J96-T06YG96PO07!P;&EC871I;VXO061M:6XO5&5S=$%N
C9V5L54DN87-P>"YC<U!+!08`````!@`&`%D"``!3$P``````
`
end
--
Maurice Joseph
Click here to reveal e-mail address

--
http://fastmail.fm - Come on home

Reply to this message...
 
    
Paul D. Murphy
Marcie,

Are you trying to replace the default page designer for one of your page
classes?

Paul

    Paul D. Murphy
    Click here to reveal e-mail address
    "Teamwork is a lot of people doing what I say."

-----Original Message-----
From: Maurice Joseph [mailto:Click here to reveal e-mail address]=20
Sent: Wednesday, June 26, 2002 1:14 PM
To: aspngcontrolscs
Subject: [aspngcontrolscs] OnComponentChanged/Events not fired at
DesignTime with Custom Control/Designer

I'm creating a custom web control to be modified in the VS designer.

I'm using a very simple class to get my feet wet.

The AngelPage (extends WebControl) which exposes a custom class,
DefaultHeader. I'd like to modify the DefaultHeader properties at
design time.

In addition to these two classes, I've also created a TypeConverter and
a ControlDesigner (PageDesigner) class. I have two basic problems:
1. The properties are correctly displayed in the designer, however, the
modified values are never being written to the Test.aspx file
(expectation is too see modified values appended to tag reference in
HTML view)
2. When debugging this project (using devenv), I noticed the
onComponentChanged event is never fired.

I suspect both of problems share a common root cause. I'm sure it
amounts to a very simple problem. Is there an additional step to
registering a custom designer to fire events for modified properties?

Any help would be greatly appreciated. Code files inlined as zip for
reference

Thank you

Reply to this message...
 
    
Paul D. Murphy
Sorry Maurice not marcie

    Paul D. Murphy
    Click here to reveal e-mail address
    "Teamwork is a lot of people doing what I say."

-----Original Message-----
From: Maurice Joseph [mailto:Click here to reveal e-mail address]=20
Sent: Wednesday, June 26, 2002 1:14 PM
To: aspngcontrolscs
Subject: [aspngcontrolscs] OnComponentChanged/Events not fired at
DesignTime with Custom Control/Designer

I'm creating a custom web control to be modified in the VS designer.

I'm using a very simple class to get my feet wet.

The AngelPage (extends WebControl) which exposes a custom class,
DefaultHeader. I'd like to modify the DefaultHeader properties at
design time.

In addition to these two classes, I've also created a TypeConverter and
a ControlDesigner (PageDesigner) class. I have two basic problems:
1. The properties are correctly displayed in the designer, however, the
modified values are never being written to the Test.aspx file
(expectation is too see modified values appended to tag reference in
HTML view)
2. When debugging this project (using devenv), I noticed the
onComponentChanged event is never fired.

I suspect both of problems share a common root cause. I'm sure it
amounts to a very simple problem. Is there an additional step to
registering a custom designer to fire events for modified properties?

Any help would be greatly appreciated. Code files inlined as zip for
reference

Thank you

Reply to this message...
 
    
Maurice Joseph
Marcie (aka Maurice - :)

No, I'm just trying to expose a Complex type in a Custom Control in the
designer. I would like to create a control hierarchy (i.e.
MyCustomControl -> BaseControl (contains multiple properties common to all
developed controls) -> Web Control. I have no problem in seeing the
inheritied properties in the property grid. The problem arises when
modifying these properties. The data values are never persisted/written in
the aspx (html) file. Maybe I'm not extending from the correct class
"WebControl" versus "Control". Or maybe, I've missed overriding a particualr
method.

Thanks,
Maurice
"Paul D. Murphy" <Click here to reveal e-mail address> wrote in message
news:676377@aspngcontrolscs...

Marcie,

Are you trying to replace the default page designer for one of your page
classes?

Paul

Paul D. Murphy
Click here to reveal e-mail address
"Teamwork is a lot of people doing what I say."

-----Original Message-----
From: Maurice Joseph [mailto:Click here to reveal e-mail address]
Sent: Wednesday, June 26, 2002 1:14 PM
To: aspngcontrolscs
Subject: [aspngcontrolscs] OnComponentChanged/Events not fired at
DesignTime with Custom Control/Designer

I'm creating a custom web control to be modified in the VS designer.

I'm using a very simple class to get my feet wet.

The AngelPage (extends WebControl) which exposes a custom class,
DefaultHeader. I'd like to modify the DefaultHeader properties at
design time.

In addition to these two classes, I've also created a TypeConverter and
a ControlDesigner (PageDesigner) class. I have two basic problems:
1. The properties are correctly displayed in the designer, however, the
modified values are never being written to the Test.aspx file
(expectation is too see modified values appended to tag reference in
HTML view)
2. When debugging this project (using devenv), I noticed the
onComponentChanged event is never fired.

I suspect both of problems share a common root cause. I'm sure it
amounts to a very simple problem. Is there an additional step to
registering a custom designer to fire events for modified properties?

Any help would be greatly appreciated. Code files inlined as zip for
reference

Thank you

Reply to this message...
 
 
System.ComponentModel.TypeConverter
System.Web.UI.Design.ControlDesigner
System.Web.UI.WebControls.WebControl
System.Windows.Forms.Design.ControlDesigner




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com