RadComboBox inside RadExpander

2 posts, 0 answers
  1. Srinivas
    Srinivas avatar
    48 posts
    Member since:
    May 2009

    Posted 03 Jun 2009 Link to this post


    I am trying to include RadComboBox inside RadExpander but I am getting "The property 'Content' is set more than once" error message. Below is the code, can you please help me?



    telerikCommon:RadExpander Grid.Row="1" Grid.Column="0">






    <TextBlock x:Name="SelectCompany" Text="Select Company" Visibility="Visible" />









    <telerikCommon:RadWrapPanel x:Name="SelectCompanyPanel" IsAnimated="True" 
    ="333"  Orientation="Horizontal"/>



    <telerikInput:RadComboBox x:Name="CompanyComboBox" Width="200" Margin="4" Height="40" >












    <TextBlock Text="{Binding Company}" />



    <StackPanel Orientation="Horizontal">



    <TextBlock Text="{Binding CompanyName}" />























    I was able to include RadTreeView without any issue but not combo box. Please help me at the earliest possible.


  2. Kaloyan
    Kaloyan avatar
    920 posts

    Posted 04 Jun 2009 Link to this post

    Hello Srinivas,

    You have to place the RadComboBox inside the RadWrapPanel or remove the RadWrapPanel. The prbolem here is that you are putting two controls as a content of the RadExpander which is not possible. Check the code snippet below with the correct solution:

    <Grid x:Name="LayoutRoot"
            <telerikControls:RadExpander Grid.Row="1" Grid.Column="0"
                    <TextBlock x:Name="SelectCompany" Text="Select Company" Visibility="Visible" /> 
                    <telerikControls:RadWrapPanel x:Name="SelectCompanyPanel" IsAnimated="True" 
                            AnimationDuration="333" Orientation="Horizontal"
                        <telerikInput:RadComboBox x:Name="CompanyComboBox" Width="200" Margin="4" 
                                        <TextBlock Text="{Binding Company}" /> 
                                        <StackPanel Orientation="Horizontal"
                                            <TextBlock Text="{Binding CompanyName}" /> 

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
Back to Top