⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wroxbuttonconverter.vb

📁 ASP.NET服务器控件高级编程电子书
💻 VB
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -