WebPartManager.SelectedWebPartChanged 事件

定义

在对一个 WebPart 控件的选择已经发生更改并被移动到网页上的另一个控件之后发生。Occurs after the selection of one WebPart control has changed and moved to another control on a Web page.

public:
 event System::Web::UI::WebControls::WebParts::WebPartEventHandler ^ SelectedWebPartChanged;
public event System.Web.UI.WebControls.WebParts.WebPartEventHandler SelectedWebPartChanged;
member this.SelectedWebPartChanged : System.Web.UI.WebControls.WebParts.WebPartEventHandler 
Public Custom Event SelectedWebPartChanged As WebPartEventHandler 

事件类型

WebPartEventHandler

注解

此事件可与方法结合使用 OnSelectedWebPartChanged ,以更改所选控件 (UI) 的用户界面。This event can be used in conjunction with the OnSelectedWebPartChanged method to change the user interface (UI) of a selected control. 例如,如果用户将页面切换到设计模式 (DesignDisplayMode) ,然后选择一个控件,并 WebPart 将其拖动到新位置,则通常更改所选控件的呈现方式(例如,通过更改选定控件的边框或背景的颜色)。For example, if the user switches the page to design mode (DesignDisplayMode), and then selects a WebPart control with the intent of dragging it to a new position, it is common to change the rendering of the selected control, for example by changing the color of its border or background while it is selected.

备注

有关使用事件的详细信息,请参阅 如何:在 Web 窗体应用程序中使用事件For more information on consuming events, see How to: Consume Events in a Web Forms Application.

适用于

另请参阅