public CarouselViewGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "CarouselView Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "CarouselView Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        new Button {
                            Text = "Enable CollectionView",                                                              AutomationId                    = "EnableCollectionView", Command = new Command(() => Device.SetFlags(new[] { ExperimentalFlags.CollectionViewExperimental }))
                        },
                        GalleryBuilder.NavButton("CarouselView (Code, Horizontal)",                                      () =>
                                                 new CarouselCodeGallery(ItemsLayoutOrientation.Horizontal),             Navigation),
                        GalleryBuilder.NavButton("CarouselView (Code, Vertical)",                                        () =>
                                                 new CarouselCodeGallery(ItemsLayoutOrientation.Vertical),               Navigation),
                        GalleryBuilder.NavButton("CarouselView (XAML, Horizontal)",                                      () =>
                                                 new CarouselXamlGallery(),                                              Navigation),
                        GalleryBuilder.NavButton("CarouselView (Items)",                                                 () =>
                                                 new CarouselItemsGallery(),                                             Navigation),
                    }
                }
            };
        }
        public ItemsSizeGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "Item Size Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Item Size Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("Expanding Text (Vertical List)", () =>
                                                 new DynamicItemSizeGallery(LinearItemsLayout.Vertical), Navigation),
                        GalleryBuilder.NavButton("Expanding Text (Horizontal List)", () =>
                                                 new DynamicItemSizeGallery(LinearItemsLayout.Horizontal), Navigation),
                        GalleryBuilder.NavButton("ItemSizing Strategy", () =>
                                                 new VariableSizeTemplateGridGallery(ItemsLayoutOrientation.Horizontal), Navigation)
                    }
                }
            };
        }
Beispiel #3
0
        public SelectionGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "Selection Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Selection Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("Selection Modes", () =>
                                                 new SelectionModeGallery(), Navigation),
                        GalleryBuilder.NavButton("Preselected Item", () =>
                                                 new PreselectedItemGallery(), Navigation),
                        GalleryBuilder.NavButton("Preselected Items", () =>
                                                 new PreselectedItemsGallery(), Navigation),
                    }
                }
            };
        }
        public DataTemplateGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "Simple DataTemplate Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Simple DataTemplate Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("Vertical List (Code)", () =>
                                                 new TemplateCodeCollectionViewGallery(ListItemsLayout.VerticalList), Navigation),
                        GalleryBuilder.NavButton("Horizontal List (Code)", () =>
                                                 new TemplateCodeCollectionViewGallery(ListItemsLayout.HorizontalList), Navigation),
                        GalleryBuilder.NavButton("Vertical Grid (Code)", () =>
                                                 new TemplateCodeCollectionViewGridGallery(), Navigation),
                        GalleryBuilder.NavButton("Horizontal Grid (Code)", () =>
                                                 new TemplateCodeCollectionViewGridGallery(ItemsLayoutOrientation.Horizontal), Navigation),
                        GalleryBuilder.NavButton("DataTemplateSelector", () =>
                                                 new DataTemplateSelectorGallery(), Navigation),
                    }
                }
            };
        }
        public SnapPointsGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "Snap Points Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Snap Points Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("Snap Points (Code, Horizontal List)",                                                            () =>
                                                 new SnapPointsCodeGallery(LinearItemsLayout.Horizontal as ItemsLayout),                           Navigation),
                        GalleryBuilder.NavButton("Snap Points (Code, Vertical List)",                                                              () =>
                                                 new SnapPointsCodeGallery(LinearItemsLayout.Vertical as ItemsLayout),                             Navigation),
                        GalleryBuilder.NavButton("Snap Points (Code, Horizontal Grid)",                                                            () =>
                                                 new SnapPointsCodeGallery(new GridItemsLayout(2,                                                  ItemsLayoutOrientation.Horizontal)), Navigation),
                        GalleryBuilder.NavButton("Snap Points (Code, Vertical Grid)",                                                              () =>
                                                 new SnapPointsCodeGallery(new GridItemsLayout(2,                                                  ItemsLayoutOrientation.Vertical)), Navigation),
                    }
                }
            };
        }
Beispiel #6
0
        public GroupingGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "Grouping Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Grouping Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("Basic Grouping", () =>
                                                 new BasicGrouping(), Navigation),
                        GalleryBuilder.NavButton("Grouping, some empty groups", () =>
                                                 new SomeEmptyGroups(), Navigation),
                        GalleryBuilder.NavButton("Grouping, no templates", () =>
                                                 new GroupingNoTemplates(), Navigation),
                        GalleryBuilder.NavButton("Grouping, with selection", () =>
                                                 new GroupingPlusSelection(), Navigation),
                        GalleryBuilder.NavButton("Grouping, switchable", () =>
                                                 new SwitchGrouping(), Navigation),
                        GalleryBuilder.NavButton("Grouping, Observable", () =>
                                                 new ObservableGrouping(), Navigation),
                        GalleryBuilder.NavButton("Grouping, Grid", () =>
                                                 new GridGrouping(), Navigation),
                    }
                }
            };
        }
Beispiel #7
0
        public IndicatorGalleries()
        {
            var descriptionLabel =
                new Label {
                Text = "IndicatorView Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "IndicatorView Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("IndicatorView Gallery", () =>
                                                 new IndicatorsSample(), Navigation),
                        GalleryBuilder.NavButton("Indicator MaxVisible Gallery", () =>
                                                 new IndicatorsSampleMaximumVisible(), Navigation),
                        GalleryBuilder.NavButton("Indicator VisualState", () =>
                                                 new IndicatorsTemplateSample(), Navigation)
                    }
                }
            };
        }
Beispiel #8
0
        public RadioButtonGalleries()
        {
            var descriptionLabel =
                new Label {
                Text = "RadioButton Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "RadioButton Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("RadioButton Group Gallery", () =>
                                                 new RadioButtonGroupGalleryPage(), Navigation),
                        GalleryBuilder.NavButton("RadioButton Group (Attached Property)", () =>
                                                 new RadioButtonGroupGallery(), Navigation),
                        GalleryBuilder.NavButton("RadioButton Group (Attached Property, Binding)", () =>
                                                 new RadioButtonGroupBindingGallery(), Navigation),
                        GalleryBuilder.NavButton("RadioButton Group (Across Multiple Containers)", () =>
                                                 new ScatteredRadioButtonGallery(), Navigation),
                        GalleryBuilder.NavButton("RadioButton Content", () =>
                                                 new RadioButtonContentGallery(), Navigation),
                        GalleryBuilder.NavButton("RadioButton Content Properties", () =>
                                                 new ContentProperties(), Navigation),
                        GalleryBuilder.NavButton("RadioButton Template from Style", () =>
                                                 new TemplateFromStyle(), Navigation),
                    }
                }
            };
        }
        public StateTriggerGallery()
        {
            Title = "StateTrigger Gallery";

            var button = new Button
            {
                Text         = "Enable StateTriggers",
                AutomationId = "EnableStateTriggers"
            };

            button.Clicked += ButtonClicked;

            Content = new StackLayout
            {
                Children =
                {
                    button,
                    GalleryBuilder.NavButton("MinWindowWidth AdaptiveTrigger Gallery", () => new MinWindowWidthAdaptiveTriggerGallery(),   Navigation),
                    GalleryBuilder.NavButton("MinWindowHeight AdaptiveTrigger Gallery",() => new MinWindowHeightAdaptiveTriggerGallery(),  Navigation),
                    GalleryBuilder.NavButton("CompareStateTrigger Gallery",            () => new CompareStateTriggerGallery(),             Navigation),
                    GalleryBuilder.NavButton("DeviceStateTrigger Gallery",             () => new DeviceStateTriggerGallery(),              Navigation),
                    GalleryBuilder.NavButton("OrientationStateTrigger Gallery",        () => new OrientationStateTriggerGallery(),         Navigation),
                    GalleryBuilder.NavButton("StateTriggers directly on Elements",     () => new StateTriggersDirectlyOnElements(),        Navigation),
                    GalleryBuilder.NavButton("DualScreenStateTrigger Gallery",         () => new DualScreenStateTriggerGallery(),          Navigation),
                    GalleryBuilder.NavButton("State Trigger IsActive Toggling",        () => new StateTriggerToggleGallery(),              Navigation),
                    GalleryBuilder.NavButton("State Trigger Events Gallery",           () => new StateTriggerEventsGallery(),              Navigation)
                }
            };
        }
Beispiel #10
0
        public DefaultTextGallery()
        {
            var descriptionLabel = new Label
            {
                Text   = "No DataTemplates; just using the ToString() of the objects in the source.",
                Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Default Text Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        // TODO hartez 2018-06-05 10:43 AM Need a gallery page which allows layout selection
                        // so we can demonstrate switching between them
                        descriptionLabel,
                        GalleryBuilder.NavButton("Vertical List (Code)", () =>
                                                 new TextCodeCollectionViewGallery(LinearItemsLayout.Vertical), Navigation),
                        GalleryBuilder.NavButton("Horizontal List (Code)", () =>
                                                 new TextCodeCollectionViewGallery(LinearItemsLayout.Horizontal), Navigation),
                        GalleryBuilder.NavButton("Vertical Grid (Code)", () =>
                                                 new TextCodeCollectionViewGridGallery(), Navigation),
                        GalleryBuilder.NavButton("Horizontal Grid (Code)", () =>
                                                 new TextCodeCollectionViewGridGallery(ItemsLayoutOrientation.Horizontal), Navigation),
                    }
                }
            };
        }
        public RefreshViewGallery()
        {
            Title = "RefreshView Gallery";

            var button = new Button
            {
                Text         = "Enable CarouselView",
                AutomationId = "EnableCarouselView"
            };

            button.Clicked += ButtonClicked;

            Content = new StackLayout
            {
                Children =
                {
                    button,
                    GalleryBuilder.NavButton("Refresh Layout Gallery",           () => new RefreshLayoutGallery(),          Navigation),
                    GalleryBuilder.NavButton("RefreshView using margins Gallery",() => new RefreshLayoutMarginGallery(),    Navigation),
                    GalleryBuilder.NavButton("Refresh ScrollView Gallery",       () => new RefreshScrollViewGallery(),      Navigation),
                    GalleryBuilder.NavButton("Refresh ListView Gallery",         () => new RefreshListViewGallery(),        Navigation),
                    GalleryBuilder.NavButton("Refresh CollectionView Gallery",   () => new RefreshCollectionViewGallery(),  Navigation),
                    GalleryBuilder.NavButton("Refresh CarouselView Gallery",     () => new RefreshCarouselViewGallery(),    Navigation),
                    GalleryBuilder.NavButton("Refresh WebView Gallery",          () => new RefreshWebViewGallery(),         Navigation),
                    GalleryBuilder.NavButton("IsEnabled RefreshView Gallery",    () => new IsEnabledRefreshViewGallery(),   Navigation)
                }
            };
        }
Beispiel #12
0
        public ItemsSpacingGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "Item Spacing Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Item Spacing Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("Vertical List Spacing",                                                                 () =>
                                                 new SpacingGallery(LinearItemsLayout.Vertical),                                          Navigation),
                        GalleryBuilder.NavButton("Horizontal List Spacing",                                                               () =>
                                                 new SpacingGallery(LinearItemsLayout.Horizontal),                                        Navigation),
                        GalleryBuilder.NavButton("Vertical Grid Spacing",                                                                 () =>
                                                 new SpacingGallery(new GridItemsLayout(3,                                                ItemsLayoutOrientation.Vertical)), Navigation),
                        GalleryBuilder.NavButton("Horizontal Grid Spacing",                                                               () =>
                                                 new SpacingGallery(new GridItemsLayout(3,                                                ItemsLayoutOrientation.Horizontal)), Navigation)
                    }
                }
            };
        }
Beispiel #13
0
        public PropagationGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "Property Propagation Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Property Propagation Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("Propagate FlowDirection",                                           () =>
                                                 new PropagateCodeGallery(LinearItemsLayout.Vertical),                Navigation),

                        GalleryBuilder.NavButton("Propagate FlowDirection in EmptyView",                              () =>
                                                 new PropagateCodeGallery(LinearItemsLayout.Vertical,    0), Navigation),
                    }
                }
            };
        }
 public CollectionViewGallery()
 {
     Content = new StackLayout
     {
         Children =
         {
             new Button {
                 Text = "Enable CollectionView", AutomationId = "EnableCollectionView", Command = new Command(() => Device.SetFlags(new[]{ ExperimentalFlags.CollectionViewExperimental                                                                                                                   }))
             },
             GalleryBuilder.NavButton("Default Text Galleries", () => new DefaultTextGallery(), Navigation),
             GalleryBuilder.NavButton("DataTemplate Galleries", () => new DataTemplateGallery(), Navigation),
             GalleryBuilder.NavButton("Observable Collection Galleries", () => new ObservableCollectionGallery(), Navigation),
             GalleryBuilder.NavButton("Snap Points Galleries", () => new SnapPointsGallery(), Navigation),
             GalleryBuilder.NavButton("ScrollTo Galleries", () => new ScrollToGallery(), Navigation),
             GalleryBuilder.NavButton("CarouselView Galleries", () => new CarouselViewGallery(), Navigation),
             GalleryBuilder.NavButton("EmptyView Galleries", () => new EmptyViewGallery(), Navigation),
             GalleryBuilder.NavButton("Selection Galleries", () => new SelectionGallery(), Navigation),
             GalleryBuilder.NavButton("Propagation Galleries", () => new PropagationGallery(), Navigation),
             GalleryBuilder.NavButton("Grouping Galleries", () => new GroupingGallery(), Navigation),
             GalleryBuilder.NavButton("Item Size Galleries", () => new ItemsSizeGallery(), Navigation),
             GalleryBuilder.NavButton("Scroll Mode Galleries", () => new ScrollModeGallery(), Navigation),
             GalleryBuilder.NavButton("Alternate Layout Galleries", () => new AlternateLayoutGallery(), Navigation),
             GalleryBuilder.NavButton("Header/Footer Galleries", () => new HeaderFooterGallery(), Navigation),
             GalleryBuilder.NavButton("Nested CollectionViews", () => new NestedGalleries.NestedCollectionViewGallery(), Navigation),
         }
     };
 }
Beispiel #15
0
        public AppThemeGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "AppTheme Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "AppTheme Galleries";

            var button = new Button
            {
                Text         = "Enable AppTheme",
                AutomationId = "EnableAppTheme"
            };

            button.Clicked += ButtonClicked;

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        button,
                        GalleryBuilder.NavButton("AppTheme Code", () =>
                                                 new AppThemeCodeGallery(), Navigation),
                        GalleryBuilder.NavButton("AppTheme XAML", () =>
                                                 new AppThemeXamlGallery(), Navigation),
                        GalleryBuilder.NavButton("GetNamedColor", () =>
                                                 new NamedPlatformColorGallery(), Navigation)
                    }
                }
            };
        }
Beispiel #16
0
 public CollectionViewGallery()
 {
     Content = new ScrollView
     {
         Content = new StackLayout
         {
             Children =
             {
                 GalleryBuilder.NavButton("Default Text Galleries",          () => new DefaultTextGallery(),                          Navigation),
                 GalleryBuilder.NavButton("DataTemplate Galleries",          () => new DataTemplateGallery(),                         Navigation),
                 GalleryBuilder.NavButton("Observable Collection Galleries", () => new ObservableCollectionGallery(),                 Navigation),
                 GalleryBuilder.NavButton("Snap Points Galleries",           () => new SnapPointsGallery(),                           Navigation),
                 GalleryBuilder.NavButton("ScrollTo Galleries",              () => new ScrollToGallery(),                             Navigation),
                 GalleryBuilder.NavButton("CarouselView Galleries",          () => new CarouselViewGallery(),                         Navigation),
                 GalleryBuilder.NavButton("EmptyView Galleries",             () => new EmptyViewGallery(),                            Navigation),
                 GalleryBuilder.NavButton("Selection Galleries",             () => new SelectionGallery(),                            Navigation),
                 GalleryBuilder.NavButton("Propagation Galleries",           () => new PropagationGallery(),                          Navigation),
                 GalleryBuilder.NavButton("Grouping Galleries",              () => new GroupingGallery(),                             Navigation),
                 GalleryBuilder.NavButton("Item Spacing Galleries",          () => new ItemsSpacingGallery(),                         Navigation),
                 GalleryBuilder.NavButton("Item Size Galleries",             () => new ItemsSizeGallery(),                            Navigation),
                 GalleryBuilder.NavButton("Scroll Mode Galleries",           () => new ScrollModeGallery(),                           Navigation),
                 GalleryBuilder.NavButton("Alternate Layout Galleries",      () => new AlternateLayoutGallery(),                      Navigation),
                 GalleryBuilder.NavButton("Header/Footer Galleries",         () => new HeaderFooterGallery(),                         Navigation),
                 GalleryBuilder.NavButton("Nested CollectionViews",          () => new NestedGalleries.NestedCollectionViewGallery(), Navigation),
             }
         }
     };
 }
        public RadioButtonGalleries()
        {
            var descriptionLabel =
                new Label {
                Text = "RadioButton Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "RadioButton Galleries";

            var button = new Button
            {
                Text         = "Enable RadioButton",
                AutomationId = "EnableRadioButton"
            };

            button.Clicked += ButtonClicked;

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        button,
                        GalleryBuilder.NavButton("RadioButton Group Gallery", () =>
                                                 new RadioButtonGroupGalleryPage(), Navigation)
                    }
                }
            };
        }
Beispiel #18
0
        public EmptyViewGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "EmptyView Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "EmptyView Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("EmptyView (null ItemsSource)", () =>
                                                 new EmptyViewNullGallery(), Navigation),
                        GalleryBuilder.NavButton("EmptyView (String)", () =>
                                                 new EmptyViewStringGallery(), Navigation),
                        GalleryBuilder.NavButton("EmptyView (View)", () =>
                                                 new EmptyViewViewGallery(), Navigation),
                        GalleryBuilder.NavButton("EmptyView (Template View)", () =>
                                                 new EmptyViewTemplateGallery(), Navigation),
                        GalleryBuilder.NavButton("EmptyView (Swap EmptyView)", () =>
                                                 new EmptyViewSwapGallery(), Navigation),
                        GalleryBuilder.NavButton("EmptyView (load simulation)", () =>
                                                 new EmptyViewLoadSimulateGallery(), Navigation),
                        GalleryBuilder.NavButton("EmptyView RTL", () =>
                                                 new EmptyViewRTLGallery(), Navigation)
                    }
                }
            };
        }
Beispiel #19
0
        public ShapesGallery()
        {
            Title = "Shapes Gallery";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        GalleryBuilder.NavButton("Ellipse Gallery",                                     () => new EllipseGallery(),             Navigation),
                        GalleryBuilder.NavButton("Line Gallery",                                        () => new LineGallery(),                Navigation),
                        GalleryBuilder.NavButton("Polygon Gallery",                                     () => new PolygonGallery(),             Navigation),
                        GalleryBuilder.NavButton("Polyline Gallery",                                    () => new PolylineGallery(),            Navigation),
                        GalleryBuilder.NavButton("Rectangle Gallery",                                   () => new RectangleGallery(),           Navigation),
                        GalleryBuilder.NavButton("LineCap Gallery",                                     () => new LineCapGallery(),             Navigation),
                        GalleryBuilder.NavButton("LineJoin Gallery",                                    () => new LineJoinGallery(),            Navigation),
                        GalleryBuilder.NavButton("AutoSize Shapes Gallery",                             () => new AutoSizeShapesGallery(),      Navigation),
                        GalleryBuilder.NavButton("Path Gallery",                                        () => new PathGallery(),                Navigation),
                        GalleryBuilder.NavButton("Path Aspect Gallery",                                 () => new PathAspectGallery(),          Navigation),
                        GalleryBuilder.NavButton("Path LayoutOptions Gallery",                          () => new PathLayoutOptionsGallery(),   Navigation),
                        GalleryBuilder.NavButton("Transform Playground",                                () => new TransformPlaygroundGallery(), Navigation),
                        GalleryBuilder.NavButton("Path Transform using string (TypeConverter) Gallery", () => new PathTransformStringGallery(), Navigation),
                        GalleryBuilder.NavButton("Animate Shape Gallery",                               () => new AnimateShapeGallery(),        Navigation),
                        GalleryBuilder.NavButton("Shape AppThemes Gallery",                             () => new ShapeAppThemeGallery(),       Navigation),
                        GalleryBuilder.NavButton("Clip Gallery",                                        () => new ClipGallery(),                Navigation),
                        GalleryBuilder.NavButton("Clip CornerRadius Gallery",                           () => new ClipCornerRadiusGallery(),    Navigation),
                        GalleryBuilder.NavButton("Clip Views Gallery",                                  () => new ClipViewsGallery(),           Navigation),
                        GalleryBuilder.NavButton("Add/Remove Clip Gallery",                             () => new AddRemoveClipGallery(),       Navigation),
                        GalleryBuilder.NavButton("Clip Performance Gallery",                            () => new ClipPerformanceGallery(),     Navigation)
                    }
                }
            };
        }
Beispiel #20
0
        public SwipeViewGallery()
        {
            var button = new Button
            {
                Text         = "Enable SwipeView",
                AutomationId = "EnableSwipeView"
            };

            button.Clicked += ButtonClicked;

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        button,
                        GalleryBuilder.NavButton("Basic SwipeView Gallery",          () => new BasicSwipeGallery(),              Navigation),
                        GalleryBuilder.NavButton("SwipeView Events Gallery",         () => new SwipeViewEventsGallery(),         Navigation),
                        GalleryBuilder.NavButton("SwipeItems from Resource Gallery", () => new ResourceSwipeItemsGallery(),      Navigation),
                        GalleryBuilder.NavButton("BindableLayout Gallery",           () => new SwipeBindableLayoutGallery(),     Navigation),
                        GalleryBuilder.NavButton("ListView (RecycleElement) Gallery",() => new SwipeListViewGallery(),           Navigation),
                        GalleryBuilder.NavButton("CollectionView Galleries",         () => new SwipeCollectionViewGallery(),     Navigation),
                        GalleryBuilder.NavButton("CarouselView Gallery",             () => new SwipeCarouselViewGallery(),       Navigation),
                        GalleryBuilder.NavButton("SwipeBehaviorOnInvoked Gallery",   () => new SwipeBehaviorOnInvokedGallery(),  Navigation),
                        GalleryBuilder.NavButton("Custom SwipeItem Galleries",       () => new CustomSwipeItemGallery(),         Navigation),
                        GalleryBuilder.NavButton("SwipeItem Icon Gallery",           () => new SwipeItemIconGallery(),           Navigation),
                        GalleryBuilder.NavButton("SwipeTransitionMode Gallery",      () => new SwipeTransitionModeGallery(),     Navigation),
                        GalleryBuilder.NavButton("Add/Remove SwipeItems Gallery",    () => new AddRemoveSwipeItemsGallery(),     Navigation),
                        GalleryBuilder.NavButton("Close SwipeView Gallery",          () => new CloseSwipeGallery(),              Navigation)
                    }
                }
            };
        }
Beispiel #21
0
        public HeaderFooterGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "Header/Footer Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Header/Footer Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("Header/Footer (String)",         () => new HeaderFooterString(),          Navigation),
                        GalleryBuilder.NavButton("Header/Footer (Forms View)",     () => new HeaderFooterView(),            Navigation),
                        GalleryBuilder.NavButton("Header/Footer (Template)",       () => new HeaderFooterTemplate(),        Navigation),
                        GalleryBuilder.NavButton("Header/Footer (Grid)",           () => new HeaderFooterGrid(),            Navigation),
                        GalleryBuilder.NavButton("Footer Only (String)",           () => new FooterOnlyString(),            Navigation),
                        GalleryBuilder.NavButton("Header/Footer (Grid Horizontal)",() => new HeaderFooterGridHorizontal(),  Navigation),
                    }
                }
            };
        }
Beispiel #22
0
        public DisabledStatesGallery()
        {
            var desc = "Some of the XF controls have legacy (pre-VSM) behaviors such that when IsEnabled is set to `false`, they "
                       + "will override the colors set by the user with the default native colors for the 'disabled' "
                       + "state. For backward compatibility, this remains the default behavior for those controls. "
                       + "\n\nUsing the VSM with these controls overrides that behavior; it is also possible to override "
                       + "that behavior with the `IsLegacyColorModeEnabled` platform specific, which returns the "
                       + "controls to their old (pre-2.0) behavior (i.e., colors set on the control remain even when "
                       + "the control is 'disabled'). \n\nThe galleries below demonstrate each behavior.";

            var descriptionLabel = new Label {
                Text = desc, Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Disabled states galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        GalleryBuilder.NavButton("Editor Disabled States",    () => new EditorDisabledStatesGallery(),      Navigation),
                        GalleryBuilder.NavButton("SearchBar Disabled States", () => new SearchBarDisabledStatesGallery(),   Navigation),
                        GalleryBuilder.NavButton("Entry Disabled States",     () => new EntryDisabledStatesGallery(),       Navigation),
                        GalleryBuilder.NavButton("Button Disabled States",    () => new ButtonDisabledStatesGallery(),      Navigation),
                        GalleryBuilder.NavButton("Picker Disabled States",    () => new PickerDisabledStatesGallery(),      Navigation),
                        GalleryBuilder.NavButton("TimePicker Disabled States",() => new TimePickerDisabledStatesGallery(),  Navigation),
                        GalleryBuilder.NavButton("DatePicker Disabled States",() => new DatePickerDisabledStatesGallery(),  Navigation)
                    }
                }
            };
        }
Beispiel #23
0
        public AlternateLayoutGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "Alternate Layout Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Alternate Layout Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,

                        GalleryBuilder.NavButton("Staggered Grid [Android only]",                                                                                                     () =>
                                                 new StaggeredLayout(),                                                                                                               Navigation),

                        GalleryBuilder.NavButton("ScrollTo Item (Staggered Grid, [Android only])",                                                                                    () =>
                                                 new ScrollToCodeGallery(new StaggeredGridItemsLayout(3,                                                                              ItemsLayoutOrientation.Vertical),
                                                                         ScrollToMode.Element,                                                                                        ExampleTemplates.RandomSizeTemplate, () => new StaggeredCollectionView()), Navigation),

                        GalleryBuilder.NavButton("Scroll Mode (Staggered Grid, [Android only])",                                                                                      () =>
                                                 new ScrollModeTestGallery(new StaggeredGridItemsLayout(3,                                                                            ItemsLayoutOrientation.Vertical),
                                                                           ExampleTemplates.RandomSizeTemplate,                                                                       () => new StaggeredCollectionView()), Navigation)
                    }
                }
            };
        }
Beispiel #24
0
        public ObservableCollectionGallery()
        {
            var desc = "Observable Collection Galleries";

            var descriptionLabel = new Label {
                Text = desc, Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "Simple DataTemplate Galleries";

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,

                        GalleryBuilder.NavButton("Filter Items",                                                                    () => new FilterCollectionView(),              Navigation),

                        GalleryBuilder.NavButton("Add/Remove Items (List)",                                                         () =>
                                                 new ObservableCodeCollectionViewGallery(grid: false),                              Navigation),

                        GalleryBuilder.NavButton("Add/Remove Items (Grid)",                                                         () =>
                                                 new ObservableCodeCollectionViewGallery(),                                         Navigation),

                        GalleryBuilder.NavButton("Add/Remove Items (Grid, initially empty)",                                        () =>
                                                 new ObservableCodeCollectionViewGallery(initialItems: 0),                          Navigation),

                            << << << < HEAD
                            GalleryBuilder.NavButton("Add/Remove Items (List, initially empty)",                                    () =>
                                                     new ObservableCodeCollectionViewGallery(grid: false,                               initialItems: 0),                              Navigation),

                            GalleryBuilder.NavButton("Multi-item add/remove, no index",
                                                     () => new ObservableMultiItemCollectionViewGallery(),                              Navigation),

                            GalleryBuilder.NavButton("Multi-item add/remove, with index",
                                                     () => new ObservableMultiItemCollectionViewGallery(withIndex: true),               Navigation),

                            GalleryBuilder.NavButton("Reset",                                                                       () => new ObservableCollectionResetGallery(),  Navigation),

                            GalleryBuilder.NavButton("Add Items with timer to Empty Collection",                                    () =>
                                                     new ObservableCodeCollectionViewGallery(grid: false,                               initialItems: 0,                               addItemsWithTimer: true), Navigation)
                            == == == =
                                GalleryBuilder.NavButton("Multi-item add/remove, no index",
                                                         () => new ObservableMultiItemCollectionViewGallery(),                          Navigation),

                            GalleryBuilder.NavButton("Multi-item add/remove, with index",
                                                     () => new ObservableMultiItemCollectionViewGallery(withIndex: true),               Navigation),

                            GalleryBuilder.NavButton("Reset",                                                                       () => new ObservableCollectionResetGallery(),  Navigation)
                            >> >> >> > Update(#12)
                    }
                }
            };
        }
        public CarouselViewGallery()
        {
            var descriptionLabel =
                new Label {
                Text = "CarouselView Galleries", Margin = new Thickness(2, 2, 2, 2)
            };

            Title = "CarouselView Galleries";

            var button = new Button
            {
                Text         = "Enable IndicatorView",
                AutomationId = "EnableIndicatorView"
            };

            button.Clicked += ButtonClicked;

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        descriptionLabel,
                        button,
                        GalleryBuilder.NavButton("CarouselView (Code, Horizontal)",                                                                                         () =>
                                                 new CarouselCodeGallery(ItemsLayoutOrientation.Horizontal),                                                                Navigation),
                        GalleryBuilder.NavButton("CarouselView (Code, Vertical)",                                                                                           () =>
                                                 new CarouselCodeGallery(ItemsLayoutOrientation.Vertical),                                                                  Navigation),
                        GalleryBuilder.NavButton("CarouselView (XAML, Horizontal)",                                                                                         () =>
                                                 new CarouselXamlGallery(),                                                                                                 Navigation),
                        GalleryBuilder.NavButton("CarouselView (Indicators Forms)",                                                                                         () =>
                                                 new CarouselItemsGallery(),                                                                                                Navigation),
                        GalleryBuilder.NavButton("CarouselView (Indicators Default (Native))",                                                                              () =>
                                                 new CarouselItemsGallery(useNativeIndicators: true),                                                                       Navigation),
                        GalleryBuilder.NavButton("CarouselView Async",                                                                                                      () =>
                                                 new CarouselItemsGallery(setCollectionWithAsync:true,                                                                      useNativeIndicators: true),       Navigation),
                        GalleryBuilder.NavButton("CarouselView Snap",                                                                                                       () =>
                                                 new CarouselSnapGallery(),                                                                                                 Navigation),
                        GalleryBuilder.NavButton("ObservableCollection and CarouselView",                                                                                   () =>
                                                 new CollectionCarouselViewGallery(),                                                                                       Navigation),
                        GalleryBuilder.NavButton("CarouselView EmptyView",                                                                                                  () =>
                                                 new EmptyCarouselGallery(),                                                                                                Navigation),
                        GalleryBuilder.NavButton("IndicatorView",                                                                                                           () =>
                                                 new IndicatorCodeGallery(),                                                                                                Navigation),
                        GalleryBuilder.NavButton("CarouselView SetPosition Ctor",                                                                                           () =>
                                                 new CarouselItemsGallery(useNativeIndicators: true,                                                                        setPositionOnConstructor: true),  Navigation),
                        GalleryBuilder.NavButton("CarouselView SetPosition Appearing",                                                                                      () =>
                                                 new CarouselItemsGallery(useNativeIndicators: true,                                                                        setPositionOnAppearing: true),    Navigation),
                        GalleryBuilder.NavButton("CarouselView SetPosition Ctor No Animation",                                                                              () =>
                                                 new CarouselItemsGallery(useNativeIndicators: true,                                                                        setPositionOnConstructor: true,   useScrollAnimated: false), Navigation),
                    }
                }
            };
        }
 public SwipeCollectionViewGallery()
 {
     Title   = "CollectionView Galleries";
     Content = new StackLayout
     {
         Children =
         {
             GalleryBuilder.NavButton("Horizontal CollectionView Gallery", () => new SwipeHorizontalCollectionViewGallery(), Navigation),
             GalleryBuilder.NavButton("Vertical CollectionView Gallery",   () => new SwipeVerticalCollectionViewGallery(),   Navigation)
         }
     };
 }
Beispiel #27
0
 public PositionGallery()
 {
     Title   = "Position Galleries";
     Content = new StackLayout
     {
         Children =
         {
             GalleryBuilder.NavButton("SwipeItem Position Gallery",     () => new SwipeItemPositionGallery(),     Navigation),
             GalleryBuilder.NavButton("SwipeItemView Position Gallery", () => new SwipeItemViewPositionGallery(), Navigation)
         }
     };
 }
Beispiel #28
0
 public SwipeThresholdGallery()
 {
     Title   = "SwipeThreshold Gallery";
     Content = new StackLayout
     {
         Children =
         {
             GalleryBuilder.NavButton("Horizontal SwipeThreshold Gallery",            () => new HorizontalSwipeThresholdGallery(),      Navigation),
             GalleryBuilder.NavButton("Vertical SwipeThreshold Gallery",              () => new VerticalSwipeThresholdGallery(),        Navigation),
             GalleryBuilder.NavButton("SwipeThreshold with Custom SwipeItem Gallery", () => new SwipeThresholdCustomSwipeItemGallery(), Navigation),
         }
     };
 }
Beispiel #29
0
 public LayoutGallery()
 {
     Content = new ScrollView
     {
         Content = new StackLayout
         {
             Children =
             {
                 GalleryBuilder.NavButton("VerticalStackLayout Gallery",   () => new VerticalStackLayoutGallery(),   Navigation),
                 GalleryBuilder.NavButton("HorizontalStackLayout Gallery", () => new HorizontalStackLayoutGallery(), Navigation),
             }
         }
     };
 }
Beispiel #30
0
 public RefreshViewGallery()
 {
     Title   = "RefreshView Gallery";
     Content = new StackLayout
     {
         Children =
         {
             GalleryBuilder.NavButton("Refresh Layout Gallery",         () => new RefreshLayoutGallery(),         Navigation),
             GalleryBuilder.NavButton("Refresh ScrollView Gallery",     () => new RefreshScrollViewGallery(),     Navigation),
             GalleryBuilder.NavButton("Refresh ListView Gallery",       () => new RefreshListViewGallery(),       Navigation),
             GalleryBuilder.NavButton("Refresh CollectionView Gallery", () => new RefreshCollectionViewGallery(), Navigation)
         }
     };
 }