For example, the Form class has a custom style class
named PagerStyle that inherits from the default Style class to provide access to additional
styling customization with respect to pagination. The ability to provide custom style classes to
support custom control development is similar to traditional ASP.NET development, as covered
in Chapter 4.
After configuring a few styles on the StyleSheet object, we can apply these styles to controls.
Controls gain access to StyleSheet styles through the StyleReference property inherited from
MobileControl. The StyleReference drop-down list automatically populates with the default
styles in addition to the custom styles we defined in the StyleSheet control.
Mobile controls apply configured styles during the rendering process with the help of
device adapters, which we discuss later in this chapter. If a control is configured with a style
that will not render on a particular device requesting the page, such as a WML browser that
does not support color styles, the style will be ignored. This approach ensures that content is
returned to the requesting device, albeit with less style.
As we mentioned previously, a control can accept the default style provided by MobileControl,
or a control can require a custom style class in order to provide additional customization options
for the control user.
Pages:
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635