RadTabcontrol dataTemplate

2 posts, 0 answers
  1. Bhavin
    Bhavin avatar
    24 posts
    Member since:
    Jun 2005

    Posted 24 Oct 2009 Link to this post

    I have RadTabcontrol and whenever user click on New button I want to add new tab containing usercontrol everytime.I have successfully achieved this at run time but due to some Performance issue I want to achieve this in xaml
    I tried:
     <Setter Property="telerikNavigation:RadTabControl.ItemContainerStyle">
                                                <Style TargetType="telerikNavigation:RadTabItem">
                                                    <Setter Property="Foreground" Value="Black"/>
                                                    <Setter Property="FontFamily" Value="Tahoma"/>
                                                    <Setter Property="BorderThickness" Value="0"/>
                                                    <Setter Property="BorderBrush" Value="Transparent"/>
                                                    <!--<Setter Property="Content" >
                                                            <ctrl:ctrlReview  x:Name="Uctrl" REVKEY="{Binding Source={StaticResource RevKeyProvider}}">

    while setting value for property content,It giving me error:Cannot add content of type 'SafetyAuditUserControl.ctrlReview' to an object of type 'System.Object'.

    Please help

  2. Bobi
    Bobi avatar
    513 posts

    Posted 30 Oct 2009 Link to this post

    Hello bhavin patel,

    We deeply apologize for the late reply.
    If you want to add new tab from a button cliek event then we would recommend you to use code behind for the purpose you want to achieve.
    Can you please explain in more details what did you mean by "Performance issue"?
    Can you please send us some sample code or explain in more details what are you trying to achieve, we need to know this information in order to be able to help you?

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top