-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
DynamicResource not working for inner views #3745
Comments
Just confirming I'm seeing this with Preview 11 as well |
Repro on Version 17.2.0 Preview 2.0 [32216.282.main]. |
I'm wondering if Bindings are working in this situation... |
it looks like ParentGrid is never Parented, probably never gets BindingContext applied, and can't walk the tree for DynamicResources propagations |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Verified this issue still repro on Visual Studio Enterprise 17.6.0 Preview 2.0 with sample project. |
This is still an issue in latest visual studio .net 7 and prevents us switching from darkMode to light mode on some controls . Most of the syncfusion controls do not work in dark mode when using DynamicResource . We do not use appthemebinding but we have multiple resource dictionaries .. LightMode -DarkMode etc.. and we swap them at runtime so DynamicResource is critical for this to work... Any indications if this will be looked at all? Many thanks |
Any update on this? |
I believe that this will be fixed in NET 8 if you use #16046. It should set the Parent and the BindingContext if you use AddLogicalChild. Are you able to test with 8.0 preview 7? |
|
I looked at your repro... It's still net6.0 based, so just checking, even though you've installed net8 and vs 17.8.4, is your project targeting net8.0? The fixes/changes will be available only when targeting net8.0. After I took your repro and put it into a net8.0 project, I could see the issue happening, however what I did was this:
After this, the content shows up as expected here. |
Hi @Redth what about this one as there is quite a bit of interests and is getting no love... |
Hi @MuneeshKumarG. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
Hi @Redth , We have developed a custom control inherited from the entry and have encountered a dynamic resource issue when updating the text color from another class, although it functions correctly with static resources. Please refer to the GitHub link for more details: Issue with the usage of DynamicResource for inner views of a custom control Kindly review the sample provided in the repository linked in the above github link. This is a high-priority issue, and we are urgently seeking either a workaround or a prompt fix. Additionally, a video has been attached for your reference. |
Description
We have created a simple custom control that has multiple inner views. DynamicResource only works for the main custom control view and does not work for inner views.
Find the code for simple custom control implementation. We have implemented IVisualTreeElement also.
Steps to Reproduce
DynamicResourceSample.zip
Version with bug
Preview 10 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 10
Did you find any workaround?
StaticResource working
<local:ViewExt >
local:ViewExt.BackgroundContent
<local:ViewExt BackgroundContent="{StaticResource bg1}"/>
</local:ViewExt.BackgroundContent>
</local:ViewExt>
DynamicResource not working
<local:ViewExt >
local:ViewExt.BackgroundContent
<local:ViewExt BackgroundContent="{DynamicResource bg1}"/>
</local:ViewExt.BackgroundContent>
</local:ViewExt>
Relevant log output
No response
The text was updated successfully, but these errors were encountered: