Share via


ModuleListPage.OnSetView Method

Definition

When overridden in a derived class, updates the view.

protected:
 virtual void OnSetView();
protected virtual void OnSetView ();
abstract member OnSetView : unit -> unit
override this.OnSetView : unit -> unit
Protected Overridable Sub OnSetView ()

Examples

The following example updates the page descriptions when the view mode is Details.

protected override void OnSetView() {

    bool updateDescription = false;

    View currentView = ListView.View;

    if ((_lastListViewView == View.Details &&
        currentView != View.Details) ||
        currentView == View.Details) {
        updateDescription = true;
    }

    if (updateDescription){
        UpdateDescriptions(ListView.View);
        Sort(_keyHeader, this.SortOrder);
        }

    _lastListViewView = currentView;
}

Remarks

The base class does nothing.

Applies to