本文整理汇总了VB.NET中System.Web.UI.Design.ContainerControlDesigner类的典型用法代码示例。如果您正苦于以下问题:VB.NET ContainerControlDesigner类的具体用法?VB.NET ContainerControlDesigner怎么用?VB.NET ContainerControlDesigner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ContainerControlDesigner类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: ParseChildren
' 导入命名空间
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Collections
Imports System.Drawing
Imports System.Web.UI
Imports System.Web.UI.Design
Imports System.Web.UI.Design.WebControls
Imports System.Web.UI.WebControls
Namespace ControlDesignerSamples.VB
' Define a simple composite control, derived from the
' System.Web.UI.WebControls.CompositeControl class.
<Designer(GetType(SimpleContainerControlDesigner)), _
ParseChildren(False)> _
Public Class SimpleContainerControl
Inherits CompositeControl
End Class
' Define the designer for the simple composite control.
' The designer derives from System.Web.UI.Design.ContainerControlDesigner.
' The designer defines the style and caption for the frame around the
' editable region of the control in the design surface.
Public Class SimpleContainerControlDesigner
Inherits ContainerControlDesigner
Private _style As Style = Nothing
' Define the caption text for the frame in the design surface.
Public Overrides ReadOnly Property FrameCaption() As String
Get
Return "- My simple container control -"
End Get
End Property
' Define the style of the frame around the control in the design surface.
Public Overrides ReadOnly Property FrameStyle() As Style
Get
If _style Is Nothing Then
_style = New Style()
_style.Font.Name = "Verdana"
_style.Font.Size = New FontUnit("XSmall")
_style.BackColor = Color.LavenderBlush
_style.ForeColor = Color.DarkBlue
End If
Return _style
End Get
End Property
End Class
End Namespace