Hi,
I am not sure if this question reveals my lack of understanding during my still early foray into WPF, but I am puzzled by a behavior I am seeing using Implicit Themes.
I have a window with various textboxes and comboboxes. I need to have some modal dialogs, so have implemented buttons that raise a custom popup window using Prism's interaction request. When I display the popup and close it, ALL the Comboboxes, but none of the textboxes suddenly have their BorderBrush overridden with the focus color. This does not occur if I use a Dialog Service and call the Windows MessageBox. When I look at the properties in the Visual Tree Viewer, I can see that the brush has been overridden, but I cannot figure out by what or why.
There is nothing unique about the popup and it does not even have a ViewModel (yet).
I tried setting the style explictly on one ComboBox to see if that would help, but it does not. Are there any ideas out there to point me in the right direction to look??
Thanks..
Carl
Hello Carl,
I have been investigating into the behavior that you are referring to, and I believe that in order to completely understand this behavior, we will need more information from your end. Please provide some information regarding the following:
1. Are you using any Infragistics-specific themes, or do you have your own styling that you are referring to as “theming”?
2. Are there multiple styles that are applied in your application for the same type of control? I ask this, as WPF only keeps a single local style per control and if you have conflicting style resources, I could see that this could potentially cause issues. The fact that you have tried explicitly defining a style and this issue still happens is strange, though.
3. Do you have an isolated sample project that you could provide that reproduces this behavior? This would be the best option for me to be able to explain what is happening in this case.
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
Thanks for the quick response. In regards to your questions:
1. I am using the Infragistics Royal Dark Theme with just a few custom styles to handle coloring for validation on TextBoxes. I am doing this with Implicit Styles in my Shell module. I have two Prism modules at the moment.
2. At the moment, I do not have any other styles applied to ComboBoxes (that I can find, and at least none of my making). I cannot figure out what is overriding the border brush after the return from the Interactivity Request, or I would probably be able to fix it. it is definitely odd that it changes for ALL comboboxes and does not revert to the specific style.
3. Supplying a ample project will take some doing as I left the modal dialog requirement until the end, so my project has several other projects including an Infrastructure project. I am away until next Tuesday, so I may not be able to do this until next week. But that would be a useful tool even for me to dissect this.
Thanks,
Thank you for your update and for confirming that you are actually using an Infragistics theme – specifically the Royal Dark theme.
I have very little experience with these “interactivity request” pieces of the Prism framework, and so I really cannot say why it would revert a specific style in this case. As you have mentioned that you should be able to create a sample project next week, I will continue to monitor this forum while I await that update from your end.
I was trying to use Live Visual Tree in Visual Studio one last time when I realized the problem was not just related to Interactivity Requests. It was also occurring when switching between Live Visual Tree and the particular View. I ended up changing all the Comboboxes to XamCombo Editors and the problem appears to be resolved. I am not sure where the difference lies relative to the Styles.
In any case, I will consider this issue closed...