WebPartManager.OnDisplayModeChanged(WebPartDisplayModeEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Raises the DisplayModeChanged event to indicate that the WebPartManager control has completed the process of switching from one display mode to another on a Web page.
protected:
virtual void OnDisplayModeChanged(System::Web::UI::WebControls::WebParts::WebPartDisplayModeEventArgs ^ e);
protected virtual void OnDisplayModeChanged (System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs e);
abstract member OnDisplayModeChanged : System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs -> unit
override this.OnDisplayModeChanged : System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs -> unit
Protected Overridable Sub OnDisplayModeChanged (e As WebPartDisplayModeEventArgs)
Parameters
A WebPartDisplayModeEventArgs that contains event data associated with a changed display mode.
Remarks
The OnDisplayModeChanged method in its base form simply raises the DisplayModeChanged event.
Notes to Inheritors
You can override the OnDisplayModeChanged(WebPartDisplayModeEventArgs) method. For example, after a change of display mode, you might want to change something in the appearance of the user interface (UI), depending on which display mode is contained in the OldDisplayMode property. Or you might want to hide certain content, or display a certain control.
When you override the method, you should normally call the base method as the last step of the overridden method, so that your custom code runs first, and the event is raised last, indicating that the mode change is complete.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om