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

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

HyperLinkDataBindingHandler.DataBindControl メソッド

指定したコントロールデザイン時のデータ バインディング解決します

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

Public Overrides Sub DataBindControl
 ( _
    designerHost As IDesignerHost, _
    control As Control _
)
Dim instance As HyperLinkDataBindingHandler
Dim designerHost As IDesignerHost
Dim control As Control

instance.DataBindControl(designerHost, control)
public override void DataBindControl (
    IDesignerHost designerHost,
    Control control
)
public:
virtual void DataBindControl (
    IDesignerHost^ designerHost, 
    Control^ control
) override
public void DataBindControl (
    IDesignerHost designerHost, 
    Control control
)
public override function DataBindControl (
    designerHost : IDesignerHost, 
    control : Control
)

パラメータ

designerHost

コントロール含んでいるドキュメントの IDesignerHost。

control

データ連結する Control

解説解説
使用例使用例

HyperLinkDataBindingHandler クラスから派生する CustomHyperLinkDataBindingHandler という名前のクラス作成するコードの例次に示します。このコードは、CustomHyperLink クラスの ImageUrl プロパティデザイン時のデータ連結解決します。これにより、このクラスデザイン時にデータ連結され場合にこのプロパティのプレースホルダ テキスト表示されます。

' Derive a class from the HyperLinkDataBindingHandler. It will 
' resolve  data binding for the CustomHyperlink at design time.
Public Class CustomHyperLinkDataBindingHandler
    Inherits HyperLinkDataBindingHandler

    ' Override the DataBindControl to set property values in  
    ' the DataBindingCollection at design time.
    Public Overrides Sub
 DataBindControl( _
        ByVal designerHost As IDesignerHost,
 ByVal control As Control)

        Dim bindings As DataBindingCollection
 = _
            CType(control, IDataBindingsAccessor).DataBindings
        Dim imageBinding As DataBinding = bindings("ImageUrl")

        If Not (imageBinding Is
 Nothing) Then
            Dim hLink As CustomHyperLink =
 CType(control, CustomHyperLink)
            hLink.ImageUrl = "Image URL."
        End If

        MyBase.DataBindControl(designerHost, control)
    End Sub ' DataBindControl
End Class ' CustomHyperLinkDataBindingHandler
// Derive a class from the HyperLinkDataBindingHandler. It will 
// resolve  data binding for the CustomHyperlink at design time.
public class CustomHyperLinkDataBindingHandler
 : 
    HyperLinkDataBindingHandler
{
    // Override the DataBindControl to set property values in  
    // the DataBindingCollection at design time.
    public override void DataBindControl(IDesignerHost
 designerHost, 
        Control control)
    {
        DataBindingCollection bindings = 
            ((IDataBindingsAccessor)control).DataBindings;
        DataBinding imageBinding = bindings["ImageUrl"];

           // If Text is empty, supply a default value.
        if (!(imageBinding == null))
        {
            CustomHyperLink hype = (CustomHyperLink)control;
            hype.ImageUrl = "Image URL.";
        }

        // Call the base method to bind the control.
        base.DataBindControl(designerHost, control);
    } // DataBindControl
} // CustomHyperLinkDataBindingHandler
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HyperLinkDataBindingHandler クラス
HyperLinkDataBindingHandler メンバ
System.Web.UI.Design 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からHyperLinkDataBindingHandler.DataBindControl メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からHyperLinkDataBindingHandler.DataBindControl メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からHyperLinkDataBindingHandler.DataBindControl メソッド を検索

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS