TabControl
-
Sunday, February 19, 2012 11:07 PM
Hi,
I have a Reqiurement that I have a tab control with 2 tabs named tab1 and tab2 i want to set default page as tab2 at the time of page loading .......... but it is displaying tab1 as default page..........
so, please help me with a piece of code....
Regards,
Manish
All Replies
-
Sunday, February 19, 2012 11:56 PM
Hi Manish,
you have to Set SelectedIndex Property to set Default Tab
<Grid x:Name="LayoutRoot" Background="White">
<sdk:TabControl Height="148" HorizontalAlignment="Left" Margin="53,66,0,0" Name="tabControl1" VerticalAlignment="Top" Width="270"SelectedIndex="1">
<sdk:TabItem Header="tabItem1" Name="tabItem1">
<Grid />
</sdk:TabItem>
<sdk:TabItem Header="tabItem2" Name="tabItem2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="196*" />
<ColumnDefinition Width="62*" />
</Grid.ColumnDefinitions>
</Grid>
</sdk:TabItem>
</sdk:TabControl>
</Grid>
RegardsRocky

