ThemeableAttribute(Boolean) 생성자

정의

지정된 부울 값을 통해 이 특성이 테마와 컨트롤 스킨의 영향을 받는 멤버나 형식을 나타내는지 여부를 확인하여 ThemeableAttribute 클래스의 새 인스턴스를 초기화합니다.

public:
 ThemeableAttribute(bool themeable);
public ThemeableAttribute (bool themeable);
new System.Web.UI.ThemeableAttribute : bool -> System.Web.UI.ThemeableAttribute
Public Sub New (themeable As Boolean)

매개 변수

themeable
Boolean

ThemeableAttribute를 테마의 영향을 받을 수 있는 형식이나 멤버를 나타내도록 초기화하려면 true이고, 그렇지 않으면 false입니다.

예제

다음 코드 예제에서는 적용 하는 방법을 보여 줍니다는 ThemeableAttribute 컨트롤의 멤버에 특성입니다. 이 예에서 ThemeableAttribute 데이터 바인딩된 컨트롤에 적용 됩니다 및 false 에 전달 되는 ThemeableAttribute 생성자를 나타내는 DataSourceID 멤버 적용 된 테마를 사용할 수 없습니다. (전달 false 생성자 결과는 ThemeableAttribute 해당 하는 인스턴스는 No 필드입니다.)

namespace Samples.AspNet.CS.Controls {
    using System;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    public class SomeDataBoundControl : DataBoundControl
    {
        // Implementation of a custom data source control.
        
        [Themeable(false) ]
        [IDReferenceProperty()]
        public override string DataSourceID {
            get {
                return base.DataSourceID;
            }
            set {
                base.DataSourceID = value;
            }
        }
    }
}
Imports System.Web.UI
Imports System.Web.UI.WebControls

Public Class SomeDataBoundControl
    Inherits DataBoundControl

    ' Implementation of a custom data source control.
    
    <Themeable(False)> _
    <IDReferenceProperty()>  _
    Public Overrides Property DataSourceID() As String 
        Get
            Return MyBase.DataSourceID
        End Get
        Set
            MyBase.DataSourceID = value
        End Set
    End Property
    
End Class

설명

전달 true 이 생성자를 사용 하는 Yes 필드에 전달 하는 동안 false 사용 하는 No 필드입니다.

적용 대상