Szerkesztés

Megosztás a következőn keresztül:


WebControl.SkinID Property

Definition

Gets or sets the skin to apply to the control.

public:
 virtual property System::String ^ SkinID { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Browsable(true)]
public override string SkinID { get; set; }
[<System.ComponentModel.Browsable(true)>]
member this.SkinID : string with get, set
Public Overrides Property SkinID As String

Property Value

The name of the skin to apply to the control. The default is Empty.

Attributes

Exceptions

The skin specified in the SkinID property does not exist in the theme.

Remarks

Skins available to a control are contained in one or more skin files in a theme directory. The SkinID property specifies which of these skins to apply to the control. A skin is specific to a particular control; you cannot share skin setting between controls of different types.

If you do not set the SkinID property, a control uses the default skin if one is defined. For example, if a skin without an ID is defined for an Image control, then that skin applies to all Image controls that do not explicitly reference a skin by ID and that are not set to disable theming. If a skin with an ID is defined for an Image control, then that skin applies to only Image controls whose SkinID is set to that ID.

If the skin files in a theme directory do not contain a skin with the specified SkinID, an ArgumentException exception is thrown at runtime.

Applies to

See also