cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a full screen button in custom control

Former Member
0 Kudos

Hello everyone,

Could you explain how can i switch in fullscreen mode my custom control by clicking on a button ?

I have to create a button like in this page SAPUI5 Explored .

Thanks,

Arthur

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

if (!this._oShell) {

  this._oShell = sap.ui.getCore().byId('Shell');

  }

  var bSwitchToFullScreen = (this._getSplitApp().getMode() === "ShowHideMode");

  if (bSwitchToFullScreen) {

  this._getSplitApp().setMode('HideMode');

  this._oShell.setAppWidthLimited(false);

  } else {

  this._getSplitApp().setMode('ShowHideMode');

  this._oShell.setAppWidthLimited(true);

  }

this is what it does when u click the full screen button

Former Member
0 Kudos

Thanks for your reply, but I think i cant doint it that way because i'm not using SplitApp. Moreover, sap.ui.getCore().byId('Shell') returns undefined..