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.
Unfortunately, activation email could not send to your email. Please try again.

Tab Control not working

Thread ID:

Created:

Updated:

Platform:

Replies:

113644 Oct 3,2013 05:32 AM Oct 7,2013 02:04 PM WinRT 3
loading
Tags: Tools
Khurram Bhatti
Asked On October 3, 2013 05:32 AM

I am using your following  code to create a tab control but not able to see any out put., Please send me a demo project for the Tab control implementation.


Note: Following code i am using 

 

public class Employee

  {

        public string Name { getset; }

 

        public string Description { getset; }

  }



   private List<Employee> employees;

 

     public List<Employee> Employees

     {

         get { return employees; }

 

         set { employees = value; }

     }



 

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" });




<navigation:SfTabControl

            ItemsSource="{Binding Employees}" >

            <navigation:SfTabControl.ItemTemplate>

                <DataTemplate>

                    <Grid>

                        <Grid.ColumnDefinitions>

                            <ColumnDefinition Width="30"/>

                            <ColumnDefinition Width="Auto"/>

                        </Grid.ColumnDefinitions>

             <Image Source="people_small.png" Margin="2 2 6 2"/>

             <TextBlock Text="{Binding Name}" Grid.Column="1"                                                        FontStyle="Italic"/>

                    </Grid>

                </DataTemplate>

            </navigation:SfTabControl.ItemTemplate>

</navigation:SfTabControl>






Vignesh V [Syncfusion]
Replied On October 4, 2013 02:34 AM

Hi Khurram,

We are unable to reproduce the problem 'TabControl not working'. We have prepared a sample similar to your code snippet that could meet your requirement.

Please find the sample in below link,


Please let us know if you need further assistance.

Regards,
Vignesh V

Khurram Bhatti
Replied On October 4, 2013 05:03 AM

Thanks for your valuable reply.. 

I am having a tab control with 6 tab. Each tab have its own information/Functionality.

Ex. On click of first tab a grid should bind in <DataTemplate>, 
On click of second tab another list will populate. Same things happen with all tabs.

As per the following code its binding only text  description on click of tab 
<TextBlock  Text="{Binding Description}"/>




Please suggest me or send any sample code so that i can bind controls/usercontrol for each tab in side the datatamplate. I have attached the screenshot of my apps


 <Navigation:SfTabControl 
            ItemsSource="{Binding Screens}" Grid.Row="2" Grid.Column="1" >
                
                            <Navigation:SfTabControl.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="30"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="{Binding Name}" Foreground="Black" FontSize="18" FontWeight="ExtraBlack" Grid.Column="1" FontStyle="Italic"/>
                                </Grid>
                            </DataTemplate>
                        </Navigation:SfTabControl.ItemTemplate>
                            <Navigation:SfTabControl.ContentTemplate>
                                <DataTemplate>
                                <Border Background="{Binding Color}" Height="500">
                                    <TextBlock  Text="{Binding Description}"/>
                                </Border>
                            </DataTemplate>
                        </Navigation:SfTabControl.ContentTemplate>
                    </Navigation:SfTabControl>




screenshot_1074b7b4.zip

Vignesh V [Syncfusion]
Replied On October 7, 2013 02:04 PM

Hi Khurram,

We have prepared a sample that could meet your requirement of 'Binding each tab with different functionality'. In this Sample we have created UserControl for each Tab with different functionality and binded with a property of object type.

Please find the sample in below link,


Please let us know if you have any queries.

Regards,
Vignesh V

CONFIRMATION

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.

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.

;