Style.RegisterStyle Method
.NET Framework 3.0
Registers a style property and returns a unique key for lookup.
Namespace: System.Web.UI.MobileControls
Assembly: System.Web.Mobile (in system.web.mobile.dll)
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
Not applicable.
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 Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: