HtmlControlDesigner.OnBehaviorDetaching 方法

定义

警告

此 API 现已过时。

当某个行为与该元素取消关联时被调用。Called when a behavior disassociates from the element.

protected:
 virtual void OnBehaviorDetaching();
protected virtual void OnBehaviorDetaching ();
[System.Obsolete("The recommended alternative is ControlDesigner.Tag. http://go.microsoft.com/fwlink/?linkid=14202")]
protected virtual void OnBehaviorDetaching ();
abstract member OnBehaviorDetaching : unit -> unit
override this.OnBehaviorDetaching : unit -> unit
Protected Overridable Sub OnBehaviorDetaching ()
属性

注解

备注

OnBehaviorDetaching 方法已过时。The OnBehaviorDetaching method is obsolete. 使用 Tag 属性的 SetAttributeGetAttribute 方法可将属性映射到样式。Use the SetAttribute and GetAttribute methods on the Tag property to map properties to styles. 使用 ContainerControlDesigner 类的 GetDesignTimeCssAttributes 方法可在设计时设置控件的样式。Use the GetDesignTimeCssAttributes method on the ContainerControlDesigner class to set styles for the control at design time. 重写控件设计器的 Dispose 方法,以便在发布设计器对象之前执行操作。Override the Dispose method for the control designer to perform actions before the designer object is released.

继承者说明

在从设计器分离行为时,可以重写和实现 M:System.Web.UI.Design.HtmlControlDesigner.OnBehaviorDetaching 方法,以执行附加处理。The M:System.Web.UI.Design.HtmlControlDesigner.OnBehaviorDetaching method can be overridden and implemented to perform additional processing when a behavior is detached from the designer.

适用于

另请参阅