Style.RegisterStyle Method
Assembly: System.Web.Mobile (in system.web.mobile.dll)
public: static Object^ RegisterStyle ( String^ name, Type^ type, Object^ defaultValue, bool inherit )
public static Object RegisterStyle ( String name, Type type, Object defaultValue, boolean inherit )
public static function RegisterStyle ( name : String, type : Type, defaultValue : Object, inherit : boolean ) : Object
Parameters
- name
The name of the style property.
- type
The type used for the property.
- defaultValue
The default value of the property.
- inherit
Indicates whether the style inherits from parent objects. The default is true.
Return Value
A unique key for lookup.The following example demonstrates how to use the RegisterStyle method to register a string property that supports inheritance and whose default value is an empty string (""). This incomplete example includes a public property, whose implementation accesses an element of this property by using the default indexer property of the base class.
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.