CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
web_forms
getting_started
data_presentation_controls
dotnetnuke
data_access-sql_server_sql_server_express_and_sqldatasource_control
security
client_side_web_development
novell-support-groupwise-6x-clients
data_access-data_access_and_objectdatasource_control
asp-net_ajax-asp-net_ajax_control_toolkit
novell-support-netware-6x-install-upgrade
asp-net_ajax-asp-net_ajax_discussion_and_suggestions
novell-support-netware-6x-administration-tools
master_pages_themes_and_navigation_controls
configuration_and_deployment
novell-support-netware-client-winnt-2x-xp
novell-support-groupwise-7x-clients
asp-net_ajax-asp-net_ajax_ui
novell-support-edirectory-netware
community-free_for_all
visual_studio_2005
novell-support-groupwise-6x-install-setup
data_access-xml_and_xmldatasource_control
control-cancel
novell-support-iprint
advanced_asp-net-crystal_reports
data_access-xml_web_services
microsoft-public-access
novell-community-chat
state_management
novell-support-netware-6x-abends-hangs
dotnetnuke-getting_started
novell-support-groupwise-6x-gwia
-net_languages-c
novell-support-identity-manager-engine-drivers
novell-support-groupwise-discontinued
advanced_asp-net-architecture
opensuse-org-suse-linux-support-install-configure-administration
dotnetnuke-custom_modules
novell-support-groupwise-7x-install-setup-admin
novell-support-netware-6x-storage-media
novell-support-groupwise-6x-agents
installation_and_setup
data_access-access_databases_and_accessdatasource_control
windows-hosting_open_forum
visual_web_developer_2005_express
novell-support-groupwise-6x-web-access
novell-support-netware-6x-server-backup
macromedia-dreamweaver
novell-support-netware-5x-administration-tools
novell-support-ifolder
novell-support-bordermanager-install-setup
novell-support-imanager
microsoft-public-dotnet-framework-aspnet
novell-support-netware-5x-install-upgrade
novell-support-cluster-services
novell-support-bordermanager-proxies
novell-support-newsflash
advanced_asp-net-sql_server_reporting_services
microsoft-public-dotnet-languages-csharp
web_parts_and_personalization
about_this_site-feedback_on_this_website
ibm-software-websphere-portal-server
novell-support-netware-dns-dhcp
novell-support-zenworks-desktops-4x-app-launcher
-net_languages-visual_basic_-net
advanced_asp-net-custom_server_controls
novell-support-bordermanager-vpn
novell-support-ndps-neps
microsoft-public-sqlserver-programming
novell-support-netware-webserver
community-jobs
novell-support-netware-4x
advanced_asp-net-mobile_and_handheld_devices
internet_explorer_web_controls
novell-support-zenworks-desktops-4x-install-setup
novell-support-edirectory-linux
novell-support-groupwise-7x-gwia
development_tools-web_matrix_general_discussions
microsoft-public-access-formscoding
macromedia-flash
community-announcements
portal_starter_kit
novell-support-zenworks-desktops-4x-management-agent
novell-support-zenworks-patch-management
novell-support-native-file-access
microsoft-public-access-queries
microsoft-public-access-forms
novell-support-groupwise-7x-web-access
novell-support-netware-small-business-6x
data_access-active_directory_and_ldap
novell-support-edirectory-windows
novell-support-groupwise-7x-agents
novell-support-ichain
data_access-oracle
novell-support-zenworks-desktop-management-6x-imaging
novell-support-groupwise-7x-wireless
novell-support-netware-5x-abends-hangs
advanced_asp-net-localization
novell-support-zenworks-desktop-management-7x-imaging-server-nw-win




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: Date Entered: 5/7/2005 3:10:18 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 8 Views: 49 Favorited: 0 Favorite
9 Items, 1 Pages 1 |< << Go >> >|
"PLBlum" <>
NewsGroup User
Skins and child properties on a control5/7/2005 3:10:18 PM

0

Suppose I have a custom control that has a nested child property group, like this:

<cc1:mycontrol [properties]>
  <childpropertyname [properties]>
  </childpropertyname>
</cc1:mycontrol>

I attempted to setup a skin that sets a property in <childpropertyname>. I receive the compiler error "Control skins cannot contain child controls". (Please assume that the syntax of the main control definition is fine and there are no errors if I omit <childpropertyname>.) While the child property is indeed a control, its still a property declaration syntax as if I had defined some other non-control object.

1. Can I declare any form of child property in a skin or is it limited to the top level?
2. What are the requirements for a child property to work with a skin?
3. Is this a bug since its a child property that happens to be a control class?

Background:
In my example, the <childpropertyname> is actually another WebControl whose properties are exposed and uses these attributes to define itself:
[PersistenceMode(PersistenceMode.InnerProperty)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]

Plus it has [ParseChildren(false)] and [PersistChildren(false)], and uses AddParsedSubObject() to assign the child control to that property. A ControlBuilder maps the <childpropertyname> to the object instance used by that property.


--- Peter Blum
Creator of Professional Validation And More Suite, Peter's Date Package, and Peter's Polling Package
www.PeterBlum.com
"Caddre" <>
NewsGroup User
Re: Skins and child properties on a control5/7/2005 9:29:59 PM

0

I think Skins are in Preinit so what you are trying to do is far down the  Asp.net 2.0 HTTP pipeline to be valid.  Try the link below on how you can implement skins.  I would also run a search on Brock Allen posts about Themes on this site .  I could be wrong.  Hope this helps

http://www.ondotnet.com/pub/a/dotnet/2004/11/15/libertyonwhidbey.html


Kind regards,
Gift Peddie
"PLBlum" <>
NewsGroup User
Re: Skins and child properties on a control5/9/2005 4:30:48 PM

0

Thank you for the article. I think the info about the PreInit phase is pertinent. However, I'd still like to know what is permitted with child properties that are created using PersistanceModeAttribute.InnerProperty.

I am also curious if there are attributes, interfaces, and/or overrideable methods that a custom control developer can use to apply a skin to child properties or on demand (such as when a child property's object is created and now needs its skin applied.)


--- Peter Blum
Creator of Professional Validation And More Suite, Peter's Date Package, and Peter's Polling Package
www.PeterBlum.com
"BrockAllen" <>
NewsGroup User
Re: Skins and child properties on a control5/9/2005 4:41:05 PM

0

 PLBlum wrote:

Thank you for the article. I think the info about the PreInit phase is pertinent. However, I'd still like to know what is permitted with child properties that are created using PersistanceModeAttribute.InnerProperty.

I'm sure you've come to this realization by now, but the problem is the fact that your property is a Control, as opposed to just some other type that holds the property data. I've gotten [PersistanceModeAttribute.InnerProperty] properties to work fine in the .skin.

Now, as to why it specifically doesn't like your nested property as a Contorl is another question. Perhaps it's just a simple check in the .skin code to disallow nested controls. I don't know for sure; Perhaps some time with Reflector would help.

-Brock

 


DevelopMentor
http://staff.develop.com/ballen
"PLBlum" <>
NewsGroup User
Re: Skins and child properties on a control5/9/2005 5:01:54 PM

0

I have been trying to track down the actual code in reflector but got lost when I found a Page gets attached to some kind of event handler which does the work. Any idea on the class that does the actual loading of skins and/or deploying its values to the object?
--- Peter Blum
Creator of Professional Validation And More Suite, Peter's Date Package, and Peter's Polling Package
www.PeterBlum.com
"Caddre" <>
NewsGroup User
Re: Skins and child properties on a control5/9/2005 5:18:39 PM

0

Try this link new link he is also at this site,  Microsoft is providing only HTML pages.  Hope this helps.

http://fredrik.nsquared2.com/viewpost.aspx?PostID=146


Kind regards,
Gift Peddie
"BrockAllen" <>
NewsGroup User
Re: Skins and child properties on a control5/9/2005 5:26:31 PM

0

 PLBlum wrote:
I have been trying to track down the actual code in reflector but got lost when I found a Page gets attached to some kind of event handler which does the work. Any idea on the class that does the actual loading of skins and/or deploying its values to the object?

The way it works is that the .skin is a compiled class that keeps an index table of control type/code pairs. For each index (so say typeof(Calendar), typeof(Table), etc) there is code that was emitted by the ASP.NET parser (as it was parsing the .skin) that's much like the code the parser emits when it's parsed ASPX files that sets all of the properties as declared in the .skin. So, when the theme is applied in the page, every control in the page's control hierarchy is walked and is compared to the map kept by the skin. If a control in the page hierarchy is matched, then the code associated with the key (meaning, that type of control) is executed. The mechanics of the execution is via a delegate and that's why you don't see in Reflector where it's "going", so to speak.

The best way to see this is to precompile your site, then use reflector to see the assembly generated for the .skin files.

-Brock

 


DevelopMentor
http://staff.develop.com/ballen
"PLBlum" <>
NewsGroup User
Re: Skins and child properties on a control5/9/2005 9:01:06 PM

0

Caddre, thank you for that link. I've been able to track all that down on more so far. I will be nice when a new "Developing ASP.NET Server Controls and Components" book is published for ASP.NET 2.0 (hint, MS Press!)
--- Peter Blum
Creator of Professional Validation And More Suite, Peter's Date Package, and Peter's Polling Package
www.PeterBlum.com
"PLBlum" <>
NewsGroup User
Re: Skins and child properties on a control5/9/2005 9:03:41 PM

0

Brock, thank you very much! That is wondeful insight.
--- Peter Blum
Creator of Professional Validation And More Suite, Peter's Date Package, and Peter's Polling Package
www.PeterBlum.com
9 Items, 1 Pages 1 |< << Go >> >|


Free Download:













why cssselectorclass and skinid?

bug in asp.net 2.0 webcontroladapter

announcement: beta 3 has been released

what is this detailsviewadapter code for?

css friendly control adapters: menu incremental expansion of items on demand (when they are clicked)

don't see css friendly control adapters templates after vsi install

button click problem

top-level menu height

alternate rendering for login control

menu adapter: active arrow not showing up

webparts

css adapters - http://www.codeplex.com/cssfriendly

gridview adapter doesn't distinguish between itemstyle and headerstyle

css friendly menu control not working properly in ie6

treeview showlines

menu dissapearing in ie 6

asp.net 2.0 css friendly control adapters

visual studio hangs when creating a new website after installing the css controls vsi file

staticdisplaylevels is very important

control must be in server form

safari menu control

changing menu width?

.aspnet-menu-selected problems

parser error when using adapters

select treeviewnode

createuserwizard with cssadapters

menu and adding the 'confirm()' javascript on one of the item when click

using cssadapters for the whole site

control adapter toolkit and vstudio 2008?

menu adapter and accordian control

beta 3 error message on detailsviewadapter

please help – dynamically load parents images to tree menu

treeviewadapter and showexpandcollapse?

treeview.selectednode, when is it set???

centering static level of horizontal menu.

non-compliant xmhtl in passwordrecovery adapter

radiobuttonlist adapter (for yuval)

excluding control from css adapter

new design for css friendly login control

gridviewadapter beta 3.0 with added support for cssclass, clientid, headerstyle-cssclass, row.cssclass, row.attributes

css menuadapter

ie7 ghost menu

reagrding using filter in (menuexample.css) css adapter classes for menu control

css adaptors inside master pages

ajax fix: updatepanel

serving suggestion

web.sitemap usage

another menu is not displaying in ie6 using css control adapters

add assembly to web.config file

treeview. please, could someone help me out?

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT