How to have different content xamls load on click of different tabs

Hi,

I am having a requirement to load different XAML pages for different tabs. My code looks something like this
<sftabcontrol ...... >
<sftabitem header = tab1 />
<sftabitem header = tab2 />
</sftabcontrol>

How do I load different xaml pages on click of these tabs?

1 Reply

KR Kannan R Syncfusion Team September 25, 2018 05:50 AM UTC

Hi Aswin, 
 
Thank you for contacting Syncfusion Support. 
 
We have prepared a sample that tries to meet your requirement. You can load the different XAML pages as a content of the each SfTabItem. Please find the code for the same from below: 
 
<navigation:SfTabControl x:Name="tabControl"> 
            <navigation:SfTabItem Header="America" > 
                <local:ContentPageOne/> 
            </navigation:SfTabItem> 
            <navigation:SfTabItem Header="Australia"> 
                <local:ContentPageTwo/> 
            </navigation:SfTabItem> 
            <navigation:SfTabItem Header="France"> 
                <local:ContentPageThree/> 
            </navigation:SfTabItem> 
            <navigation:SfTabItem Header="Germany"> 
                <local:ContentPageFour/> 
            </navigation:SfTabItem> 
            <navigation:SfTabItem Header="Italy"> 
                <local:ContentPageFive/> 
            </navigation:SfTabItem> 
        </navigation:SfTabControl> 
 
 
 
The same has been explained in the below sample for your reference. You can download it from following location: 
 
 
Please try the solution and let u know if it is helpful 
 
Regards, 
Kannan 


Loader.
Up arrow icon