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>
Hello Andre,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
The problem had nothing to do with version of the controls. I did manage to find my mistake and refactored the code to get it working and binding correctly. I should have used a collection of ViewModels in my ObservableCollection and slightly modified Xaml. Working code is attached for those interested in easy way to get Tabs working.
I upgraded to SR 2350 as you recommended but I still get the same issue. Updated project is attached.
http://www.flickr.com/photos/andrebii/9417802590/
Stefan, are you saying you got the sample to work with the latest service release for 10.2? Can you send me a link to download it? We have a corporate distribution of the controls and finding the account credentials can take forever. Can I get it off your FTP site? Thanks.
I have been looking into the sample and I tested it with the RTM of version 10.2 and the issue you described occurred there. I also tested it with teh latest service relase of 10.2 (10.2.20102.2350) and the issue was fixed there, so I can suggest you download it by logging to our web site and going to Account \Keys & Downloads.
Hope this helps you.