| |||||||
| Skins You are working on a new Skin? Post it here! |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) | |
| Portal Member | I was looking for a way to specify global style definitions. You can include a common xml for Controls used the same way on different pages. But what if you want the same styling applied to other controls? You'll end up specifying the same style multiple times. If you change your mind about a certain color later on it is a lot of work to change it all over your skin. references.xml provides a place to specify default values for control properties. I wanted something like that so i read the wiki part about references.xml. It says the following: Quote:
Here's how you can use it. It is possible to define named styles in the references.xml file. You can apply this named style to any Control in your other skin files. Note: below code blocks are not php code they are xml but i like the syntax highlighting ![]() Imagine we want to use a lot of big red text on our screens ( Don't be surprised if you come back to this decision later on )Define a global style named 'Heading1' or some other descriptive name. Every Control we apply 'Heading1' to should have font24 and a red textcolor. You can add as many styles as you need. And you are not limited to just font and color as i used here. PHP Code: Now everywhere you want to use this style you can apply it as shown below PHP Code: Styles do not override properties defined in the Control itself. If you specified another font for this label it would show using that font and not the one you defined in the style. The style only provides default values! I think this can be of great use to guarantee a uniform look throughout a skin. Happy Skinning, Sambal | |
| | |
| 2 Users Say Thank You: |
![]() |
| Bookmarks |
| Tags |
| feature, styles, undocumented |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DVD Feature | Ebeneezer | Improvement Suggestions | 5 | 2008-04-14 05:13 |
| Newzbin This Feature | sdalberg | My TVSeries | 5 | 2007-11-30 23:04 |
| Feature Request | Kurtis | My TVSeries | 3 | 2007-08-08 07:11 |
| Is This Feature Already Implemented? | stevenduk | Improvement Suggestions | 4 | 2005-04-12 01:31 |