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

Question: can individual WinUI controls be used? #3171

Closed
StefanKoell opened this issue Aug 20, 2020 · 5 comments
Closed

Question: can individual WinUI controls be used? #3171

StefanKoell opened this issue Aug 20, 2020 · 5 comments

Comments

@StefanKoell
Copy link

As requested here: #2867

Will there be a way to pull in individual WinUI controls without applying the style to the whole application? the reason I ask this is, that I am also dependent on 3rd party UI controls (e.g. docking library) and applying styles on a global scope would mess with their styles.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Aug 20, 2020
@ranjeshj
Copy link
Contributor

We link the styles by adding XamlControlsThemeResources in app.xaml. You could not add that to your app resources and instead choose the specific styles you want to use. You can pick the styles from the repo or from the generic.xaml file in the NuGet package. would that work ? @jevansaks or @MikeHillberg might have some ideas.

@ranjeshj ranjeshj removed the needs-triage Issue needs to be triaged by the area owners label Aug 21, 2020
@StefanKoell
Copy link
Author

Would I be able to pick those styles and use it in a control only (where I host the WinUI component)? If so, I guess that would work then.

@Felix-Dev
Copy link
Contributor

@StefanKoell You shoud be able to. You can put the styles you want to use in the resource dictionary of the control which delimits the scope where you want to have these styles applied. That way, the styles won't be applied to controls outside of the scope of the enclosing control.

@StefanKoell
Copy link
Author

That sounds great. I then only hope that there's proper documentation on how to do that (which styles to include).

Thanks!

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants