-
Notifications
You must be signed in to change notification settings - Fork 405
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
[BUG] StatusBarBehavior StatusBarColor DynamicResource binding not working #1056
Comments
Out of curiosity, who would own the dynamic resource binding, the page or the behavior itself? Just to get a hint at where to begin looking/debugging this. Could the issue I am experiencing be a core issue in MAUI related to bindings, behaviors and/or dynamic resources (there are issues reported related to DynamicResource in .NET 7 MAUI that people claim works in .NET 6)? I did a test where I copied the This resulted in the expected behavior, but also negated the purpose of using The method Thus back to my original question and some more:
If I put a breakpoint inside the |
@Cybrosys the Behaviors, since XF, don't inherit the BindingContext of the AssociatedObject, so if you don't set that manually, the BindingContext will be null. |
I have tried assigning a |
@Cybrosys I've no clue if Behaviors do support DynamicResources... I would say they should, but I'm not sure. Maybe you can rise this question on Maui's repo. |
Started a discussion in the main MAUI repo: |
In .NET MAUI, For a class to support Closing because this is not a bug specific to the .NET MAUI Community Toolkit. |
Thank you for the information @brminnick. I would however like to mention that it does work with
But, as you said, it is not an issue with MCT but rather with MAUI.
I would argue that you should be able to use |
@Cybrosys I agree that would be a great addition, please open an issue on .NET MAUI repo asking for it |
|
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
I am trying to bind the
StatusBarColor
ofStatusBarBehavior
using aDynamicResource
-binding, to support theming:This results in the StatusBarColor being white/transparent instead of the Tertiary color.
Using a
StaticResource
-binding works as expected.I have only tested this on Android but @brminnick was able to reproduce it on iOS.
Expected Behavior
The status bar color should reflect the color referenced by the
DynamicResource
-binding.Steps To Reproduce
Link to public reproduction project repository
https://github.com/Cybrosys/Sandbox/tree/master/MauiAppStatusBarColorDynamicResource
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: