Επεξεργασία

Κοινή χρήση μέσω


ConnectionsZone.OnDisplayModeChanged Method

Definition

Raises the DisplayModeChanged event.

protected:
 override void OnDisplayModeChanged(System::Object ^ sender, System::Web::UI::WebControls::WebParts::WebPartDisplayModeEventArgs ^ e);
protected override void OnDisplayModeChanged (object sender, System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs e);
override this.OnDisplayModeChanged : obj * System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs -> unit
Protected Overrides Sub OnDisplayModeChanged (sender As Object, e As WebPartDisplayModeEventArgs)

Parameters

sender
Object

The sender of the event.

e
WebPartDisplayModeEventArgs

A WebPartDisplayModeEventArgs that contains the event data.

Remarks

This method raises the DisplayModeChanged event and provides a custom handler for it. After a Web page enters or exits the connect display mode, this method carries out several steps unique to the ConnectionsZone control. The method cancels any connection activity that is pending at this point, ensures that no child controls from the connection user interface (UI) are displayed by setting the ChildControlsCreated property to false, and sets the connection UI to a mode in which it can display information about existing connections, if a user proceeds with the process of creating a connection.

To add specialized handling to the handling provided in the OnDisplayModeChanged method, developers can inherit from the ConnectionsZone class and override this method. As an alternative, developers can also provide a handler for the DisplayModeChanged event on the WebPartManager control by adding an OnDisplayModeChanged attribute to the <asp:webpartmanager> element in a Web page, and assigning to it the value of a custom method to handle the event. In this method, developers can check the current value of the DisplayMode property, and if it is ConnectDisplayMode, they can carry out the desired changes to the ConnectionsZone control.

Applies to

See also