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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TabView as a wizard

Thread ID:

Created:

Updated:

Platform:

Replies:

145418 Jun 20,2019 01:40 PM UTC Jun 25,2019 10:16 AM UTC Xamarin.Forms 6
loading
Tags: SfTabView
Mark
Asked On June 20, 2019 01:42 PM UTC

Hi,

I have tried your rotator as a wizard control but have had too many problems with it. I would like to use the Tab control as wizard and have the following questions:

1. Can the tab control bind to a collection of templates with a Template property in the same way the rotator does? This is what I used with the rotator.


2. If not how can you bind unique pages (each page is different) to the tab control? I need to add and remove pages from code.

Thanks

Mark.


Muneesh Kumar G [Syncfusion]
Replied On June 21, 2019 07:30 AM UTC

Hi Mark, 
 
Greetings from Syncfusion. 
 
Query : Can the tab control bind to a collection of templates with a Template property in the same way the rotator does? How can you bind unique pages (each page is different ) to the tab control? 
 
In our current implementation, we can only set Xamarin.Form.View as SfTabItem Content, so we don’t have support for load page as TabItem Content. We have already logged a feature report for this requirement and it can be tracked through our feature management system.   
  
 
To achieve your requirement, you can set content page content as tab item content. We have created a sample for this and please find the sample from below location. 
 
Sample Link: 
 
In this sample, we have added the following things. 
 
1.Created a view model with TabitemCollection and also set content page content as tab item content as like below code snippet 
 
 public class ViewModel
    {
        private TabItemCollection items;

        public TabItemCollection Items
        {
            get { return items; }
            set { items = value; }
        }

        public ViewModel()
        {

            Items = new TabItemCollection();
            SetItems();

        }
        internal void SetItems()
        {
            TabViewItemPage1 page1 = new TabViewItemPage1();
            TabViewItemPage2 page2 = new TabViewItemPage2();
            TabViewItemPage3 page3 = new TabViewItemPage3();
            TabViewItemPage4 page4 = new TabViewItemPage4();
            Items.Add(new SfTabItem { Title = "Page1", Content = page1.Content });
            Items.Add(new SfTabItem { Title = "Page2", Content = page2.Content });
            Items.Add(new SfTabItem { Title = "Page3", Content = page3.Content });
            Items.Add(new SfTabItem { Title = "Page4", Content = page4.Content });

        }

    }
 
 
 
2.Set the item collection to the SfTabView as like below code snippet 
 
<ContentPage.BindingContext>
        <local:ViewModel/>
</ContentPage.BindingContext>  
 <StackLayout>
       <tabView:SfTabView x:Name="tabview" Items="{Binding Items}" VerticalOptions="FillAndExpand">
       </tabView:SfTabView>
 </StackLayout>
 
 
 
Please get back us, if you have any concern. 
      
Regards,   
Muneesh Kumar G    


Mark
Replied On June 21, 2019 02:17 PM UTC

Thank you this is very promising.

I noticed that the swiping of the header or content does not work in UWP. Is this by design? I set VisibleHeaderCount="3" in your sample to test the header swiping.

This works fine for Android.

Thanks

Mark.

Muneesh Kumar G [Syncfusion]
Replied On June 24, 2019 12:26 PM UTC

Hi Mark, 
 
We have analyzed your query and we would like to inform you that swiping action working fine with UWP and Android platform.  
 
Please checked the attached video.  
 
 
Since we are not aware of your exact application scenario, we were not able to reproduce this at our end, can you please revert us by modifying the sample based on your application along with replication procedure. This will be helpful for us to provide you better solution at the earliest.  
 
Regards,  
Muneesh Kumar G.  


Mark
Replied On June 25, 2019 07:40 AM UTC

Hi,

I have tested your sample app. Swiping of the header and content works for Android but not UWP. I have noticed the ScrollView (standard control) does also not swipe. I am using Windows 1903.

Any ideas why the swiping should not work?

Thanks


Mark.

Mark
Replied On June 25, 2019 08:06 AM UTC

Hi,

I figured it out. UWP apps only scroll with touch (finger) and not the mouse. Tested with the Store app on my touch screen laptop. Finger works, mouse doesn't.

Can you please confirm?

Thanks

Mark.

Ruba Shanmugam [Syncfusion]
Replied On June 25, 2019 10:16 AM UTC

Hi Mark,

Thanks for the update.

Query: UWP apps only scroll with touch (finger) and not the mouse

We have validated your query and yes the scrollview only works when using fingers in touch screen which is the behavior in UWP framework control. Since we have used the scrollview we have the same behavior as like the framework scrollview.

Please get back us, if you have any concern.

Regards,
Ruba Shanmugam

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.

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

Live Chat Icon For mobile
Live Chat Icon