Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello all,

I have one Tab Control in silverlight.
In my tab there are 2 tab item. In tab-1 and tab-2, i am adding run time control into Canvas. And i have one Save button out side of tab. My Xaml page like,


XML
<UniControls:UniTabControl Background="Transparent" ReorderTabRows="False"
                                       HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                        Margin="0,0,5,0" BorderThickness="1" >

                <UniControls:UniTabItem Header="Form-1" TabIndex="0" Width="130" MinHeight="22"  VerticalAlignment="Center" HorizontalContentAlignment="Center" BorderThickness="0" Margin="0" IsSelected="True">
                <Canvas/>
            </UniControls:UniTabItem>
                <UniControls:UniTabItem Header="Form-1" TabIndex="0" Width="130" MinHeight="22"  VerticalAlignment="Center" HorizontalContentAlignment="Center" BorderThickness="0" Margin="0" IsSelected="True">
                <Canvas/>
            </UniControls:UniTabItem>
            </UniControls:UniTabControl>


When i press save button and my tab-2 is active that time i got all the control from canvas but all control's actual-height/height and actual-width/width is 0. If my tab-1 is active that time i got value from actual-height/height and actual-width/width.

Please help me.
Posted

1 solution

The default behavior of the RadTabControl is to keep only the content of its SelectedTab in the VisualTree.
However if you want to keep the content of the RadTabItem which you have already selected you can set the
IsContentPreserved = true
property of the RadTabControl.
 
Share this answer
 

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