Ask a Question related to ASP Components, Design and Development.
-
kunta #1
Skin not applied at design time for CompositeComponent child contr
I am using Visual Studio 2008 and I have a very simple custom web server
control class named TestControl. The class inherits from
CompositeControl, with two child controls: Label myLabel and TextBox
myTextBox. In my TestWebForm the Theme attribute is set appropriately to a
Theme where I have defined skins with font attributes for "regular" Label and
TextBox controls and for the TestControl class (there is no code in
TestWebForm codebehind class). At run time everything is fine: the skin
(font attributes) is applied to child controls, but I cannot force the
ASP.NET VS designer to apply skin attributes at design time!
Actually, I have found to ways to apply the skin to child controls:
- skins for "regular" asp:Label ans asp:TextBox controls have to be defined
in the skin file and that's all
- skin for custom TestControl has to be defined in the skin file and font
attributes have to be mapped in CreateChildControl() (eg. myTextBox.Font.Size
= this.Font.Size;)
I have tried also:
- to set StylesheetTheme in the @page directive, instead of Theme attribute
and to call ApplyStyleSheetSkin() method for child controls in
CreateChildControls()
- to manually apply SkinID for TestControl
- to map Style attributes of child controls in CreateChildControls(),
instead of font attributes (eg. myLabel.Style[HtmlTextWriterStyle.FontSize] =
this.Font.Size.ToString();)
Nothing helps! The only way I have managed to get child controls
font attributes displayed somehow at design time, is to set Font.Name and
Font.Size in the TestControl constructor or to manually set these properties
in the designer's property grid. But it is not what I really need. Another
interesting thing is that when I inherit a control from eg. TextBox control,
not CompositeControl, the designer applies the skin (if skin is defined for
custom TextBox control, not for "regular" TextBox). What is the difference
between inherited and composite control regarding design time? Where have the
WYSIWYG disappeared? Is it possible to get the design time behavior as I
expect? Please, help!
--
Kad ja tamo a ono medjutim ...
kunta Guest
-
Design Time Styles Not Applied to New Pages
When Contribute 4 publishers create new pages based on existing pages on my websites, design time style sheets that I have defined in Dreamweaver... -
Get Child Controls at design-time
I have a Webcontrol that was supposed to act like a panel control. I manipulated a TemplatedControlDesigner to make an "Edit mode". I save my... -
Overprint on all the time applied to everything...is this possable??
I am in a situation where 95% of what I do needs to have the overprint option turned on. The 5% where I don't need it on...it wouldn't do any harm to... -
Building child controls on Design Time
Hi , I am trying to create a custom control similar to datagrid.Grid contain some thing like data column where i am able to add column during... -
Composite WebControl -- Child Control Property Persistance at Design-time
Hi, I seen, this asked a number of times at this group but still have not seen any complete/rectified/fixed code. I have created a Composite...



Reply With Quote

