本文整理匯總了VB.NET中System.Web.UI.Design.ControlDesigner.SetEditableDesignerRegionContent方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET ControlDesigner.SetEditableDesignerRegionContent方法的具體用法?VB.NET ControlDesigner.SetEditableDesignerRegionContent怎麽用?VB.NET ControlDesigner.SetEditableDesignerRegionContent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Web.UI.Design.ControlDesigner
的用法示例。
在下文中一共展示了ControlDesigner.SetEditableDesignerRegionContent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: SetEditableDesignerRegionContent
' Create a template from the content string and put it
' in the selected view. Called by the designer host?
Public Overrides Sub SetEditableDesignerRegionContent(ByVal region As EditableDesignerRegion, ByVal content As String)
If IsNothing(content) Then
Return
End If
' Get a reference to the designer host
Dim host As IDesignerHost = CType(Component.Site.GetService(GetType(IDesignerHost)), IDesignerHost)
If Not IsNothing(host) Then
' Create a template from the content string
Dim template As ITemplate = ControlParser.ParseTemplate(host, content)
' Determine which region should get the template
If region.Name.EndsWith("0") Then
myControl.View1 = template
ElseIf region.Name.EndsWith("1") Then
myControl.View2 = template
End If
End If
End Sub
開發者ID:VB.NET開發者,項目名稱:System.Web.UI.Design,代碼行數:22,代碼來源:ControlDesigner.SetEditableDesignerRegionContent