From d4d44c73f6e7dd72a98f4bbbde95264e82b1d8bb Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Sat, 3 Dec 2011 15:25:12 +0000 Subject: Added documentation for TWebControlDecorator (fixes #259); Added missing bits to have TWebControlDecorator actually works. --- .../protected/pages/Advanced/Themes.page | 43 +++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'demos/quickstart/protected/pages/Advanced') diff --git a/demos/quickstart/protected/pages/Advanced/Themes.page b/demos/quickstart/protected/pages/Advanced/Themes.page index 4e440ce5..96f255dd 100644 --- a/demos/quickstart/protected/pages/Advanced/Themes.page +++ b/demos/quickstart/protected/pages/Advanced/Themes.page @@ -9,7 +9,7 @@ Themes in PRADO provide a way for developers to provide a consistent look-and-fe
-A theme is a directory consists of skin files, javascript files and CSS files. Any javascript or CSS files contained in a theme will be registered with the page that the theme is applied to. A skin is a set of initial property values for a particular control type. A control type may have one or several skins, each identified by a unique SkinID. When applying a theme to a page, a skin is applied to a control if the control type and the SkinID value both match to those of the skin. Note, if a skin has an empty SkinID value, it will apply to all controls of the particular type whose SkinID is not set or empty. A skin file consists of one or several skins, for one or several control types. A theme is the union of skins defined in all skin files. +A theme is a directory that consists of skin files, javascript files and CSS files. Any javascript or CSS files contained in a theme will be registered with the page that the theme is applied to. A skin is a set of initial property values for a particular control type. A control type may have one or several skins, each identified by a unique SkinID. When applying a theme to a page, a skin is applied to a control if the control type and the SkinID value both match to those of the skin. Note, if a skin has an empty SkinID value, it will apply to all controls of the particular type whose SkinID is not set or empty. A skin file consists of one or several skins, for one or several control types. A theme is the union of skins defined in all skin files.
As aforementioned, you can put several skins within a single skin file, or split them into several files. A commonly used strategy is that each skin file only contains skins for one type of controls. For example, Button.skin would contain skins only for the TButton control type.
+ ++As an alternative to the previous methods, to customize the rending of a control its Decorator property can be customized. A TWebControlDecorator can add custom text (html code) before and after both the open and close tag of the control. +
++In this example, a container div will be rendered around the THeader3 control, allowing the user to specify a css class for the container. +TWebControlDecorator can also interpret prado's template code and output the resulting html: +
++Note that you can use the Decorator property also inside skin files, getting it applied automatically to all the controls subjected to the specific skin. +
-- cgit v1.2.3