ToolboxBrowsableAttribute 생성자
ToolboxBrowsableAttribute 클래스의 새 인스턴스를 초기화합니다.
네임스페이스: Microsoft.Windows.Design
어셈블리: Microsoft.Windows.Design.Interaction(Microsoft.Windows.Design.Interaction.dll)
구문
‘선언
Public Sub New ( _
browsable As Boolean _
)
public ToolboxBrowsableAttribute(
bool browsable
)
public:
ToolboxBrowsableAttribute(
bool browsable
)
new :
browsable:bool -> ToolboxBrowsableAttribute
public function ToolboxBrowsableAttribute(
browsable : boolean
)
매개 변수
- browsable
형식: System.Boolean
도구 상자 브라우저에 컨트롤을 표시하려면 true이고, 그렇지 않으면 false입니다.
예제
다음 코드 예제에서는 ToolboxBrowsableAttribute를 사용하여 디자이너의 도구 상자 브라우저에 사용자 지정 컨트롤을 표시하는 방법을 보여 줍니다.
' Container for any general design-time metadata to initialize.
' Designers look for a type in the design-time assembly that
' implements IProvideAttributeTable. If found, designers instantiate
' this class and access its AttributeTable property automatically.
Friend Class Metadata
Implements IProvideAttributeTable
' Accessed by the designer to register any design-time metadata.
Public ReadOnly Property AttributeTable() As AttributeTable _
Implements IProvideAttributeTable.AttributeTable
Get
Dim builder As New AttributeTableBuilder()
builder.AddCustomAttributes( _
GetType(ButtonWithDesignTime), _
New ToolboxBrowsableAttribute(True))
Return builder.CreateTable()
End Get
End Property
End Class
// Container for any general design-time metadata to initialize.
// Designers look for a type in the design-time assembly that
// implements IProvideAttributeTable. If found, designers instantiate
// this class and access its AttributeTable property automatically.
internal class Metadata : IProvideAttributeTable
{
// Accessed by the designer to register any design-time metadata.
public AttributeTable AttributeTable
{
get
{
AttributeTableBuilder builder = new AttributeTableBuilder();
builder.AddCustomAttributes(
typeof(ButtonWithDesignTime),
new ToolboxBrowsableAttribute(true));
return builder.CreateTable();
}
}
}
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.
참고 항목
참조
Microsoft.Windows.Design 네임스페이스