This is a migrated thread and some comments may be shown as answers.

Multiple Controls in TabItem

1 Answer 81 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Baatezu
Top achievements
Rank 2
Baatezu asked on 19 Jun 2010, 09:53 PM
I'm probably missing something entirely simple and will look like an idiot - but since this weekend is my first foray into Silverlight, I pretty much qualify as an idiot. :)

Using Tabs in ASP.NET AJAX I can add do the 'MultiPage' stuff so I can create a collection of controls who's visibility is determined by which tab is currently selected.
I'm not sure how to do the same thing using the TabControl in Silverlight. If I add more than one control I get an error "The property 'Content' is set more than once."
What I have [in part] is
        <telerik:RadTabControl HorizontalAlignment="Stretch" Margin="235,12,12,12" Name="tabTabs" VerticalAlignment="Stretch" IsDropDownOpen="True"
            <telerik:RadTabItem Header="Vote Counts" Height="20" HorizontalAlignment="Left" Name="tabVoteCounts" VerticalAlignment="Bottom" Width="100" > 
                <RadioButton Content="RadioButton" Height="16" HorizontalAlignment="Left" Margin="522,172,0,0" Name="radioButton1" VerticalAlignment="Top" /> 
            </telerik:RadTabItem> 
        </telerik:RadTabControl> 
but if I add an additional radiobutton [or other stuff] I get the mentioned error.
I've also noticed if I move the radiobutton around, it gets taken out of the TabItem. So I'd have to do all the placement by adjusting the margins.

I know I'm missing something that makes it all make sense and work all nice and smooth - I just need a pointer 'cause I'm a smat one. :)

Thanks

1 Answer, 1 is accepted

Sort by
0
Baatezu
Top achievements
Rank 2
answered on 20 Jun 2010, 02:07 AM
Yep, figured it out.
Add a Grid inside and then it all works fine. :)
Tags
TabControl
Asked by
Baatezu
Top achievements
Rank 2
Answers by
Baatezu
Top achievements
Rank 2
Share this question
or