ToolboxBrowsableAttribute Oluşturucu
Yeni bir örneğini başlatır ToolboxBrowsableAttribute sınıfa
Ad alanı: Microsoft.Windows.Design
Derleme: Microsoft.Windows.Design.Interaction (Microsoft.Windows.Design.Interaction.dll içinde)
Sözdizimi
'Bildirim
Public Sub New ( _
browsable As Boolean _
)
public ToolboxBrowsableAttribute(
bool browsable
)
public:
ToolboxBrowsableAttribute(
bool browsable
)
new :
browsable:bool -> ToolboxBrowsableAttribute
public function ToolboxBrowsableAttribute(
browsable : boolean
)
Parametreler
- browsable
Tür: System.Boolean
true Denetim araç kutusu tarayıcısında için görünürlük sağlamak için; Aksi takdirde, false.
Örnekler
Aşağıdaki kod örneği nasıl kullanılacağını gösterir ToolboxBrowsableAttribute bir Tasarımcısı araç tarayıcı özel denetim için görünürlük etkinleştirmek için
' 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 Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. kısmen güvenilir kod tarafından Kitaplıklar kullanma.
Ayrıca bkz.
Başvuru
ToolboxBrowsableAttribute Sınıf
Microsoft.Windows.Design Ad Alanı