microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.3k stars 1.14k forks source link

Enable access to TitleBar from inside RNW somehow. #3580

Open namrog84 opened 4 years ago

namrog84 commented 4 years ago

Enable RNW to be able to modify/access/customize the Title Bar somehow.

Examples:

image

image

kmelmon commented 4 years ago

This article has a nice explanation of how this is done in UWP: https://docs.microsoft.com/en-us/windows/uwp/design/shell/title-bar The underlying APIs that enable this aren’t yet exposed in RN4W. This feature request would likely mean creating a native module that wraps the UWP functionality. Some thought would have to go into how to expose it as there are a number of things involved (extending the CoreWindow into the title-bar area is required, and this has implications on the programming model).

chrisglein commented 4 years ago

Seems like a request for a Windows-specific native module. May be able to model similar to the StatusBar module. Certainly the immediate workaround is to just do this in native XAML, although that creates a split in the development model.

Victor0814gui commented 1 year ago

has there been any progress? I managed to find an example of how to do it in C++/winrt and in C#, but I'm still not experienced enough in desktop programming to be able to abstract the code to create a native module.

-the native code repository: https://github.com/microsoft/windows-universal-samples/tree/main/Samples/TitleBar