Style Class
Note: This API is now obsolete.
Organizes style characteristics of an ASP.NET mobile control. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site.
Assembly: System.Web.Mobile (in System.Web.Mobile.dll)
[TypeConverterAttribute(typeof(ExpandableObjectConverter))] [ObsoleteAttribute(L"The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] [AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)] [AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)] public ref class Style : IParserAccessor, ITemplateable, IStateManager, ICloneable
The Style type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Style | Initializes a new instance of the Style class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
| Name | Description | |
|---|---|---|
![]() | Alignment | Gets or sets the specified alignment for the style. The default value is Alignment::NotSet. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | BackColor | Gets or sets the specified background color for the style. The default value is Color::Empty. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Control | Returns a strongly typed reference to the associated control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | DeviceSpecific | Gets or sets the DeviceSpecific/Choice construct associated with the control. The accessor returns nullptr if no such construct exists. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Font | Returns a FontInfo object that contains font information about the control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ForeColor | Gets or sets the specified foreground color for the style. Typically, this property sets the color for the text. The default value is Empty. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | IsTemplated | Gets a value indicating whether a Style object has an active template set. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | IsTrackingViewState | Gets a value indicating whether the Style object is saving changes to its view state. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Item[Object] | Returns the style through the key parameter, with or without using inheritance. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Item[Object, Boolean] | Returns the style, through the key parameter, with or without using inheritance. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Name | Gets or sets the name of the specified object. The default value is an empty string (""). This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | State | Gets the current contents of the StateBag. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | StyleReference | Gets or sets a reference to the style properties for a Style. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Wrapping | Gets or sets the specified wrapping mode for the style. The default value is NotSet. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
| Name | Description | |
|---|---|---|
![]() | AddParsedSubObject | Sets the DeviceSpecific property to the specified object. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ApplyTo | Applies the properties of a style to a control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Clone | Returns a copy of this instance of the Style object. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetTemplate | Returns the template with the specified name. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | LoadViewState | Loads the view state into the State of the Style object. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | RegisterStyle | Registers a style property and returns a unique key for lookup. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | SaveViewState | Saves the changes to the view state to an Object. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | TrackViewState | Turns on the tracking of view state in the Style object. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
| Name | Description | |
|---|---|---|
![]() ![]() | AlignmentKey | Represents the key used to retrieve the Alignment setting of the Style. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | BackColorKey | The key for retrieving the style from the embedded style sheet for BackColor property. Used internally by ASP.NET. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | BoldKey | The key for retrieving the style from the embedded style sheet for setting the Bold property of the Font. Used internally by ASP.NET. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | FontNameKey | The key for retrieving the style from the embedded style sheet for the Name property of the Font property. Used internally by ASP.NET. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | FontSizeKey | The key for retrieving the style from the embedded style sheet for the Size property of the Font property. Used internally by ASP.NET. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | ForeColorKey | The key for retrieving the style from the embedded style sheet for the ForeColor property. Used internally by ASP.NET. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | ItalicKey | The key for retrieving the style from the embedded style sheet for the Italic property of the Font property. Used internally by ASP.NET. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | WrappingKey | The key for retrieving the style from the embedded style sheet for Wrapping. Used internally by ASP.NET. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
| Name | Description | |
|---|---|---|
![]() ![]() | IParserAccessor::AddParsedSubObject | Infrastructure. For a description of this member, see IParserAccessor::AddParsedSubObject. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | IStateManager::IsTrackingViewState | Infrastructure. For a description of this member, see IStateManager::IsTrackingViewState. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | IStateManager::LoadViewState | Infrastructure. For a description of this member, see IStateManager::LoadViewState. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | IStateManager::SaveViewState | Infrastructure. For a description of this member, see IStateManager::SaveViewState. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() ![]() | IStateManager::TrackViewState | Infrastructure. For a description of this member, see IStateManager::TrackViewState. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
The base Style class contains style characteristics common to all mobile controls. Classes that inherit from the Style class contain additional style characteristics specific to their associated control.
Due to the diversity of devices supported by mobile controls, all style properties are advisory, and might or might not be honored depending on the capabilities of the target device.
| Topic | Location |
|---|---|
| Walkthrough: Implementing a New Style | Mobile Application Reference |
| Walkthrough: Implementing a New Style | Mobile Application Reference |
| Walkthrough: Implementing a New Style | Mobile Application Reference |
The following example demonstrates three user-defined styles in a StyleSheet object. A SelectionList object holds three values that correspond to the three defined styles. The OnClick command event calls the SelectStyle function, which changes the StyleReference property of the TextView object.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.








