Advertisement
|
1. Create a style sheet in your project, e.g.:
.myLabel { font-weight: bold; color:
orangered; }
2. Add CSSLocation attribute to <mobile:Form> tag
pointing at stylesheet
<mobile:Form id="myForm" csslocation="myStylesheet.css“
runat="server" >
3. Set allowCustomAttributes=“true” in web.config
<system.web>
...
<mobileControls allowCustomAttributes="true“ />
...
</system.web>
4. Use CssClass attribute to apply a style class in the style sheet to a label:
<mobile:label id="myLabel" cssclass=“myLabel"
runat=“server”>
My label looks fine ;-)
</mobile:label>
Et voilà ... Credits to Andy
Wigley for his wonderfull Presentation at MDC 2004 ;-)
Read: .NET Compact Framework 2.0 (CF) - Programming your own CSS Stylesheets