RadDropDownButton with ListBox

2 posts, 0 answers
  1. Fabiana
    Fabiana avatar
    69 posts
    Member since:
    Oct 2009

    Posted 26 Aug 2010 Link to this post

    Hi support!

    I created a simple example to try to understand the problem... I have a ListBox and a RadDropDownButton  control, with a ListBox inside.

    I would like to see both ListBox transparent...But ListBox inserted into RadDropDownButton was not transparent, why? Is there some way to do it with RadDropDownButton ?

    Thanks!




    <UserControl
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:System="clr-namespace:System;assembly=mscorlib"
        x:Class="Example_sl.MainPage">
     
        <Grid Height="175" Width="728" Background="#FFE23131">


            <ListBox Height="94" HorizontalAlignment="Left" Margin="491,20,0,0" Name="listBox1" VerticalAlignment="Top" Width="188" UseLayoutRounding="True" BorderThickness="1" Background="#7EFFFFFF">
                <ListBoxItem Content="1111" Height="26">
                 </ListBoxItem>
                <ListBoxItem Content="3333">
                </ListBoxItem>
            </ListBox>
            
            <telerik:RadDropDownButton Content="Actions" VerticalAlignment="Top" HorizontalAlignment="Left">
                
                <telerik:RadDropDownButton.DropDownContent>
                    <ListBox Height="94" HorizontalAlignment="Left"  Name="listBox21" VerticalAlignment="Top" Width="188" UseLayoutRounding="True" BorderThickness="1" Background="#7EFFFFFF">
                        <ListBoxItem Content="1111" Height="26"/>
                        <ListBoxItem Content="3333"/>
                    </ListBox>
                </telerik:RadDropDownButton.DropDownContent>
                
            </telerik:RadDropDownButton>
        </Grid>

    </UserControl>
  2. Viktor Tsvetkov
    Admin
    Viktor Tsvetkov avatar
    382 posts

    Posted 26 Aug 2010 Link to this post

    Hello Fabiana,

    To achieve this transparent behavior you have to edit the style of the RadDropDownButton and to remove the Background property in the DropDownPopup element in the ControlTemplate. You can examine the attached sample project and if you have further questions feel free to ask.

    Best wishes,
    Viktor Tsvetkov
    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
  3. DevCraft banner
Back to Top