Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow using WinUI 3 Controls #342

Merged
merged 3 commits into from
Oct 29, 2021

Conversation

NickGerleman
Copy link
Contributor

WinUI 3 controls are in a separate namespace than system XAML. react-native-windows exports headers making it easier to target both, with the right control resolved based on user settings.

This changes includes of System XAML to the aliased versions instead. It conditionally removes references to versioned System XAML interfaces as well.

Mirrors the following patch in the RNW repo: https://github.com/microsoft/react-native-windows/blob/main/patches/%40react-native-picker%2Bpicker%2B2.1.0.patch

WinUI 3 controls are in a separate namespace than system XAML. `react-native-windows` exports headers making it easier to target both, with the right control resolved based on user settings.

This changes includes of System XAML to the aliased versions instead. It conditionally removes references to versioned System XAML interfaces as well.

Mirrors the following patch in the RNW repo: https://github.com/microsoft/react-native-windows/blob/main/patches/%40react-native-picker%2Bpicker%2B2.1.0.patch
@NickGerleman NickGerleman changed the title Allow using WinUI 3 Controls feat: Allow using WinUI 3 Controls Oct 25, 2021
Copy link

@asklar asklar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gets us closer but I think this won't quite work e2e without including experimentalFeatures from the app (someone needs to set USE_WINUI3 for the module project based on the app's choice)

@NickGerleman
Copy link
Contributor Author

The template library includes ExperimentalFeatures.props for us IIRC.

This patch is what we're using in the repo right now for WinUI 3 Playground.

@NickGerleman
Copy link
Contributor Author

Hmm, I don't see it being imported in the project. I will add the reference, as it is in the 0.65 template.

Curious how this was resolving to WINUI 3 in the RNW repo 🤨.

@NickGerleman
Copy link
Contributor Author

@asklar @Naturalclar could you take another look?

@asklar
Copy link

asklar commented Oct 28, 2021

lgtm

Copy link
Contributor

@Naturalclar Naturalclar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Naturalclar Naturalclar merged commit ea17798 into react-native-picker:master Oct 29, 2021
github-actions bot pushed a commit that referenced this pull request Nov 4, 2021
# [2.2.0](v2.1.0...v2.2.0) (2021-11-04)

### Features

* Allow using WinUI 3 Controls ([#342](#342)) ([ea17798](ea17798))
* numberOfLines prop on iOS ([#291](#291)) ([3fdddb6](3fdddb6))
@Naturalclar
Copy link
Contributor

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants