4 Answers, 1 is accepted
Thank you for your question. You can edit the UI elements from the designer and change the FillPrimitive back-color and BorderPrimitive fore-color of the GroupBoxContent to transparent. After that you will see your picture. Feel free to ask if you have additional questions.
the Telerik team
I have a similar issue but I can't really use the suggested solution. The problem with the suggested solution is that it would only work in a single and the most simple case. If every single groupbox in the entire application shared the same background color as every control is was contained in, then it would work - otherwise it would break the theming.
In my case the group boxes do not share the same background color as their parent. This means, changing the theming to have transparent backgrounds would break the theme for the entire application, except the one with the background image. Even then, what of the scenario of switching themes at runtime - the image won't switch unless it uses transparency, but that would show the parents color through to the groupbox.
Oddly having a color in the theme and a background image on the control hides the image, but having a color set as the background color on the control and an image doesn't hide the image. This means the Z-order handling of the theme is above the internal rendering of all control properties - unfortunate in this case.
I would just override the theme and set the background specifically for this one case, but unfortunately the theme background rendering and the base control background rendering methods don't match - the theme uses a transparency above the top border up to the height of the Header text, but the internal control background rendering doesn't. This means coloring with and without the theme gives a different look to the groupbox. Since there are other groupboxes on the same screen the difference is very apparent and not professional looking at all. Again it is unfortunate the theme rendering method and the control rendering are not the same. I would have thought the theme should just be an override to the internal control properties, not a entirely new way to rendering the control.
Is there something simple I'm missing here - is there another way to achieve the result I need. I need a groupbox, that has a background color matching the theme and matching the theme rendering method but still shows a background image, which in turn could contain transparency.
I appreciate any suggestions you may have.
Thank you for writing.
If I understand you correctly, you want to add an image to the content area of the RadGroupBox. If it is true, you have to add an ImagePrimitive to this area. In addition, if you use this code for more than one RadGroupBox instance, it would be better to inherit the RadGroupBox and add this image in its constructor.
If this does not help you, please make a screenshot that demonstrates your idea. This will help us to provide you with further assistance.
All the best,
the Telerik team
Thanks for the response. Sorry for the delay but other, more pressing issues took precedence last week.
Your solution works and is sufficient to solve my issue for now. I can maintain the theme and overlay the image as you suggested and get the image I require.