ControlDesigner.GetEditableDesignerRegionContent メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ControlDesigner.GetEditableDesignerRegionContent メソッドの意味・解説 

ControlDesigner.GetEditableDesignerRegionContent メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

関連付けられたコントロールデザインビュー編集可能領域内容返します

名前空間: System.Web.UI.Design
アセンブリ: System.Design (system.design.dll 内)
構文構文

Public Overridable Function
 GetEditableDesignerRegionContent ( _
    region As EditableDesignerRegion _
) As String
Dim instance As ControlDesigner
Dim region As EditableDesignerRegion
Dim returnValue As String

returnValue = instance.GetEditableDesignerRegionContent(region)
public virtual string GetEditableDesignerRegionContent
 (
    EditableDesignerRegion region
)
public:
virtual String^ GetEditableDesignerRegionContent (
    EditableDesignerRegion^ region
)
public String GetEditableDesignerRegionContent (
    EditableDesignerRegion region
)
public function GetEditableDesignerRegionContent
 (
    region : EditableDesignerRegion
) : String

パラメータ

region

内容取得対象の EditableDesignerRegion。

戻り値
編集可能な領域コントロール デザイナサポートする場合領域永続化された内容それ以外場合空の文字列 ("")。

解説解説

GetEditableDesignerRegionContent メソッド既定実装では、空の文字列 ("") が返されます。

ControlDesigner クラスから派生したクラスでは、デザイン サーフェイスでの領域ベース編集サポートでき、GetEditableDesignerRegionContent メソッドオーバーライドして指定した領域内容返すことができます

使用例使用例

デザイン ホストへの参照取得し、その参照使用してregion およびその内容HTML マークアップ作成する ControlParser オブジェクト作成する方法コード例次に示します

' Get the content string for the selected region. Called by the designer
 host?
Public Overrides Function
 GetEditableDesignerRegionContent(ByVal region As
 EditableDesignerRegion) As String
    ' Get a reference to the designer host
    Dim host As IDesignerHost = CType(Component.Site.GetService(GetType(IDesignerHost)),
 IDesignerHost)

    If Not IsNothing(host) Then
        Dim template As ITemplate = myControl.View1
        If region.Name = "Content1"
 Then
            template = myControl.View2
        End If

        ' Persist the template in the design host
        If Not IsNothing(template) Then
            Return ControlPersister.PersistTemplate(template,
 host)
        End If
    End If

    Return String.Empty
End Function
// Get the content string for the selected region. Called by the designer
 host?
public override string GetEditableDesignerRegionContent(EditableDesignerRegion
 region) 
{
    // Get a reference to the designer host
    IDesignerHost host = (IDesignerHost)Component.Site.GetService(typeof(IDesignerHost));
    if (host != null)
    {
        ITemplate template = myControl.View1;
        if (region.Name == "Content1")
            template = myControl.View2;

        // Persist the template in the design host
        if (template != null)
            return ControlPersister.PersistTemplate(template,
 host);
    }

    return String.Empty;
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ControlDesigner クラス
ControlDesigner メンバ
System.Web.UI.Design 名前空間
SetEditableDesignerRegionContent
その他の技術情報
Web フォームデザインサポート



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ControlDesigner.GetEditableDesignerRegionContent メソッド」の関連用語

ControlDesigner.GetEditableDesignerRegionContent メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ControlDesigner.GetEditableDesignerRegionContent メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS