Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to create a UserControl template by deriving from TabControl and I'm binding my collection of TabItems with the ItemsSource of tabControl. but it doesn't switching the content of the tab items when tab item selection changes, all the tabs are sharing same content (default-content of very first tab). here is Xaml of my user control template.
XML
<tabcontrol itemssource="MyCollection">
</tabcontrol>


also if I create ItemsTemplate, it fails to work

XML
<tabcontrol itemssource="MyCollection">
 <tabcontrol.itemstemplate>
  <datatemplate>
   <tabitem header="{Binding Header}" content="{Binding Content}">
  </tabitem>
</datatemplate>
</tabcontrol.itemstemplate></tabcontrol>


I dont know why this is happening.plz help..Any response will be appreciated....

Thanks, GK Prajapati
Posted
Updated 31-Oct-13 8:20am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900