├── .gitignore
├── LICENSE
├── README.md
├── media
├── catalyst-01.png
├── catalyst-02.png
├── catalyst-03.png
├── catalyst-04.png
├── catalyst-05.png
├── control-gallery-net8.png
├── ios.png
├── maui-gallery-catalyst.mp4
└── maui-p2-gallery.mp4
└── src
├── ControlGallery.sln
├── ControlGallery
├── .vscode
│ └── settings.json
├── App.xaml
├── App.xaml.cs
├── AppShell.xaml
├── AppShell.xaml.cs
├── Common
│ ├── AbsoluteLayoutExtensions.cs
│ ├── CursorBehavior.cs
│ ├── Effects
│ │ └── ContentInsetAdjustmentBehaviorEffect.cs
│ ├── Fonts
│ │ └── IconFont.cs
│ ├── FormattedStringFormatter.cs
│ ├── MarkupView.cs
│ ├── MauiExceptions.cs
│ ├── Messages
│ │ └── ToggleFlyoutHeaderMsg.cs
│ ├── MyExtensions.cs
│ ├── NameOfExtension.cs
│ └── Views
│ │ ├── ControlExample.xaml
│ │ ├── ControlExample.xaml.cs
│ │ ├── ExampleView.xaml
│ │ ├── ExampleView.xaml.cs
│ │ ├── FlyoutHeader.xaml
│ │ ├── FlyoutHeader.xaml.cs
│ │ ├── FlyoutItem.xaml
│ │ ├── FlyoutItem.xaml.cs
│ │ ├── SampleCodePresenter.xaml
│ │ └── SampleCodePresenter.xaml.cs
├── ControlGallery.csproj
├── ControlGallery.sln
├── Converters
│ ├── BooleanInverseConverter.cs
│ ├── ColorSyntaxConverter.cs
│ └── DoubleToIntConverter.cs
├── Info.plist
├── MauiProgram.cs
├── Models
│ ├── BaseViewModel.cs
│ ├── ColorBrush.cs
│ ├── GithubRelease.cs
│ ├── NavItem.cs
│ └── QuickLink.cs
├── Pages
│ ├── BaseContentPage.cs
│ ├── Controls
│ │ ├── ActivityIndicatorPage.cs
│ │ ├── AlertPage.cs
│ │ ├── BorderPage.cs
│ │ ├── BoxViewPage.cs
│ │ ├── ButtonPage.xaml
│ │ ├── ButtonPage.xaml.cs
│ │ ├── CarouselView
│ │ │ ├── BasicCarouselPage.cs
│ │ │ ├── CarouselViewPage.xaml
│ │ │ ├── CarouselViewPage.xaml.cs
│ │ │ ├── Components
│ │ │ │ ├── MarriottView01.xaml
│ │ │ │ ├── MarriottView01.xaml.cs
│ │ │ │ ├── MarriottView02.xaml
│ │ │ │ ├── MarriottView02.xaml.cs
│ │ │ │ ├── MintView01.xaml
│ │ │ │ ├── MintView01.xaml.cs
│ │ │ │ ├── MintView02.xaml
│ │ │ │ └── MintView02.xaml.cs
│ │ │ ├── InstagramPage.xaml
│ │ │ ├── InstagramPage.xaml.cs
│ │ │ ├── LufthansaPage.xaml
│ │ │ ├── LufthansaPage.xaml.cs
│ │ │ ├── MarriottPage.xaml
│ │ │ ├── MarriottPage.xaml.cs
│ │ │ ├── MintPage.xaml
│ │ │ ├── MintPage.xaml.cs
│ │ │ ├── Models
│ │ │ │ └── InstaPic.cs
│ │ │ ├── REIPage.xaml
│ │ │ ├── REIPage.xaml.cs
│ │ │ └── ViewModels
│ │ │ │ └── DisneyItemViewModel.cs
│ │ ├── CheckboxPage.cs
│ │ ├── CollectionView
│ │ │ ├── Controls
│ │ │ │ ├── EnumPicker.cs
│ │ │ │ ├── FilterData.cs
│ │ │ │ ├── MonkeyDataTemplateSelector.cs
│ │ │ │ ├── SearchTermDataTemplateSelector.cs
│ │ │ │ ├── SpacingModifier.xaml
│ │ │ │ └── SpacingModifier.xaml.cs
│ │ │ ├── Helpers
│ │ │ │ └── IndexParser.cs
│ │ │ ├── Models
│ │ │ │ ├── Animal.cs
│ │ │ │ ├── AnimalGroup.cs
│ │ │ │ └── Monkey.cs
│ │ │ ├── ViewModels
│ │ │ │ ├── AnimalsViewModel.cs
│ │ │ │ ├── GroupedAnimalsViewModel.cs
│ │ │ │ ├── MonkeysViewModel.cs
│ │ │ │ └── MonkeysViewModelWithDelay.cs
│ │ │ └── Views
│ │ │ │ ├── CollectionViewPage.xaml
│ │ │ │ ├── CollectionViewPage.xaml.cs
│ │ │ │ ├── EmptyView
│ │ │ │ ├── EmptyViewDataTemplateSelectorPage.xaml
│ │ │ │ ├── EmptyViewDataTemplateSelectorPage.xaml.cs
│ │ │ │ ├── EmptyViewFilteredPage.xaml
│ │ │ │ ├── EmptyViewFilteredPage.xaml.cs
│ │ │ │ ├── EmptyViewLoadSimulationPage.xaml
│ │ │ │ ├── EmptyViewLoadSimulationPage.xaml.cs
│ │ │ │ ├── EmptyViewNullPage.xaml
│ │ │ │ ├── EmptyViewNullPage.xaml.cs
│ │ │ │ ├── EmptyViewSwapPage.xaml
│ │ │ │ ├── EmptyViewSwapPage.xaml.cs
│ │ │ │ ├── EmptyViewTemplatePage.xaml
│ │ │ │ ├── EmptyViewTemplatePage.xaml.cs
│ │ │ │ ├── EmptyViewWithViewsFilteredPage.xaml
│ │ │ │ └── EmptyViewWithViewsFilteredPage.xaml.cs
│ │ │ │ ├── Grouping
│ │ │ │ ├── VerticalListEmptyGroupsPage.xaml
│ │ │ │ ├── VerticalListEmptyGroupsPage.xaml.cs
│ │ │ │ ├── VerticalListGroupingPage.xaml
│ │ │ │ ├── VerticalListGroupingPage.xaml.cs
│ │ │ │ ├── VerticalListGroupingVariableSizeItemsPage.xaml
│ │ │ │ ├── VerticalListGroupingVariableSizeItemsPage.xaml.cs
│ │ │ │ ├── VerticalListTextGroupingPage.xaml
│ │ │ │ └── VerticalListTextGroupingPage.xaml.cs
│ │ │ │ ├── HeadersAndFooters
│ │ │ │ ├── HorizontalGridHeaderFooterViewPage.xaml
│ │ │ │ ├── HorizontalGridHeaderFooterViewPage.xaml.cs
│ │ │ │ ├── VerticalGridHeaderFooterViewPage.xaml
│ │ │ │ ├── VerticalListHeaderFooterDataTemplatePage.xaml
│ │ │ │ ├── VerticalListHeaderFooterDataTemplatePage.xaml.cs
│ │ │ │ ├── VerticalListHeaderFooterStringPage.xaml
│ │ │ │ ├── VerticalListHeaderFooterStringPage.xaml.cs
│ │ │ │ ├── VerticalListHeaderFooterViewPage.xaml
│ │ │ │ └── VerticalListHeaderFooterViewPage.xaml.cs
│ │ │ │ ├── Layout
│ │ │ │ ├── HorizontalGridPage.xaml
│ │ │ │ ├── HorizontalGridPage.xaml.cs
│ │ │ │ ├── HorizontalGridTextPage.xaml
│ │ │ │ ├── HorizontalGridTextPage.xaml.cs
│ │ │ │ ├── HorizontalListPage.xaml
│ │ │ │ ├── HorizontalListPage.xaml.cs
│ │ │ │ ├── HorizontalListTextPage.xaml
│ │ │ │ ├── HorizontalListTextPage.xaml.cs
│ │ │ │ ├── VerticalGridPage.xaml
│ │ │ │ ├── VerticalGridPage.xaml.cs
│ │ │ │ ├── VerticalGridTextPage.xaml
│ │ │ │ ├── VerticalGridTextPage.xaml.cs
│ │ │ │ ├── VerticalListDataTemplateSelectorPage.xaml
│ │ │ │ ├── VerticalListDataTemplateSelectorPage.xaml.cs
│ │ │ │ ├── VerticalListPage.xaml
│ │ │ │ ├── VerticalListPage.xaml.cs
│ │ │ │ ├── VerticalListRTLPage.xaml
│ │ │ │ ├── VerticalListRTLPage.xaml.cs
│ │ │ │ ├── VerticalListTextPage.xaml
│ │ │ │ └── VerticalListTextPage.xaml.cs
│ │ │ │ ├── PullToRefresh
│ │ │ │ ├── HorizontalGridPullToRefreshPage.xaml
│ │ │ │ ├── HorizontalGridPullToRefreshPage.xaml.cs
│ │ │ │ ├── VerticalListPullToRefreshPage.xaml
│ │ │ │ └── VerticalListPullToRefreshPage.xaml.cs
│ │ │ │ ├── Scrolling
│ │ │ │ ├── IncrementalLoadingPage.xaml
│ │ │ │ ├── IncrementalLoadingPage.xaml.cs
│ │ │ │ ├── ItemsUpdatingScrollModePage.xaml
│ │ │ │ ├── ItemsUpdatingScrollModePage.xaml.cs
│ │ │ │ ├── ScrollToByIndexPage.xaml
│ │ │ │ ├── ScrollToByIndexPage.xaml.cs
│ │ │ │ ├── ScrollToByIndexWithGroupingPage.xaml
│ │ │ │ ├── ScrollToByIndexWithGroupingPage.xaml.cs
│ │ │ │ ├── ScrollToByObjectPage.xaml
│ │ │ │ ├── ScrollToByObjectPage.xaml.cs
│ │ │ │ ├── ScrollToByObjectWithGroupingPage.xaml
│ │ │ │ └── ScrollToByObjectWithGroupingPage.xaml.cs
│ │ │ │ ├── Selection
│ │ │ │ ├── VerticalListMultiplePreSelectionPage.xaml
│ │ │ │ ├── VerticalListMultiplePreSelectionPage.xaml.cs
│ │ │ │ ├── VerticalListMultipleSelectionPage.xaml
│ │ │ │ ├── VerticalListMultipleSelectionPage.xaml.cs
│ │ │ │ ├── VerticalListSelectionColorPage.xaml
│ │ │ │ ├── VerticalListSelectionColorPage.xaml.cs
│ │ │ │ ├── VerticalListSinglePreSelectionPage.xaml
│ │ │ │ ├── VerticalListSinglePreSelectionPage.xaml.cs
│ │ │ │ ├── VerticalListSingleSelectionPage.xaml
│ │ │ │ └── VerticalListSingleSelectionPage.xaml.cs
│ │ │ │ ├── Sizing
│ │ │ │ ├── VerticalListDynamicSizeItemsPage.xaml
│ │ │ │ ├── VerticalListDynamicSizeItemsPage.xaml.cs
│ │ │ │ ├── VerticalListVariableSizeItemsPage.xaml
│ │ │ │ └── VerticalListVariableSizeItemsPage.xaml.cs
│ │ │ │ ├── SnapPoints
│ │ │ │ ├── VerticalListSnapPointsPage.xaml
│ │ │ │ └── VerticalListSnapPointsPage.xaml.cs
│ │ │ │ ├── Spacing
│ │ │ │ ├── HorizontalGridSpacingPage.xaml
│ │ │ │ ├── HorizontalGridSpacingPage.xaml.cs
│ │ │ │ ├── HorizontalListSpacingPage.xaml
│ │ │ │ ├── HorizontalListSpacingPage.xaml.cs
│ │ │ │ ├── VerticalGridSpacingPage.xaml
│ │ │ │ ├── VerticalGridSpacingPage.xaml.cs
│ │ │ │ ├── VerticalListSpacingPage.xaml
│ │ │ │ └── VerticalListSpacingPage.xaml.cs
│ │ │ │ └── Swipe
│ │ │ │ ├── VerticalListSwipeContextItemsPage.xaml
│ │ │ │ └── VerticalListSwipeContextItemsPage.xaml.cs
│ │ ├── ControlPageTemplate.xaml
│ │ ├── ControlPageTemplate.xaml.cs
│ │ ├── DatePickerPage.cs
│ │ ├── EditorPage.cs
│ │ ├── EntryPage.xaml
│ │ ├── EntryPage.xaml.cs
│ │ ├── FramePage.xaml
│ │ ├── FramePage.xaml.cs
│ │ ├── ImagePage.xaml
│ │ ├── ImagePage.xaml.cs
│ │ ├── LabelPage.xaml
│ │ ├── LabelPage.xaml.cs
│ │ ├── MapPage.xaml
│ │ ├── MapPage.xaml.cs
│ │ ├── MonkeyViewCell.xaml
│ │ ├── MonkeyViewCell.xaml.cs
│ │ ├── PickerPage.xaml
│ │ ├── PickerPage.xaml.cs
│ │ ├── ProgressBarPage.xaml
│ │ ├── ProgressBarPage.xaml.cs
│ │ ├── RadioButtonPage.xaml
│ │ ├── RadioButtonPage.xaml.cs
│ │ ├── RefreshViewPage.xaml
│ │ ├── RefreshViewPage.xaml.cs
│ │ ├── SearchBarPage.xaml
│ │ ├── SearchBarPage.xaml.cs
│ │ ├── ShapesPage.xaml
│ │ ├── ShapesPage.xaml.cs
│ │ ├── SliderPage.xaml
│ │ ├── SliderPage.xaml.cs
│ │ ├── StepperPage.xaml
│ │ ├── StepperPage.xaml.cs
│ │ ├── SwitchPage.xaml
│ │ ├── SwitchPage.xaml.cs
│ │ ├── TableView
│ │ │ ├── DataIntentXaml.xaml
│ │ │ ├── DataIntentXaml.xaml.cs
│ │ │ ├── EntryCellDemoXaml.xaml
│ │ │ ├── EntryCellDemoXaml.xaml.cs
│ │ │ ├── FormIntentXaml.xaml
│ │ │ ├── FormIntentXaml.xaml.cs
│ │ │ ├── MenuIntentXaml.xaml
│ │ │ ├── MenuIntentXaml.xaml.cs
│ │ │ ├── SettingsIntentXaml.xaml
│ │ │ ├── SettingsIntentXaml.xaml.cs
│ │ │ ├── SwitchCellDemoXaml.xaml
│ │ │ └── SwitchCellDemoXaml.xaml.cs
│ │ ├── TableViewPage.xaml
│ │ ├── TableViewPage.xaml.cs
│ │ ├── TimePickerPage.xaml
│ │ ├── TimePickerPage.xaml.cs
│ │ ├── VirtualListViewPage.xaml
│ │ ├── VirtualListViewPage.xaml.cs
│ │ ├── WebViewPage.xaml
│ │ └── WebViewPage.xaml.cs
│ ├── ControlsPage.xaml
│ ├── ControlsPage.xaml.cs
│ ├── Features
│ │ ├── Animation
│ │ │ ├── AnimationsPage.xaml
│ │ │ ├── AnimationsPage.xaml.cs
│ │ │ ├── Controls
│ │ │ │ ├── EasingCard.cs
│ │ │ │ └── PickerCell.cs
│ │ │ ├── CustomAnimationPage.xaml
│ │ │ ├── CustomAnimationPage.xaml.cs
│ │ │ ├── EasingEditorPage.xaml
│ │ │ ├── EasingEditorPage.xaml.cs
│ │ │ ├── EasingsPage.xaml
│ │ │ ├── EasingsPage.xaml.cs
│ │ │ ├── Extensions
│ │ │ │ ├── AnimationExtensions.cs
│ │ │ │ └── ExtensionMethods.cs
│ │ │ ├── FadePage.xaml
│ │ │ ├── FadePage.xaml.cs
│ │ │ ├── LayoutToPage.xaml
│ │ │ ├── LayoutToPage.xaml.cs
│ │ │ ├── RotatePage.xaml
│ │ │ ├── RotatePage.xaml.cs
│ │ │ ├── ScalePage.xaml
│ │ │ ├── ScalePage.xaml.cs
│ │ │ ├── TranslatePage.xaml
│ │ │ └── TranslatePage.xaml.cs
│ │ ├── AppThemePage.xaml
│ │ ├── AppThemePage.xaml.cs
│ │ ├── AppThemeViewModel.cs
│ │ ├── BehaviorsPage.xaml
│ │ ├── BehaviorsPage.xaml.cs
│ │ ├── ClippingPage.xaml
│ │ ├── ClippingPage.xaml.cs
│ │ ├── ColorsPage.xaml
│ │ ├── ColorsPage.xaml.cs
│ │ ├── ContextMenuPage.xaml
│ │ ├── ContextMenuPage.xaml.cs
│ │ ├── FontImagePage.xaml
│ │ ├── FontImagePage.xaml.cs
│ │ ├── Gestures
│ │ │ ├── PointerGesturePage.xaml
│ │ │ ├── PointerGesturePage.xaml.cs
│ │ │ ├── TapGesturePage.xaml
│ │ │ └── TapGesturePage.xaml.cs
│ │ ├── GesturesPage.xaml
│ │ ├── GesturesPage.xaml.cs
│ │ ├── HybridWebViewPage.xaml
│ │ ├── HybridWebViewPage.xaml.cs
│ │ ├── IconBox.xaml
│ │ ├── IconBox.xaml.cs
│ │ ├── MenuBarPage.xaml
│ │ ├── MenuBarPage.xaml.cs
│ │ ├── NativeViewsPage.xaml
│ │ ├── NativeViewsPage.xaml.cs
│ │ ├── ShadowPage.xaml
│ │ ├── ShadowPage.xaml.cs
│ │ ├── TodoDataStore.cs
│ │ ├── TodoTask.cs
│ │ ├── TooltipPage.xaml
│ │ ├── TooltipPage.xaml.cs
│ │ ├── TriggersPage.xaml
│ │ └── TriggersPage.xaml.cs
│ ├── FeaturesPage.xaml
│ ├── FeaturesPage.xaml.cs
│ ├── HomePage.xaml
│ ├── HomePage.xaml.cs
│ ├── HomeViewModel.cs
│ ├── Layouts
│ │ ├── AbsoluteLayouts
│ │ │ ├── BouncingTextDemoPage.xaml
│ │ │ ├── BouncingTextDemoPage.xaml.cs
│ │ │ ├── ChessboardDemoPage.xaml
│ │ │ ├── ChessboardDemoPage.xaml.cs
│ │ │ ├── ProportionalCoordinateCalcDemoPage.xaml
│ │ │ ├── ProportionalCoordinateCalcDemoPage.xaml.cs
│ │ │ ├── ProportionalDemoPage.xaml
│ │ │ ├── ProportionalDemoPage.xaml.cs
│ │ │ ├── SimpleOverlayDemoPage.xaml
│ │ │ ├── SimpleOverlayDemoPage.xaml.cs
│ │ │ ├── StylishHeaderDemoPage.xaml
│ │ │ └── StylishHeaderDemoPage.xaml.cs
│ │ ├── Custom
│ │ │ ├── CacadeLayoutPage.xaml
│ │ │ ├── CacadeLayoutPage.xaml.cs
│ │ │ ├── ColumnLayoutPage.xaml
│ │ │ ├── ColumnLayoutPage.xaml.cs
│ │ │ ├── HorizontalWrapLayoutPage.xaml
│ │ │ ├── HorizontalWrapLayoutPage.xaml.cs
│ │ │ └── Layouts
│ │ │ │ ├── CascadeLayout.cs
│ │ │ │ ├── CascadeLayoutManager.cs
│ │ │ │ ├── ColumnLayout.cs
│ │ │ │ ├── ColumnLayoutManager.cs
│ │ │ │ ├── ContentColumnLayout.cs
│ │ │ │ ├── HorizontalWrapLayout.cs
│ │ │ │ └── HorizontalWrapLayoutManager.cs
│ │ ├── Flex
│ │ │ ├── AchievementView.xaml
│ │ │ ├── AchievementView.xaml.cs
│ │ │ ├── AchievementsPage.xaml
│ │ │ ├── AchievementsPage.xaml.cs
│ │ │ ├── AlignmentPage.css
│ │ │ ├── AlignmentPage.xaml
│ │ │ ├── AlignmentPage.xaml.cs
│ │ │ ├── BasisExperimentPage.xaml
│ │ │ ├── BasisExperimentPage.xaml.cs
│ │ │ ├── CatalogItemsPage.xaml
│ │ │ ├── CatalogItemsPage.xaml.cs
│ │ │ ├── CatalogItemsStyles.css
│ │ │ ├── CssCatalogItemsPage.xaml
│ │ │ ├── CssCatalogItemsPage.xaml.cs
│ │ │ ├── EnumPicker.cs
│ │ │ ├── GridPage.xaml
│ │ │ ├── GridPage.xaml.cs
│ │ │ ├── GrowExperimentPage.xaml
│ │ │ ├── GrowExperimentPage.xaml.cs
│ │ │ ├── LoginPage.css
│ │ │ ├── LoginPage.xaml
│ │ │ ├── LoginPage.xaml.cs
│ │ │ ├── PhotoWrappingPage.xaml
│ │ │ ├── PhotoWrappingPage.xaml.cs
│ │ │ ├── PhotosPage.css
│ │ │ ├── PhotosPage.xaml
│ │ │ ├── PhotosPage.xaml.cs
│ │ │ ├── ReadingColumnsPage.xaml
│ │ │ ├── ReadingColumnsPage.xaml.cs
│ │ │ ├── ShowPage.css
│ │ │ ├── ShowPage.xaml
│ │ │ ├── ShowPage.xaml.cs
│ │ │ ├── ShrinkExperimentPage.xaml
│ │ │ ├── ShrinkExperimentPage.xaml.cs
│ │ │ ├── SimpleStackPage.xaml
│ │ │ └── SimpleStackPage.xaml.cs
│ │ ├── Grid
│ │ │ ├── AlignmentGridPage.cs
│ │ │ ├── BasicGridPage.cs
│ │ │ ├── CalculatorPage.cs
│ │ │ ├── KeypadPage.xaml
│ │ │ ├── KeypadPage.xaml.cs
│ │ │ ├── SliderGridPage.cs
│ │ │ └── SpacingGridPage.cs
│ │ ├── MarginPaddingPage.xaml
│ │ ├── MarginPaddingPage.xaml.cs
│ │ └── Stack
│ │ │ ├── AlignmentStackPage.cs
│ │ │ ├── AndExpandPage.xaml
│ │ │ ├── AndExpandPage.xaml.cs
│ │ │ ├── CombinedStackPage.cs
│ │ │ ├── ExpansionStackPage.cs
│ │ │ ├── HorizontalStackPage.cs
│ │ │ ├── SpacingStackPage.cs
│ │ │ └── VerticalStackPage.cs
│ ├── LayoutsPage.xaml
│ ├── LayoutsPage.xaml.cs
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── ProfileReportPage.cs
│ ├── TipsPage.xaml
│ └── TipsPage.xaml.cs
├── Platforms
│ ├── Android
│ │ ├── AndroidManifest.xml
│ │ ├── MainActivity.cs
│ │ ├── MainApplication.cs
│ │ └── Resources
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ ├── MacCatalyst
│ │ ├── AppDelegate.cs
│ │ ├── CursorBehavior.cs
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ └── Program.cs
│ ├── Windows
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Package.appxmanifest
│ │ └── app.manifest
│ └── iOS
│ │ ├── AppDelegate.cs
│ │ ├── Entitlements.plist
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ ├── Program.cs
│ │ └── Resources
│ │ └── LaunchScreen.xib
├── Properties
│ └── launchSettings.json
├── Resources
│ ├── Fonts
│ │ ├── fa_solid.ttf
│ │ ├── fabmdl2.ttf
│ │ ├── opensans_regular.ttf
│ │ └── opensans_semibold.ttf
│ ├── Images
│ │ ├── IMG_0191.JPG
│ │ ├── IMG_0192.JPG
│ │ ├── IMG_0193.JPG
│ │ ├── IMG_0194.JPG
│ │ ├── IMG_0195.JPG
│ │ ├── animated_heart.gif
│ │ ├── cat_1.jpg
│ │ ├── cat_10.jpg
│ │ ├── cat_11.jpg
│ │ ├── cat_12.jpg
│ │ ├── cat_13.jpg
│ │ ├── cat_14.jpg
│ │ ├── cat_15.jpg
│ │ ├── cat_16.jpg
│ │ ├── cat_17.jpg
│ │ ├── cat_18.jpg
│ │ ├── cat_19.jpg
│ │ ├── cat_2.jpg
│ │ ├── cat_3.jpg
│ │ ├── cat_4.jpg
│ │ ├── cat_5.jpg
│ │ ├── cat_6.jpg
│ │ ├── cat_7.jpg
│ │ ├── cat_8.jpg
│ │ ├── cat_9.jpg
│ │ ├── dotnet_bot.svg
│ │ ├── gallery_bar_chart.png
│ │ ├── h01.png
│ │ ├── h02.png
│ │ ├── h03.png
│ │ ├── h04.png
│ │ ├── h05.png
│ │ ├── icon_plane.jpg
│ │ ├── insta_00.jpg
│ │ ├── insta_01.jpg
│ │ ├── insta_02.jpg
│ │ ├── insta_03.jpg
│ │ ├── insta_04.jpg
│ │ ├── logo_lufthansa.jpg
│ │ ├── m_01.jpg
│ │ ├── m_02.jpg
│ │ ├── m_03.png
│ │ ├── m_04.png
│ │ ├── m_05.jpg
│ │ ├── m_06.jpg
│ │ ├── m_07.jpg
│ │ ├── m_08.jpg
│ │ ├── m_09.jpg
│ │ ├── m_10.jpg
│ │ ├── m_11.jpeg
│ │ ├── m_12.jpg
│ │ ├── m_13.jpg
│ │ ├── m_14.jpg
│ │ ├── m_15.jpg
│ │ ├── qr_code.png
│ │ ├── ragnarok.jpg
│ │ ├── seattle.jpg
│ │ └── toolbox
│ │ │ ├── cell_entrycell.png
│ │ │ ├── cell_imagecell.png
│ │ │ ├── cell_switchcell.png
│ │ │ ├── cell_textcell.png
│ │ │ ├── cell_viewcell.png
│ │ │ ├── layout_absolutelayout.png
│ │ │ ├── layout_contentview.png
│ │ │ ├── layout_flexlayout.png
│ │ │ ├── layout_frame.png
│ │ │ ├── layout_grid.png
│ │ │ ├── layout_relativelayout.png
│ │ │ ├── layout_scrollview.png
│ │ │ ├── layout_stacklayout.png
│ │ │ ├── view_activityindicator.png
│ │ │ ├── view_boxview.png
│ │ │ ├── view_button.png
│ │ │ ├── view_datepicker.png
│ │ │ ├── view_editor.png
│ │ │ ├── view_entry.png
│ │ │ ├── view_image.png
│ │ │ ├── view_label.png
│ │ │ ├── view_listview.png
│ │ │ ├── view_map.png
│ │ │ ├── view_picker.png
│ │ │ ├── view_progressbar.png
│ │ │ ├── view_searchbar.png
│ │ │ ├── view_slider.png
│ │ │ ├── view_stepper.png
│ │ │ ├── view_switch.png
│ │ │ ├── view_tableview.png
│ │ │ ├── view_timepicker.png
│ │ │ └── view_webview.png
│ ├── Raw
│ │ └── ReactTodoApp
│ │ │ ├── asset-manifest.json
│ │ │ ├── favicon.ico
│ │ │ ├── index.html
│ │ │ ├── logo192.png
│ │ │ ├── logo512.png
│ │ │ ├── manifest.json
│ │ │ ├── precache-manifest.b5c8ebd82f6bf2f965737bfea11f80df.js
│ │ │ ├── robots.txt
│ │ │ ├── service-worker.js
│ │ │ └── static
│ │ │ ├── css
│ │ │ ├── main.2a9b38db.chunk.css
│ │ │ └── main.2a9b38db.chunk.css.map
│ │ │ └── js
│ │ │ ├── 2.74552d9c.chunk.js
│ │ │ ├── 2.74552d9c.chunk.js.LICENSE.txt
│ │ │ ├── 2.74552d9c.chunk.js.map
│ │ │ ├── main.95b9a31a.chunk.js
│ │ │ ├── main.95b9a31a.chunk.js.map
│ │ │ ├── runtime-main.271f8bd8.js
│ │ │ └── runtime-main.271f8bd8.js.map
│ ├── Styles
│ │ ├── AppColors.cs
│ │ ├── AppStyles.xaml
│ │ ├── Colors.xaml
│ │ ├── Converters.xaml
│ │ ├── DefaultStyles.xaml
│ │ ├── Icons.xaml
│ │ ├── SemanticControls.cs
│ │ ├── Sizes.xaml
│ │ └── Text.xaml
│ ├── appicon.svg
│ ├── appiconfg.svg
│ └── food_01.png
├── Services
│ ├── HotReloadService.cs
│ └── IMediaFolder.cs
└── _usings.cs
├── _global.json
└── _nuget.config
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Control Gallery
2 |
3 | A gallery of [.NET MAUI](https://github.com/dotnet/maui) controls, layouts, and features. I've also included some community libraries.
4 |
5 | 
6 |
--------------------------------------------------------------------------------
/media/catalyst-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidortinau/ControlGallery/bc052b03697c65ebe8b75331f977553d490c179d/media/catalyst-01.png
--------------------------------------------------------------------------------
/media/catalyst-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidortinau/ControlGallery/bc052b03697c65ebe8b75331f977553d490c179d/media/catalyst-02.png
--------------------------------------------------------------------------------
/media/catalyst-03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidortinau/ControlGallery/bc052b03697c65ebe8b75331f977553d490c179d/media/catalyst-03.png
--------------------------------------------------------------------------------
/media/catalyst-04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidortinau/ControlGallery/bc052b03697c65ebe8b75331f977553d490c179d/media/catalyst-04.png
--------------------------------------------------------------------------------
/media/catalyst-05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidortinau/ControlGallery/bc052b03697c65ebe8b75331f977553d490c179d/media/catalyst-05.png
--------------------------------------------------------------------------------
/media/control-gallery-net8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidortinau/ControlGallery/bc052b03697c65ebe8b75331f977553d490c179d/media/control-gallery-net8.png
--------------------------------------------------------------------------------
/media/ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidortinau/ControlGallery/bc052b03697c65ebe8b75331f977553d490c179d/media/ios.png
--------------------------------------------------------------------------------
/media/maui-gallery-catalyst.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidortinau/ControlGallery/bc052b03697c65ebe8b75331f977553d490c179d/media/maui-gallery-catalyst.mp4
--------------------------------------------------------------------------------
/media/maui-p2-gallery.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidortinau/ControlGallery/bc052b03697c65ebe8b75331f977553d490c179d/media/maui-p2-gallery.mp4
--------------------------------------------------------------------------------
/src/ControlGallery/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "dotnet.defaultSolution": "ControlGallery.sln"
3 | }
--------------------------------------------------------------------------------
/src/ControlGallery/App.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/ControlGallery/Common/AbsoluteLayoutExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Microsoft.Maui;
4 | using Microsoft.Maui.Controls;
5 | using Microsoft.Maui.Graphics;
6 | using Microsoft.Maui.Layouts;
7 |
8 | namespace ControlGallery.Common
9 | {
10 |
11 | public static class AbsoluteLayoutExtensions
12 | {
13 | public static void Add(this AbsoluteLayout layout, IView child, Rect bounds, AbsoluteLayoutFlags flags)
14 | {
15 | layout.Add(child);
16 |
17 | layout.SetLayoutBounds(child, bounds);
18 | layout.SetLayoutFlags(child, flags);
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Common/CursorBehavior.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using CommunityToolkit.Maui.Behaviors;
3 |
4 | namespace ControlGallery.Common.Behaviors;
5 |
6 | public partial class CursorBehavior : PlatformBehavior
7 | {
8 | public static readonly BindableProperty AttachBehaviorProperty =
9 | BindableProperty.CreateAttached("AttachBehavior", typeof(bool), typeof(CursorBehavior), false, propertyChanged: OnAttachBehaviorChanged);
10 |
11 | public static bool GetAttachBehavior(BindableObject view)
12 | {
13 | return (bool)view.GetValue(AttachBehaviorProperty);
14 |
15 |
16 | }
17 |
18 | public static void SetAttachBehavior(BindableObject view, bool value)
19 | {
20 | view.SetValue(AttachBehaviorProperty, value);
21 | }
22 |
23 | static void OnAttachBehaviorChanged(BindableObject view, object oldValue, object newValue)
24 | {
25 | var btn = view as Button;
26 | if (btn == null)
27 | {
28 | return;
29 | }
30 |
31 | bool attachBehavior = (bool)newValue;
32 | if (attachBehavior)
33 | {
34 | btn.Behaviors.Add(new CursorBehavior());
35 | }
36 | else
37 | {
38 | var toRemove = btn.Behaviors.FirstOrDefault(b => b is CursorBehavior);
39 | if (toRemove != null)
40 | {
41 | btn.Behaviors.Remove(toRemove);
42 | }
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Common/MarkupView.cs:
--------------------------------------------------------------------------------
1 | using CommunityToolkit.Maui.Markup;
2 | using ControlGallery.Common;
3 |
4 | namespace ControlGallery.Common;
5 |
6 | public class MarkupView : ContentView
7 | {
8 | public MarkupView()
9 | {
10 | Content = new HorizontalStackLayout
11 | {
12 | Children =
13 | {
14 | new Button()
15 | .Text("Button")
16 | .Style("PrimaryButtonOutline")
17 | .ClickGesture(()=>Button_Clicked()),
18 | new Button()
19 | .Text("Button")
20 | .Style("PrimaryButtonOutline")
21 | .ClickGesture(()=>Button_Clicked())
22 | .IsEnabled(false),
23 | }
24 | };
25 | }
26 |
27 | void Button_Clicked()
28 | {
29 | // do click things
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/ControlGallery/Common/Messages/ToggleFlyoutHeaderMsg.cs:
--------------------------------------------------------------------------------
1 |
2 | using CommunityToolkit.Mvvm.Messaging.Messages;
3 |
4 | namespace ControlGallery.Common.Messages;
5 |
6 | public class ToggleFlyoutHeaderMsg : ValueChangedMessage
7 | {
8 | public bool IsVisible {get;set;}
9 |
10 | public ToggleFlyoutHeaderMsg(bool value) : base(value)
11 | {
12 | IsVisible = value;
13 | }
14 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Common/NameOfExtension.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui.Controls;
2 | using Microsoft.Maui.Controls.Xaml;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace ControlGallery.Common
10 | {
11 | public class NameOfExtension : IMarkupExtension
12 | {
13 | public Type Type { get; set; }
14 | public string ProvideValue(IServiceProvider serviceProvider)
15 | {
16 | return nameof(Type);
17 | }
18 |
19 | object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider)
20 | {
21 | return (this as IMarkupExtension).ProvideValue(serviceProvider);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/ControlGallery/Common/Views/FlyoutHeader.xaml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/ControlGallery/Common/Views/FlyoutHeader.xaml.cs:
--------------------------------------------------------------------------------
1 | using CommunityToolkit.Mvvm.Messaging;
2 | using ControlGallery.Common.Messages;
3 |
4 | namespace ControlGallery.Common.Views;
5 |
6 | public partial class FlyoutHeader : Grid
7 | {
8 | public FlyoutHeader()
9 | {
10 | InitializeComponent();
11 |
12 | WeakReferenceMessenger.Default.Register(this, (r, m) =>
13 | {
14 | // this.IsVisible = m.IsVisible;
15 | // this.HeightRequest = m.IsVisible ? 200 : 0;
16 | this.RowDefinitions[0].Height = m.IsVisible ? 120 : 0;
17 |
18 | });
19 | }
20 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Common/Views/FlyoutItem.xaml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/ControlGallery/Common/Views/FlyoutItem.xaml.cs:
--------------------------------------------------------------------------------
1 | using CommunityToolkit.Mvvm.Messaging;
2 | using ControlGallery.Common.Messages;
3 |
4 | namespace ControlGallery.Common.Views;
5 |
6 | public partial class FlyoutItem : Grid
7 | {
8 | private bool isLabelVisible = true;
9 | public bool IsLabelVisible { get => isLabelVisible; set { isLabelVisible = value; OnPropertyChanged(); } }
10 |
11 | public FlyoutItem()
12 | {
13 | InitializeComponent();
14 |
15 | this.BindingContext = this;
16 |
17 | WeakReferenceMessenger.Default.Register(this, (r, m) =>
18 | {
19 | this.ColumnDefinitions[2].Width = m.IsVisible ? GridLength.Star : 0;
20 | IsLabelVisible = m.IsVisible;
21 | });
22 | }
23 | }
--------------------------------------------------------------------------------
/src/ControlGallery/ControlGallery.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.5.002.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlGallery", "ControlGallery.csproj", "{577EB11F-CFB4-4E39-9AB2-1083BF2FDF66}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {577EB11F-CFB4-4E39-9AB2-1083BF2FDF66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {577EB11F-CFB4-4E39-9AB2-1083BF2FDF66}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {577EB11F-CFB4-4E39-9AB2-1083BF2FDF66}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {577EB11F-CFB4-4E39-9AB2-1083BF2FDF66}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {D643742A-3B6A-43A5-899D-C2D8EA34752E}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/src/ControlGallery/Converters/BooleanInverseConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Text;
5 | using Microsoft.Maui.Controls;
6 |
7 | namespace ControlGallery.Converters
8 | {
9 | public class BooleanInverseConverter : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | return !(bool)value;
14 | }
15 |
16 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
17 | {
18 | return !(bool)value;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/ControlGallery/Converters/DoubleToIntConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using Microsoft.Maui.Controls;
4 |
5 | namespace ControlGallery.Converters
6 | {
7 | public class DoubleToIntConverter : IValueConverter
8 | {
9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
10 | {
11 | string strParam = parameter as string;
12 | double multiplier = 1;
13 |
14 | if (!string.IsNullOrEmpty(strParam))
15 | {
16 | Double.TryParse(strParam, out multiplier);
17 | }
18 | return (int)Math.Round((double)value * multiplier);
19 | }
20 |
21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
22 | {
23 | string strParam = parameter as string;
24 | double divider = 1;
25 |
26 | if (!string.IsNullOrEmpty(strParam))
27 | {
28 | Double.TryParse(strParam, out divider);
29 | }
30 |
31 | return (int)value / divider;
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/ControlGallery/Models/BaseViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace ControlGallery.Models;
2 |
3 | public abstract class BaseViewModel : ObservableObject
4 | {
5 | public BaseViewModel() {}
6 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Models/ColorBrush.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Maui;
3 | using Microsoft.Maui.Controls;
4 | using Microsoft.Maui.Graphics;
5 |
6 | namespace ControlGallery.Models
7 | {
8 | public class ColorBrush
9 | {
10 | public string BrushName {get;set;}
11 | public SolidColorBrush Brush {get;set;}
12 | public string BrushValue {
13 |
14 | get {
15 | return Brush.Color.ToHex();
16 | }
17 | }
18 | public ColorBrush()
19 | {
20 |
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Models/NavItem.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui.Controls;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Diagnostics;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace ControlGallery.Models
10 | {
11 | public class NavItem
12 | {
13 | public string Icon { get; set; }
14 | public string Title { get; set; }
15 | public Type Destination { get; set; }
16 | public string Route {get;set;}
17 | public string Description { get; set; }
18 |
19 | public Command NavigateTo { private set; get; }
20 |
21 | public NavItem()
22 | {
23 | NavigateTo = new Command(
24 | async () =>
25 | {
26 | try{
27 | if(string.IsNullOrEmpty(Route))
28 | await Shell.Current.GoToAsync(Destination.Name);
29 | else
30 | await Shell.Current.GoToAsync($"/{Route}");
31 | }catch(Exception ex){
32 | Debug.WriteLine($"Crap: {ex.Message}");
33 | }
34 | });
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/ControlGallery/Models/QuickLink.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui.Controls;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Diagnostics;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace ControlGallery.Models
10 | {
11 | public class QuickLink
12 | {
13 | public string FeaturedImage { get; set; }
14 | public string Hyperlink { get; set; }
15 | public DateTime PublishedDate { get; set; }
16 | public string Title { get; set; }
17 |
18 | public Command NavigateTo { private set; get; }
19 |
20 | public QuickLink()
21 | {
22 | NavigateTo = new Command(
23 | async () =>
24 | {
25 | try{
26 | await Browser.OpenAsync(Hyperlink);
27 | }catch(Exception ex){
28 | Debug.WriteLine($"Crap: {ex.Message}");
29 | }
30 | });
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/BaseContentPage.cs:
--------------------------------------------------------------------------------
1 | using ControlGallery.Services;
2 |
3 | namespace ControlGallery.Pages;
4 |
5 | public abstract class ContentPageBase : ContentPage
6 | {
7 | public ContentPageBase()
8 | {
9 | Build();
10 | }
11 |
12 | protected virtual void Build()
13 | {
14 |
15 | }
16 |
17 | protected override void OnNavigatedTo(NavigatedToEventArgs args)
18 | {
19 | base.OnNavigatedTo(args);
20 |
21 | Build();
22 |
23 | #if DEBUG
24 | HotReloadService.UpdateApplicationEvent += ReloadUI;
25 | #endif
26 | }
27 | protected override void OnNavigatedFrom(NavigatedFromEventArgs args)
28 | {
29 | base.OnNavigatedFrom(args);
30 |
31 | #if DEBUG
32 | HotReloadService.UpdateApplicationEvent -= ReloadUI;
33 | #endif
34 | }
35 |
36 | private void ReloadUI(Type[] obj)
37 | {
38 | MainThread.BeginInvokeOnMainThread(() =>
39 | {
40 | Build();
41 | });
42 | }
43 | }
44 |
45 | public abstract class BaseContentPage : ContentPageBase where T : BaseViewModel
46 | {
47 | protected BaseContentPage(in T viewModel)//, in IAnalyticsService analyticsService, in IMainThread mainThread, in bool shouldUseSafeArea = false
48 | : base() //analyticsService, mainThread, shouldUseSafeArea
49 | {
50 | base.BindingContext = viewModel;
51 | }
52 |
53 | protected new T BindingContext => (T)base.BindingContext;
54 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/ActivityIndicatorPage.cs:
--------------------------------------------------------------------------------
1 | namespace ControlGallery.Pages;
2 |
3 | public class ActivityIndicatorPage : ContentPageBase
4 | {
5 | protected override void Build()
6 | {
7 | this.Title = "ActivityIndicator";
8 |
9 | this.Content = new ScrollView{
10 | Content = new VerticalStackLayout{
11 | Spacing = 12,
12 | Children = {
13 | new H1("Default"),
14 | new Separator(),
15 | new ActivityIndicator
16 | {
17 | IsRunning = true
18 | }
19 | .Start(),
20 |
21 | new H1("Styled"),
22 | new Separator(),
23 | new ActivityIndicator{
24 | IsRunning = true,
25 | Color = AppColors.Cyan300Accent
26 | }
27 | .Start(),
28 | }
29 | }.DynamicResource(VisualElement.StyleProperty, "MainContainer")
30 | };
31 | }
32 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/BoxViewPage.cs:
--------------------------------------------------------------------------------
1 | namespace ControlGallery.Pages;
2 |
3 | public class BoxViewPage : ContentPageBase
4 | {
5 | protected override void Build()
6 | {
7 | this.Title = "BoxViews";
8 |
9 | this.Content = new ScrollView{
10 | Content = new VerticalStackLayout{
11 | Spacing = 12,
12 | Children = {
13 | new H1("100x100"),
14 | new Separator(),
15 | new BoxView{ Color = AppColors.Primary }.Size(100),
16 | }
17 | }.DynamicResource(VisualElement.StyleProperty, "MainContainer")
18 | };
19 | }
20 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/ButtonPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace ControlGallery.Pages;
9 |
10 | public partial class ButtonPage : ContentPage
11 | {
12 | int counter;
13 |
14 | public int Counter
15 | {
16 | get
17 | {
18 | return counter;
19 | }
20 | set
21 | {
22 | counter = value;
23 | OnPropertyChanged();
24 | }
25 | }
26 |
27 | public ButtonPage()
28 | {
29 | InitializeComponent();
30 |
31 | BindingContext = this;
32 | }
33 |
34 | void Button_Clicked(System.Object sender, System.EventArgs e)
35 | {
36 | Counter++;
37 | //ShowCount();
38 | }
39 |
40 | async void ShowCount()
41 | {
42 | CounterLbl.CancelAnimations();
43 | await CounterLbl.FadeTo(1, 200);
44 | await CounterLbl.FadeTo(1, 600);// just to buffer before fade out
45 | await CounterLbl.FadeTo(0, 200);
46 | }
47 |
48 | async void Button_Clicked_1(System.Object sender, System.EventArgs e)
49 | {
50 | try
51 | {
52 | await Shell.Current.GoToAsync(nameof(ProfileReportPage));
53 | }catch(Exception ex)
54 | {
55 | Debug.WriteLine($"Crap: {ex.Message}");
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/CarouselViewPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace ControlGallery.Pages;
2 |
3 | public partial class CarouselViewPage : ContentPage
4 | {
5 | public CarouselViewPage()
6 | {
7 | InitializeComponent();
8 | }
9 |
10 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/Components/MarriottView01.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 |
12 |
13 |
17 |
20 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/Components/MarriottView01.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace CarouselGallery.Views.Components
2 | {
3 | public partial class MarriottView01
4 | {
5 | public MarriottView01()
6 | {
7 | InitializeComponent();
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/Components/MarriottView02.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 |
12 |
13 |
17 |
20 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/Components/MarriottView02.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 |
8 | namespace CarouselGallery.Views.Components
9 | {
10 | public partial class MarriottView02 : ContentView
11 | {
12 | public MarriottView02()
13 | {
14 | InitializeComponent();
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/Components/MintView01.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace CarouselGallery.Views.Components
2 | {
3 | public partial class MintView01
4 | {
5 | public MintView01()
6 | {
7 | InitializeComponent();
8 | }
9 |
10 | private void Button_Clicked(object sender, EventArgs e)
11 | {
12 | Shell.Current.CurrentPage.DisplayAlert("You Did It!",
13 | "Thanks for tapping. There is no activity to see at this time. Have a nice day!",
14 | "Bye!");
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/Components/MintView02.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace CarouselGallery.Views.Components
2 | {
3 | public partial class MintView02
4 | {
5 | public MintView02()
6 | {
7 | InitializeComponent();
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/InstagramPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CarouselGallery.Models;
2 |
3 | namespace ControlGallery.Pages.Controls.CarouselView;
4 | public partial class InstagramPage : ContentPage
5 | {
6 | public InstagramPage()
7 | {
8 | InitializeComponent();
9 | }
10 |
11 | private void cv_CurrentItemChanged(object sender, CurrentItemChangedEventArgs e)
12 | {
13 | Description.Text = (e.CurrentItem as InstaPic).Description;
14 | }
15 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/LufthansaPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace ControlGallery.Pages.Controls.CarouselView;
2 | public partial class LufthansaPage : ContentPage
3 | {
4 | public LufthansaPage()
5 | {
6 | InitializeComponent();
7 | }
8 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/MarriottPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace ControlGallery.Pages.Controls.CarouselView;
2 | public partial class MarriottPage : ContentPage
3 | {
4 | public MarriottPage()
5 | {
6 | InitializeComponent();
7 | }
8 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/MintPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace ControlGallery.Pages.Controls.CarouselView;
2 | public partial class MintPage : ContentPage
3 | {
4 | public MintPage()
5 | {
6 | InitializeComponent();
7 | }
8 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/Models/InstaPic.cs:
--------------------------------------------------------------------------------
1 | namespace CarouselGallery.Models
2 | {
3 | public class InstaPic
4 | {
5 | public string ImageSource { get; set; }
6 | public string Description { get; set; }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/REIPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace ControlGallery.Pages.Controls.CarouselView;
2 | public partial class REIPage : ContentPage
3 | {
4 | public REIPage()
5 | {
6 | InitializeComponent();
7 | }
8 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CarouselView/ViewModels/DisneyItemViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace CarouselGallery.ViewModels;
2 | public partial class DisneyItemViewModel : ObservableObject
3 | {
4 |
5 | [ObservableProperty]
6 | private double _scale;
7 |
8 | public string ImageSource { get; set; }
9 | }
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Controls/EnumPicker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 |
4 |
5 | namespace CollectionViewDemos.Controls
6 | {
7 | class EnumPicker : Picker
8 | {
9 | public static readonly BindableProperty EnumTypeProperty =
10 | BindableProperty.Create(nameof(EnumType), typeof(Type), typeof(EnumPicker),
11 | propertyChanged: (bindable, oldValue, newValue) =>
12 | {
13 | EnumPicker picker = (EnumPicker)bindable;
14 |
15 | if (oldValue != null)
16 | {
17 | picker.ItemsSource = null;
18 | }
19 | if (newValue != null)
20 | {
21 | if (!((Type)newValue).GetTypeInfo().IsEnum)
22 | throw new ArgumentException("EnumPicker: EnumType property must be enumeration type");
23 |
24 | picker.ItemsSource = Enum.GetValues((Type)newValue);
25 | }
26 | });
27 |
28 | public Type EnumType
29 | {
30 | set => SetValue(EnumTypeProperty, value);
31 | get => (Type)GetValue(EnumTypeProperty);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Controls/FilterData.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 | namespace CollectionViewDemos.Controls
4 | {
5 | public class FilterData : BindableObject
6 | {
7 | public static readonly BindableProperty FilterProperty = BindableProperty.Create(nameof(Filter), typeof(string), typeof(FilterData), null);
8 |
9 | public string Filter
10 | {
11 | get { return (string)GetValue(FilterProperty); }
12 | set { SetValue(FilterProperty, value); }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Controls/MonkeyDataTemplateSelector.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.Models;
2 |
3 |
4 | namespace CollectionViewDemos.Controls
5 | {
6 | public class MonkeyDataTemplateSelector : DataTemplateSelector
7 | {
8 | public DataTemplate AmericanMonkey { get; set; }
9 | public DataTemplate OtherMonkey { get; set; }
10 |
11 | protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
12 | {
13 | return ((Monkey)item).Location.Contains("America") ? AmericanMonkey : OtherMonkey;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Controls/SearchTermDataTemplateSelector.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 | namespace CollectionViewDemos.Controls
4 | {
5 | public class SearchTermDataTemplateSelector : DataTemplateSelector
6 | {
7 | public DataTemplate DefaultTemplate { get; set; }
8 | public DataTemplate OtherTemplate { get; set; }
9 |
10 | protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
11 | {
12 | string query = (string)item;
13 | return query.ToLower().Equals("xamarin") ? OtherTemplate : DefaultTemplate;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Controls/SpacingModifier.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 |
9 |
12 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Helpers/IndexParser.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 |
3 | namespace CollectionViewDemos.Helpers
4 | {
5 | public static class IndexParser
6 | {
7 | static int ParseToken(string value)
8 | {
9 | if (!int.TryParse(value, out int index))
10 | {
11 | return -1;
12 | }
13 | return index;
14 | }
15 |
16 | public static bool ParseIndexes(string text, int count, out int[] indexes)
17 | {
18 | indexes = text.Split(',').Select(v => ParseToken(v.Trim())).ToArray();
19 | return indexes.Length == count;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Models/Animal.cs:
--------------------------------------------------------------------------------
1 | namespace CollectionViewDemos.Models
2 | {
3 | public class Animal
4 | {
5 | public string Name { get; set; }
6 | public string Location { get; set; }
7 | public string Details { get; set; }
8 | public string ImageUrl { get; set; }
9 |
10 | public override string ToString()
11 | {
12 | return Name;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Models/AnimalGroup.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace CollectionViewDemos.Models
4 | {
5 | public class AnimalGroup : List
6 | {
7 | public string Name { get; private set; }
8 |
9 | public AnimalGroup(string name, List animals) : base(animals)
10 | {
11 | Name = name;
12 | }
13 |
14 | public override string ToString()
15 | {
16 | return Name;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Models/Monkey.cs:
--------------------------------------------------------------------------------
1 | namespace CollectionViewDemos.Models
2 | {
3 | public class Monkey
4 | {
5 | public string Name { get; set; }
6 | public string Location { get; set; }
7 | public string Details { get; set; }
8 | public string ImageUrl { get; set; }
9 | public bool IsFavorite { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/CollectionViewPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Input;
3 |
4 |
5 | namespace CollectionViewDemos.Views
6 | {
7 | public partial class CollectionViewPage : ContentPage
8 | {
9 | public ICommand NavigateCommand { get; private set; }
10 |
11 | public CollectionViewPage()
12 | {
13 | InitializeComponent();
14 |
15 | NavigateCommand = new Command(
16 | async (Type pageType) =>
17 | {
18 | await Shell.Current.GoToAsync(pageType.Name);
19 | });
20 |
21 | BindingContext = this;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/EmptyView/EmptyViewDataTemplateSelectorPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class EmptyViewDataTemplateSelectorPage : ContentPage
7 | {
8 | public EmptyViewDataTemplateSelectorPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/EmptyView/EmptyViewFilteredPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class EmptyViewFilteredPage : ContentPage
7 | {
8 | public EmptyViewFilteredPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/EmptyView/EmptyViewLoadSimulationPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using CollectionViewDemos.ViewModels;
3 |
4 |
5 | namespace CollectionViewDemos.Views
6 | {
7 | public partial class EmptyViewLoadSimulationPage : ContentPage
8 | {
9 | public EmptyViewLoadSimulationPage()
10 | {
11 | InitializeComponent();
12 | BindingContext = new MonkeysViewModel();
13 | }
14 |
15 | protected override async void OnAppearing()
16 | {
17 | base.OnAppearing();
18 |
19 | await Task.Delay(2000);
20 | collectionView.ItemsSource = (BindingContext as MonkeysViewModel).Monkeys;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/EmptyView/EmptyViewNullPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/EmptyView/EmptyViewNullPage.xaml.cs:
--------------------------------------------------------------------------------
1 |
2 | using CollectionViewDemos.ViewModels;
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class EmptyViewNullPage : ContentPage
7 | {
8 | public EmptyViewNullPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/EmptyView/EmptyViewSwapPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class EmptyViewSwapPage : ContentPage
7 | {
8 | public EmptyViewSwapPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | ToggleEmptyView(false);
13 | }
14 |
15 | void OnEmptyViewSwitchToggled(object sender, ToggledEventArgs e)
16 | {
17 | ToggleEmptyView((sender as Switch).IsToggled);
18 | }
19 |
20 | void ToggleEmptyView(bool isToggled)
21 | {
22 | collectionView.EmptyView = isToggled ? Resources["BasicEmptyView"] : Resources["AdvancedEmptyView"];
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/EmptyView/EmptyViewTemplatePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class EmptyViewTemplatePage : ContentPage
7 | {
8 | public EmptyViewTemplatePage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/EmptyView/EmptyViewWithViewsFilteredPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class EmptyViewWithViewsFilteredPage : ContentPage
7 | {
8 | public EmptyViewWithViewsFilteredPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Grouping/VerticalListEmptyGroupsPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListEmptyGroupsPage : ContentPage
7 | {
8 | public VerticalListEmptyGroupsPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new GroupedAnimalsViewModel(true);
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Grouping/VerticalListGroupingPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListGroupingPage : ContentPage
7 | {
8 | public VerticalListGroupingPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new GroupedAnimalsViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Grouping/VerticalListGroupingVariableSizeItemsPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListGroupingVariableSizeItemsPage : ContentPage
7 | {
8 | public VerticalListGroupingVariableSizeItemsPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new GroupedAnimalsViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Grouping/VerticalListTextGroupingPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Grouping/VerticalListTextGroupingPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListTextGroupingPage : ContentPage
7 | {
8 | public VerticalListTextGroupingPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new GroupedAnimalsViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/HeadersAndFooters/HorizontalGridHeaderFooterViewPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class HorizontalGridHeaderFooterViewPage : ContentPage
7 | {
8 | public HorizontalGridHeaderFooterViewPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/HeadersAndFooters/VerticalListHeaderFooterDataTemplatePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListHeaderFooterDataTemplatePage : ContentPage
7 | {
8 | public VerticalListHeaderFooterDataTemplatePage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/HeadersAndFooters/VerticalListHeaderFooterStringPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListHeaderFooterStringPage : ContentPage
7 | {
8 | public VerticalListHeaderFooterStringPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/HeadersAndFooters/VerticalListHeaderFooterViewPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListHeaderFooterViewPage : ContentPage
7 | {
8 | public VerticalListHeaderFooterViewPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Layout/HorizontalGridPage.xaml.cs:
--------------------------------------------------------------------------------
1 |
2 | using CollectionViewDemos.ViewModels;
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class HorizontalGridPage : ContentPage
7 | {
8 | public HorizontalGridPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Layout/HorizontalGridTextPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 |
5 |
6 | namespace CollectionViewDemos.Views
7 | {
8 | public partial class HorizontalGridTextPage : ContentPage
9 | {
10 | public HorizontalGridTextPage()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Layout/HorizontalListPage.xaml.cs:
--------------------------------------------------------------------------------
1 |
2 | using CollectionViewDemos.ViewModels;
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class HorizontalListPage : ContentPage
7 | {
8 | public HorizontalListPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Layout/HorizontalListTextPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 |
5 |
6 | namespace CollectionViewDemos.Views
7 | {
8 | public partial class HorizontalListTextPage : ContentPage
9 | {
10 | public HorizontalListTextPage()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Layout/VerticalGridPage.xaml.cs:
--------------------------------------------------------------------------------
1 |
2 | using CollectionViewDemos.ViewModels;
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalGridPage : ContentPage
7 | {
8 | public VerticalGridPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Layout/VerticalGridTextPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 |
5 |
6 | namespace CollectionViewDemos.Views
7 | {
8 | public partial class VerticalGridTextPage : ContentPage
9 | {
10 | public VerticalGridTextPage()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Layout/VerticalListDataTemplateSelectorPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListDataTemplateSelectorPage : ContentPage
7 | {
8 | public VerticalListDataTemplateSelectorPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Layout/VerticalListPage.xaml.cs:
--------------------------------------------------------------------------------
1 |
2 | using CollectionViewDemos.ViewModels;
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListPage : ContentPage
7 | {
8 | public VerticalListPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Layout/VerticalListRTLPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListRTLPage : ContentPage
7 | {
8 | public VerticalListRTLPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Layout/VerticalListTextPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListTextPage : ContentPage
7 | {
8 | public VerticalListTextPage()
9 | {
10 | InitializeComponent();
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/PullToRefresh/HorizontalGridPullToRefreshPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class HorizontalGridPullToRefreshPage : ContentPage
7 | {
8 | public HorizontalGridPullToRefreshPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new AnimalsViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/PullToRefresh/VerticalListPullToRefreshPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListPullToRefreshPage : ContentPage
7 | {
8 | public VerticalListPullToRefreshPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new AnimalsViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Scrolling/IncrementalLoadingPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using CollectionViewDemos.ViewModels;
3 |
4 |
5 | namespace CollectionViewDemos.Views
6 | {
7 | public partial class IncrementalLoadingPage : ContentPage
8 | {
9 | public IncrementalLoadingPage()
10 | {
11 | InitializeComponent();
12 | BindingContext = new AnimalsViewModel();
13 | }
14 |
15 | void OnCollectionViewRemainingItemsThresholdReached(object sender, EventArgs e)
16 | {
17 | // Retrieve more data here, or via the RemainingItemsThresholdReachedCommand.
18 | // This sample retrieves more data using the RemainingItemsThresholdReachedCommand.
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Scrolling/ItemsUpdatingScrollModePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.Controls;
2 | using CollectionViewDemos.ViewModels;
3 | using System;
4 |
5 |
6 | namespace CollectionViewDemos.Views
7 | {
8 | public partial class ItemsUpdatingScrollModePage : ContentPage
9 | {
10 | public ItemsUpdatingScrollModePage()
11 | {
12 | InitializeComponent();
13 | BindingContext = new MonkeysViewModelWithDelay();
14 | }
15 |
16 | void OnItemsUpdatingScrollModeChanged(object sender, EventArgs e)
17 | {
18 | collectionView.ItemsUpdatingScrollMode = (ItemsUpdatingScrollMode)(sender as EnumPicker).SelectedItem;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Scrolling/ScrollToByIndexPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | using CollectionViewDemos.ViewModels;
5 |
6 | namespace CollectionViewDemos.Views
7 | {
8 | public partial class ScrollToByIndexPage : ContentPage
9 | {
10 | public ScrollToByIndexPage()
11 | {
12 | InitializeComponent();
13 | BindingContext = new MonkeysViewModel();
14 | }
15 |
16 | void OnButtonClicked(object sender, EventArgs e)
17 | {
18 | collectionView.ScrollTo(12, position: (ScrollToPosition)enumPicker.SelectedItem, animate: animateSwitch.IsToggled);
19 | }
20 |
21 | void OnCollectionViewScrolled(object sender, ItemsViewScrolledEventArgs e)
22 | {
23 | Debug.WriteLine("HorizontalDelta: " + e.HorizontalDelta);
24 | Debug.WriteLine("VerticalDelta: " + e.VerticalDelta);
25 | Debug.WriteLine("HorizontalOffset: " + e.HorizontalOffset);
26 | Debug.WriteLine("VerticalOffset: " + e.VerticalOffset);
27 | Debug.WriteLine("FirstVisibleItemIndex: " + e.FirstVisibleItemIndex);
28 | Debug.WriteLine("CenterItemIndex: " + e.CenterItemIndex);
29 | Debug.WriteLine("LastVisibleItemIndex: " + e.LastVisibleItemIndex);
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Selection/VerticalListMultiplePreSelectionPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListMultiplePreSelectionPage : ContentPage
7 | {
8 | public VerticalListMultiplePreSelectionPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Selection/VerticalListSelectionColorPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using CollectionViewDemos.ViewModels;
2 |
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListSelectionColorPage : ContentPage
7 | {
8 | public VerticalListSelectionColorPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Selection/VerticalListSinglePreSelectionPage.xaml.cs:
--------------------------------------------------------------------------------
1 |
2 | using CollectionViewDemos.ViewModels;
3 |
4 | namespace CollectionViewDemos.Views
5 | {
6 | public partial class VerticalListSinglePreSelectionPage : ContentPage
7 | {
8 | public VerticalListSinglePreSelectionPage()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MonkeysViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/ControlGallery/Pages/Controls/CollectionView/Views/Selection/VerticalListSingleSelectionPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using CollectionViewDemos.Models;
4 | using CollectionViewDemos.ViewModels;
5 |
6 |
7 | namespace CollectionViewDemos.Views
8 | {
9 | public partial class VerticalListSingleSelectionPage : ContentPage
10 | {
11 | public VerticalListSingleSelectionPage()
12 | {
13 | InitializeComponent();
14 | BindingContext = new MonkeysViewModel();
15 | UpdateSelectionData(Enumerable.Empty(), Enumerable.Empty());
16 | }
17 |
18 | void OnCollectionViewSelectionChanged(object sender, SelectionChangedEventArgs e)
19 | {
20 | UpdateSelectionData(e.PreviousSelection, e.CurrentSelection);
21 | }
22 |
23 | void UpdateSelectionData(IEnumerable