wroxbuttonconverter.vb
来自「ASP.NET服务器控件高级编程电子书」· VB 代码 · 共 36 行
VB
36 行
Imports System
Imports System.Drawing.Design
Imports System.ComponentModel
Imports System.ComponentModel.Design
Namespace WroxDesignVB.Design
Public Class WroxButtonConverter : Inherits TypeConverter
Public Sub New()
End Sub
Public Overloads Overrides Function GetProperties(ByVal context As ITypeDescriptorContext, _
ByVal value As Object, ByVal attributes As Attribute()) As PropertyDescriptorCollection
'This is the default behavior
' return TypeDescriptor.GetProperties(context.Instance,
' new Attribute, _ new BrowsableAttribute(true) )
'If we are outside the host designer, we are in a custom editor
If (context.Container Is Nothing) Then
Return TypeDescriptor.GetProperties(context.Instance, _
New Attribute() {New ToolBarEditableAttribute()})
End If
'Otherwise, return the solicited members
Return TypeDescriptor.GetProperties(context.Instance, attributes)
End Function
Public Overloads Overrides Function GetPropertiesSupported(ByVal context As ITypeDescriptorContext) As Boolean
Return True
End Function
End Class
End Namespace
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?