Repository navigation
Conversation
| > [!NOTE] | ||
| > In case, you try to bind a `CommandExtension.Command` to a ToggleSwitch, you will need to use the `IsOn` property to bind it, because `Toggled` Behaviour is not triggering the `CommandExtensions.Command`. |
There was a problem hiding this comment.
For this part, I think we should add this functionality to the CommandExtensions. Issue created here: unoplatform/uno.toolkit.ui#1391
We don't need to call this out here so I think we can remove this NOTE
There was a problem hiding this comment.
@kazo0 does removing this note mean, to also remove the IsOn Property Binding? I could consider a way that might be a usecase for BindBack but I honestly do not know how to use that correctly same as the FallbackValue or TargetNullValue (e.g. considered this for workaround the roslyn issue.
There was a problem hiding this comment.
removed note in b55486c Replaced as comment to be applyed after fixing this issues
| } | ||
| ``` | ||
|
|
||
| ### [MVUX](#tab/mvux) |
There was a problem hiding this comment.
My suggestion here is that we don't include this as part of the ThemeService docs but we should create a Recipe Book docs entry for this usage in Chefs: https://github.com/unoplatform/uno.chefs/blob/198923fcd69d416fd3901be2fe4d58fecd74421b/Chefs/Presentation/SettingsModel.cs#L26-L38
There was a problem hiding this comment.
that ThemeChangedMessage in there is quite cool and the ISettingsService... Can we not get a SettingsService generally available in extensions? that would really be cool! to have just to call this to automatically switch theme or localization! is this think-able?
There was a problem hiding this comment.
@kazo0 might gone under, but do you have some answer to that asked question?
And I am not sure if I would fully agree to move EVERY How-To use to the Chefs. This doc page here I think would be the basical start point for those who are finding the ThemeService. So as every Uno App does also let us choose, on which base we want to build -> Mvvm OR Mvux , from my opinion, there should also be that basical How to guide thats reflecting this both basic implementations and not only Mvvm! So just given szenario, I am a new Developer not having a deeper knowledge of this differences and only having the mvvm sample here, I did indeed have myself the constant problem, that 80% of the Uno docs giving samples for only Mvvm (except the mvux exclusive docs) but missing mvux. that makes it much more difficult to start and develop with uno when I might not want to learn before the whole mvvm things.
There was a problem hiding this comment.
@kazo0 Might have slipped through the cracks. I am still looking for an answer to this, would you mind...?
There was a problem hiding this comment.
Pull Request Overview
This PR adds MVUX state binding examples to the ThemeService documentation, expanding beyond the existing MVVM examples. The documentation now provides developers with guidance on how to implement theme switching in MVUX applications using state binding patterns.
- Adds MVUX tab section with Model and View examples showing state-based theme binding
- Includes practical code samples for implementing theme switching with IState and ToggleSwitch
- Updates source code link format to use markdown code syntax
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
| } | ||
| ``` | ||
|
|
||
| ### [MVUX](#tab/mvux) |
There was a problem hiding this comment.
@kazo0 might gone under, but do you have some answer to that asked question?
And I am not sure if I would fully agree to move EVERY How-To use to the Chefs. This doc page here I think would be the basical start point for those who are finding the ThemeService. So as every Uno App does also let us choose, on which base we want to build -> Mvvm OR Mvux , from my opinion, there should also be that basical How to guide thats reflecting this both basic implementations and not only Mvvm! So just given szenario, I am a new Developer not having a deeper knowledge of this differences and only having the mvvm sample here, I did indeed have myself the constant problem, that 80% of the Uno docs giving samples for only Mvvm (except the mvux exclusive docs) but missing mvux. that makes it much more difficult to start and develop with uno when I might not want to learn before the whole mvvm things.
| } | ||
| ``` | ||
|
|
||
| ### [MVUX](#tab/mvux) |
There was a problem hiding this comment.
@kazo0 Might have slipped through the cracks. I am still looking for an answer to this, would you mind...?
| ## Source Code | ||
|
|
||
| [ThemeService Implementation](https://github.com/unoplatform/uno.extensions/blob/51c9c1ef14f686363f946588733faecc5a1863ff/src/Uno.Extensions.Core.UI/Toolkit/ThemeService.cs) | ||
| [!code-csharp [ThemeService Implementation](https://github.com/unoplatform/uno.extensions/blob/51c9c1ef14f686363f946588733faecc5a1863ff/src/Uno.Extensions.Core.UI/Toolkit/ThemeService.cs)] |
There was a problem hiding this comment.
Not sure if we can add such label into code-csharp, as the docfx docs are introducing it always with empty brackets after the lang id...
GitHub Issue (If applicable): closes #
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Only Mvvm sample but none for State binding commonly used in MVUX Applications
What is the new behavior?
Added sample to documentation to show how it can be done in a mvux app
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Internal Issue (If applicable):