static Layout CreateCollapseWidthAdjuster(Xamarin.Forms.MasterDetailPage page)
        {
            var label = new Label
            {
                Text = "Adjust Collapsed Width",
                VerticalTextAlignment = TextAlignment.Center,
                VerticalOptions       = LayoutOptions.Center
            };

            var entry = new Entry {
                Text = page.On <Windows>().CollapsedPaneWidth().ToString()
            };
            var button = new Button {
                Text = "Change", BackgroundColor = Color.Gray
            };

            button.Clicked += (sender, e) =>
            {
                double width;
                if (double.TryParse(entry.Text, out width))
                {
                    page.On <Windows>().CollapsedPaneWidth(width);
                }
            };

            return(new StackLayout
            {
                Orientation = StackOrientation.Horizontal,
                HorizontalOptions = LayoutOptions.Center,
                Children = { label, entry, button }
            });
        }
        static Layout CreateCollapseStyleChanger(Xamarin.Forms.MasterDetailPage page)
        {
            var enumType = typeof(CollapseStyle);

            return(WindowsPlatformSpecificsHelpers.CreateChanger(enumType, Enum.GetName(enumType, page.On <Windows>().GetCollapseStyle()), picker =>
            {
                page.On <Windows>().SetCollapseStyle((CollapseStyle)Enum.Parse(enumType, picker.Items[picker.SelectedIndex]));
            }, "Select Collapse Style"));
        }