Version

InitializeStyle(Style,String,String,Int32) Method

Initializes a style object with option to add it to CssBuilder.

If both roleName and baseRoleName are nulls (or empty strings) or EnableAppStylingResolved is false, then internalClassDefault is reset, but style is added to CssBuilder according to priority.

If priority is negative, then style is not added to CssBuilder.

Syntax
'Declaration
 
Public Overloads Overridable Sub InitializeStyle( _
   ByVal style As Style, _
   ByVal roleName As String, _
   ByVal baseRoleName As String, _
   ByVal priority As Integer _
) 
public virtual void InitializeStyle( 
   Style style,
   string roleName,
   string baseRoleName,
   int priority
)

Parameters

style
Instance of Style. Validation for null is built-in
roleName
Name of style used by control. It is better to be a constant defined in CssNames which starts with prefix "YourControl_". It can be null.
baseRoleName
Name of shared style. It should be a constant defined in CssNames which starts with prefix "Shared_". It can be null.
priority
Priority of style. In order to initialize only without adding style to CssBuilder, a negative value should be used.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also