We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfTabControl and ItemsSource/Data binding

Thread ID:





128055 Dec 28,2016 11:16 PM UTC Jan 2,2017 09:59 AM UTC UWP 2
Tags: SfTabControl
Achint Mehta
Asked On December 28, 2016 11:16 PM UTC

I am trying to use data-binding for creating a SFTabControl on the MainPage using the code provided in one of the help pages of syncfusion for sftabcontrol (https://help.syncfusion.com/uwp/sftabcontrol/populating-items).
However, I am getting a blank page (and not tabs created)

Following is my code:

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
                <RowDefinition Height="1*"/>                
            <navigation:SfTabControl Grid.Row="0" ItemsSource="{Binding Employees}"/>


namespace Man
    public class Employee 


        public string Name { get; set; }

        public string Description { get; set; }

    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page

        private List<Employee> employees;

        public List<Employee> Employees


            get { return employees; }

            set { employees = value; }


        public MainPage()

            Employees = new List<Employee>();

            Employees.Add(new Employee() { Name = "James", Description = "Description about James" });

            Employees.Add(new Employee() { Name = "Linda", Description = "Description about Linda" });

            Employees.Add(new Employee() { Name = "Carl", Description = "Description about Carl" });

            Employees.Add(new Employee() { Name = "Niko", Description = "Description about Niko" });


Can anyone tell me whats wrong with the code. 

Also, I am not sure how this approach is supposed to work considering that there is no ObservableCollection implemented.

Is there a simpler working example for using ItemsSource/data-binding with SfTabControl

Achint Mehta
Replied On December 29, 2016 04:15 PM UTC

Apparently I figured out that replacing <navigation:SfTabControl Grid.Row="0" ItemsSource="{Binding Employees}"/> with <navigation:SfTabControl Grid.Row="0" ItemsSource="{x:Bind Employees, Mode=OneWay}"/> works to some extent.

Now if the Source List (Employees) is populated in the MainPage constructor then tabs are created but if Source List is populated in Loaded event of the page then there are not tabs created. This happens even if the Source List is defined as ObservableCollection

Marimuthu Sivalingam [Syncfusion]
Replied On January 2, 2017 09:59 AM UTC

Hi Achint,

Thank you for contacting Syncfusion support.

We suspect that you have missed to set DataContext, so that control could not get information about data source used in binding. We have prepared a sample to demonstrate creating SfTabControl items through binding and you can download it from the following link:

Sample: 128055_SfTabControlBinding

Marimuthu S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon