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

ThemeService Documentation outdated? #19077

Open
DevTKSS opened this issue Dec 14, 2024 · 2 comments · May be fixed by unoplatform/uno.extensions#2645
Open

ThemeService Documentation outdated? #19077

DevTKSS opened this issue Dec 14, 2024 · 2 comments · May be fixed by unoplatform/uno.extensions#2645
Assignees
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/documentation triage/untriaged Indicates an issue requires triaging or verification

Comments

@DevTKSS
Copy link
Contributor

DevTKSS commented Dec 14, 2024

On which page?

https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/ThemeService/HowTo-UseThemeService.html

What's wrong?

Normally when we add Features at the project creation, in this case ThemeService, its implemented already in the app.xaml.cs file, and we find the host config already existing. Seems to not be the case for UseThemeSwitching?
Screenshot 2024-12-14 152637
Screenshot 2024-12-14 152758
See the unchanged features in the csproj and the setup of the host config (also not changed!)
But somehow I did have the .GetThemeService() on the Pages this.GetThemeService().SetThemeAsync(AppTheme.Dark); Maybe you could check if that config is missing in template or not longer needed which would be a explaination for its not added from the wizard?

Any feedback?

Maybe you could add the way you call this task also to the documentation page, like if you do it with command via command extensions (toggleSwitch is not having Command by default) that could also add some improvement and help understand usage of this extension for controls which are not having this in a kind of usecase :)

@DevTKSS DevTKSS added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/documentation triage/untriaged Indicates an issue requires triaging or verification labels Dec 14, 2024
@morning4coffe-dev morning4coffe-dev self-assigned this Dec 16, 2024
@morning4coffe-dev
Copy link
Member

morning4coffe-dev commented Dec 17, 2024

@DevTKSS Thank you for reporting this issue! I have managed to confirm this behavior, I have created a new project and tried just "Consume ThemeService" and it works 🤔 I will try to get more details and adjust the docs.

@DevTKSS
Copy link
Contributor Author

DevTKSS commented Dec 18, 2024

Correct i also got theme service add-able in e.g. pages codebehind without adding the thing in app.xaml.cs file. To the fact of "ToggleSwitch" is not able to bind command to do the theme service toggle task written down there, I would prefer to rename the task for reducing the risk of newbes do not see this and try while ToggleSwitch is not supported for commands like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/documentation triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants