This is a migrated thread and some comments may be shown as answers.

RadTabcontrol dataTemplate

1 Answer 87 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Bhavin
Top achievements
Rank 1
Bhavin asked on 24 Oct 2009, 09:09 PM
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">
                                        <Setter.Value>
                                            <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" >
                                                    <Setter.Value>
                                                        <ctrl:ctrlReview  x:Name="Uctrl" REVKEY="{Binding Source={StaticResource RevKeyProvider}}">
                                                        </ctrl:ctrlReview>
                                                    </Setter.Value>
                                                 </Setter>-->


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

1 Answer, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 30 Oct 2009, 09:51 AM
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,
Boryana
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.
Tags
TabControl
Asked by
Bhavin
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Share this question
or