Hi,
I need to create Tabs inside a tab control dynamically. Each Tab is a usercontrol with respective data. I guess it is simple if we use ItemTemplates. But I am not able to figure out how to make it work. Can anyone provide me with a simple sample application which does it.
If anyone can explain it using the Prism that would be great.
Thanks
Hello,
You do not actually need the ItemTemplate. The ItemTemplate is used to apply a DataTemplate to the items of the items control - in this case it will be the tab items. As your requirement is to template the content of the selected tab as another XamTabControl, you need the ContentTemplate of the XamTabControl. Below you can find a simple code snippet of this :
<igWindows:XamTabControl ItemsSource="{Binding}" >
<igWindows:XamTabControl.ContentTemplate>
<DataTemplate>
<igWindows:XamTabControl ItemsSource="{Binding Interests}"/>
</DataTemplate>
</igWindows:XamTabControl.ContentTemplate>
</igWindows:XamTabControl>