The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
[UWP] How to enable full screen button in the title bar? RRS feed

  • Question

  •    I see there are applications in the store having full screen button in the title bar. Kindle, for example.

        That button looks like it is a part of the title bar, not like created as part of a custom title bar. SystemOverlayRightInset property of the CoreApplicationViewTitleBar object usually having value larger than the width of the three button (minimize, maximize and close) and as a result there is a gap between the three buttons and the rest of the custom title bar. So, how do they do it (Kindle, for example)? How do they enable the full screen button in the title bar?


    Alex

    Friday, April 22, 2016 11:45 PM

Answers

  •     Yes. I understand that. I saw it in the documentation. I'm talking about the full screen button and automatic handling of it by the framework (OS). If it is not possible to enable that button why there is an extra space between the three buttons and the custom title bar? I'm talking about  SystemOverlayRightInset property which leaves extra space the width of which is exactly the width of that button.

    Alex


    Hi Alex,

    As Praveen KP mentioned, this button only exists for Windows 8/8.1 app running on Windows 10, there is no documented API to allow normal developers to enable this "special" button in UWP app. Unless we customize the Title bar and append a button to implement full-screen function


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, April 26, 2016 6:35 AM

All replies

  • All apps that were originally written for Windows 8 or Windows 8.1 will get this system rendered button. Kindle is not yet updated to UWP.
    Saturday, April 23, 2016 7:40 PM
  •    Does it mean that this feature, this full screen button was removed from the universal app API?

    Alex

    Sunday, April 24, 2016 4:25 AM
  • Hi,

    >>   Does it mean that this feature, this full screen button was removed from the universal app API?

    In UWP you can request app the enter the full screen using ApplicationView.TryEnterFullScreenMode also if you want to start app in fullscreen from the start you can use ApplicationView.PreferredLaunchWindowingMode and set it to FullScreen. 

    If you want the fullscreen button in titlebar you can draw custom XAML controls in the title bar also in UWP.

    Please see: Title bar sample


    Thanks MSDN Community Support Please remember to Mark as Answer the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, April 25, 2016 5:19 AM
  •     Yes. I understand that. I saw it in the documentation. I'm talking about the full screen button and automatic handling of it by the framework (OS). If it is not possible to enable that button why there is an extra space between the three buttons and the custom title bar? I'm talking about  SystemOverlayRightInset property which leaves extra space the width of which is exactly the width of that button.

    Alex

    Tuesday, April 26, 2016 5:18 AM
  • Hi Alex,

    I am trying to involve someone with more knowledge regarding this issue. 


    Thanks MSDN Community Support Please remember to Mark as Answer the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, April 26, 2016 5:55 AM
  •     Yes. I understand that. I saw it in the documentation. I'm talking about the full screen button and automatic handling of it by the framework (OS). If it is not possible to enable that button why there is an extra space between the three buttons and the custom title bar? I'm talking about  SystemOverlayRightInset property which leaves extra space the width of which is exactly the width of that button.

    Alex


    Hi Alex,

    As Praveen KP mentioned, this button only exists for Windows 8/8.1 app running on Windows 10, there is no documented API to allow normal developers to enable this "special" button in UWP app. Unless we customize the Title bar and append a button to implement full-screen function


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, April 26, 2016 6:35 AM
  •    All right, the last clarifying question in this case.

       If I take SystemOverlayRightInset, then divide it by 4 and then use not the SystemOverlayRightInset directly but (SystemOverlayRightInset - (SystemOverlayRightInset / 4)) as the right margin for the custom tool bar, will I run into a situation when something covers my custom tool bar? In other word, like I said before SystemOverlayRightInset takes into account 4 buttons not just 3 (minimize, maximize and close) and I would like to avoid having a gap between those 3 buttons and my button. To avoid it I have to use (SystemOverlayRightInset - (SystemOverlayRightInset / 4)) as the right margin.


    Alex

    Wednesday, April 27, 2016 4:15 AM
  • I wouldn't think you will receive any click events if you use margin less than SystemOverlayRightInset. This value marks the area that is completely managed by the OS and is not available to the app.
    Wednesday, April 27, 2016 10:11 PM