Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

How to implement splitview in already created xamarin project ?

$
0
0

I have one Xamarin Application, while developing we only focused on look and feel for iphone. Now we want to implement SplitView for some page in our application.

But it is giving run time error :

System.InvalidOperationException: Title property must be set on Master page

I already set title as given in link inside searchTabletpage.cs file.

public SearchTabletPage()
        {
            Title = "Details";
            this.MasterBehavior = MasterBehavior.Default;

            Master = new SearchPage(true);
            Detail = new ContentPage()
            {
                Content = new StackLayout
                {
                    VerticalOptions = LayoutOptions.Center,
                    HorizontalOptions = LayoutOptions.Center,

                    Children = {
                        new Label { Text = "Select a Record", FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)) }
                    }

                }

            };

            ((SearchPage)Master).ItemSelected = (searchDetail) =>
            {

                BusinessDetailPage businessDetail = new BusinessDetailPage(searchDetail.InfogroupId,searchDetail.Distance,searchDetail.FullAddress,searchDetail.Phone);
                Detail = businessDetail;
                if (Device.RuntimePlatform != Device.UWP)
                {
                    IsPresented = false;
                }
            };

            IsPresented = true;
        }
    }

I have followed steps given in blog: Bringing Xamarin.Forms Apps to Tablets

Please help.
Thanks in Advance.


Viewing all articles
Browse latest Browse all 89864

Trending Articles