TextDataBindingHandler.DataBindControl(IDesignerHost, Control) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
資料綁定指定的控制項。
public:
override void DataBindControl(System::ComponentModel::Design::IDesignerHost ^ designerHost, System::Web::UI::Control ^ control);
public override void DataBindControl(System.ComponentModel.Design.IDesignerHost designerHost, System.Web.UI.Control control);
override this.DataBindControl : System.ComponentModel.Design.IDesignerHost * System.Web.UI.Control -> unit
Public Overrides Sub DataBindControl (designerHost As IDesignerHost, control As Control)
參數
- designerHost
- IDesignerHost
一個為包含控制項的文件實作 IDesignerHost 的物件。
備註
DataBindControl方法 的方法TextDataBindingHandler將控制項的屬性(若存在)設Text為範例資料字串。
此方法應實作於衍生類別中,以提供自訂資料綁定處理器的功能。 資料綁定的邏輯應在此方法中實作,且可針對處理者綁定屬性的類型來特定。
給繼承者的注意事項
大多數資料綁定處理程序需要檢查使用介面 IDataBindingsAccessor 控制項的資料綁定集合,以判斷是否有特定屬性是資料綁定的。