protected virtual void SwitchLayout() { if (facadeLayout == null) { return; } // if skin has not implemented layout control or requested layout is not allowed // then default to list layout if (facadeLayout.IsNullLayout(CurrentLayout) || !AllowLayout(CurrentLayout)) { facadeLayout.CurrentLayout = GUIFacadeControl.Layout.List; } else { facadeLayout.CurrentLayout = CurrentLayout; } PresentLayout(); // The layout may be automatically switched via selection of a new view. // Here we need to ensure that the layout menu button reflects the proper state (this is redundant when the // layout button was used to change the layout). Need to call facadeLayout to get the current layout since the // CurrentLayout getter is algorithmic. btnLayouts.SetSelectedItemByValue((int)facadeLayout.CurrentLayout); }
protected virtual void SwitchLayout() { if (facadeLayout == null) { return; } // if skin has not implemented layout control or requested layout is not allowed // then default to list layout if (facadeLayout.IsNullLayout(CurrentLayout) || !AllowLayout(CurrentLayout)) { facadeLayout.CurrentLayout = Layout.List; } else { facadeLayout.CurrentLayout = CurrentLayout; } }