I can't seem to set the combobox background to transparent

18 posts, 0 answers
  1. Kjell
    Kjell avatar
    276 posts
    Member since:
    Jun 2010

    Posted 05 Aug 2010 Link to this post

    Since upgrading to the latest build (7014), my combo boxes no longer have transparant backgrounds.  I can set background= any color and it works, but transparant just acts as white.  Did something change?

    I noticed this first with comboboxes in a gridview but then tested with a combo box which sits on top of a gray menu bar and that one does the same thing.  I'll do some more testing, i'v been perflexed by this for a few days.

    VS 2010, .NET4, SL4, Windows Server 03, IE8, C#
  2. Kjell
    Kjell avatar
    276 posts
    Member since:
    Jun 2010

    Posted 05 Aug 2010 Link to this post

    I rolled back to my previous build of the telerik tools (Q1 SP2) and now the combo backgrounds work fine again.
  3. DevCraft banner
  4. Pana
    Admin
    Pana avatar
    748 posts

    Posted 06 Aug 2010 Link to this post

    Hello Kjell,

    The RadComboBox had its ControlTemplate changed so it can display well changes in its Background in the new Transparent theme. This causes the issue mentioned by you. Eventually you can edit its template to roll back to the theme to the previous Q1.SP1 and keep the upgrade to the new Q2.

    All the best,
    Panayot
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Kjell
    Kjell avatar
    276 posts
    Member since:
    Jun 2010

    Posted 06 Aug 2010 Link to this post

    So since you say eventually, does that mean that currently it is not possible to give the combo box a transparant background?  I want to use the radbusyindicator so I'll stick with the new build either way but I just want to know.
  6. Pana
    Admin
    Pana avatar
    748 posts

    Posted 09 Aug 2010 Link to this post

    Hi Kjell,

    At the moment you can not set transparent Background on the RadComboBox.

    Regards,
    Panayot
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Kjell
    Kjell avatar
    276 posts
    Member since:
    Jun 2010

    Posted 08 Oct 2010 Link to this post

    Hi, I  noticed this is still an issue in the latest build, when can I expect to see this fixed?  It may seem trivial but in our app it's a noticeable detractor from the look/feel and I am being pressured to resolve it.
  8. Pana
    Admin
    Pana avatar
    748 posts

    Posted 11 Oct 2010 Link to this post

    Hi Kjell,

    We have considered fixing this issue but it will lead to other visual glitches. The MS Silverlight Combobox does not display transparent too so we have decided to keep it the way it is. Can you send me a screenshot of your application so I can think of a workaround?

    Sincerely yours,
    Panayot
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Kjell
    Kjell avatar
    276 posts
    Member since:
    Jun 2010

    Posted 11 Oct 2010 Link to this post

    The main portion of our application is a gridview with about a dozen column with various controls on them, including two comboboxes.  When a row is highlighted all the cells show the highlight color except the two cells with the comboboxes.  This was working a couple builds ago when we could set them to have transparant background.  Please let me know if there is another way to do it or if you want I can email you some screenshots.
  10. Kjell
    Kjell avatar
    276 posts
    Member since:
    Jun 2010

    Posted 11 Oct 2010 Link to this post

    In a related question I have been asked if the highlight color can also extend to the selector column?
  11. Pana
    Admin
    Pana avatar
    748 posts

    Posted 14 Oct 2010 Link to this post

    Hi Kjell,

    Please use the style attached in the project. It should remove the ComboBox's Background.

    Sincerely yours,
    Panayot
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Kjell
    Kjell avatar
    276 posts
    Member since:
    Jun 2010

    Posted 19 Oct 2010 Link to this post

    Thank you, the sample project was very helpful and I now have the combo box looking exactly as I want it to.
  13. Adriaan
    Adriaan avatar
    8 posts
    Member since:
    Jun 2011

    Posted 19 Jul 2011 Link to this post

    I downloaded the Telerik controls because I did not want to have a massive code block to override the MS ComboBox style for a transparent background, only to find that yours does not make it easy anymore either. I am also dissapointed in the way you respond Panayot, just because the MS combobox has the same problem does not mean you can leave your breaking change. I will now look at other control vendors who do not have that attitude.
  14. Pana
    Admin
    Pana avatar
    748 posts

    Posted 22 Jul 2011 Link to this post

    Hello Adriaan,

    Styling the controls is done through XAML - with Styles and Templates. We are constantly trying to provide more intuitive to style, fast to run and easy to use controls. Although in some cases we have to take decisions that may not seem the best for you I can assure you that they are carefully considered. RadComboBox has many advantages over the MS one and I doubt the ability to easily make it transparent is the most important one.

    The controls have three or four common properties that can be set to change their appearance but inside they have many more visual elements. Using the Background, Foreground, BorderBrush, BorderThickness etc. could be used to make a single instance of a control differ from the other but it is really inconvenient to use them to actually style a control. Given the RadComboBox has at least 10 visual states with several gradients in each of them it is absolutely impossible to put a color in one of its Brush properties and achieve the picture you have imagined. You could however set its Background to Red and the RadComboBox will differ from any other RadComboBox with default Background.

    As for the breaking change I am really sorry for the inconvenience but in long term we have to implement new themes and control features so the ControlTemplate is a subject to change. Please note the Telerik team is always ready to give directions and provide styles that could be used to achieve look and feel as close as possible to the previous behavior. Kjell Pinter for example got the RadComboBox exactly as he desired.

    Least but not last did you really used the RadControls for Silverlight because of the RadComboBox being able to get transparent by setting its Background to Transparent? This question is really important to us as nowadays there are quite a lot of control vendors and trying to stay on top client's feedback is greatly appreciated. If the clients are picking rad controls because of their look and are really frustrated by changes in the XAML we could use your opinion now as an argument in future discussions of control and theme development.

    Best wishes,
    Pana
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  15. Michael
    Michael avatar
    41 posts
    Member since:
    Oct 2010

    Posted 26 Jan Link to this post

    Hi,

    This is an old post from 2011.  I am currently using WPF Q1 2016 and I am still not able to set background of the combobox to be transparent.  Was this issue fixed or the only is to use styles as you showed in the attached example?

     

    Regards,

    Michael

  16. Masha
    Admin
    Masha avatar
    355 posts

    Posted 27 Jan Link to this post

    Hello Michael,

    With WPF Q1 2016 you should not experience problem setting RadComboBox background to Transparent. Can you share more information about  RadComboBox you use: Editable or NonEditable? Also,  which theme and which theming mechanism you use in your  application - implicit styles or style manager. Please note in some theme like VisualStudio2013 there are different background colors for Editable and NonEditable RadComboBox, so if you want to set the background color to transparent of Editable RadComboBox you need to modify the TexBoxStyle property of RadComboBox in order the background color to be applied.

    I hope this helps.


    Regards,
    Masha
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  17. Michael
    Michael avatar
    41 posts
    Member since:
    Oct 2010

    Posted 27 Jan in reply to Masha Link to this post

    Hi,

    Here is snippet of my code

    <telerik:GridViewColumn Header="Access Level">
       <telerik:GridViewColumn.CellTemplate>
         <DataTemplate>
           <telerik:RadComboBox 
        ItemsSource="{Binding Source={StaticResource Locator}, Path=DeviceUsers.AccessLevelList, Mode=OneTime}"
    DisplayMemberPath="Name" SelectedValuePath="Value" SelectedValue="{Binding Privilege}"
    BorderBrush="Transparent" Background="Transparent"/>
    </DataTemplate>
    </telerik:GridViewColumn.CellTemplate>
    </telerik:GridViewColumn>

  18. Michael
    Michael avatar
    41 posts
    Member since:
    Oct 2010

    Posted 27 Jan Link to this post

    Sorry, last post got posted before I was finished
    1. I use it inside a radgridviewcolumn.
    2. Theme is Windows7.
    3. If I set background to White or any other color, it works fine.  Just the transparent does not work.
  19. Masha
    Admin
    Masha avatar
    355 posts

    Posted 28 Jan Link to this post

    Hello Michael,

    The background color of RadComboBox in Windows7 comes from the ButtonChrom which is inside its control template. In order to have transparent background using this theme you need to set transparent background color of ButtonChrom. Please check the code snippet below:

    <Style TargetType="telerik:RadComboBox" BasedOn="{StaticResource RadComboBoxStyle}">
        <Style.Resources>
            <Style TargetType="telerikChromes:ButtonChrome" BasedOn="{StaticResource ButtonChromeStyle}">
                <Setter Property="Background" Value="Transparent" />
            </Style>
        </Style.Resources>
    </Style>

    I hope this helps.

    Regards,
    Masha
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner