csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
2.0 KiB
47 lines
2.0 KiB
using System;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
|
|
namespace ControlCatalog.Pages
|
|
{
|
|
public partial class PipsPagerPage : UserControl
|
|
{
|
|
private static readonly (string Group, string Title, string Description, Func<UserControl> Factory)[] Demos =
|
|
{
|
|
("Getting Started", "First Look",
|
|
"Default PipsPager with horizontal and vertical orientation, with and without navigation buttons.",
|
|
() => new PipsPagerGettingStartedPage()),
|
|
|
|
("Features", "Carousel Integration",
|
|
"Bind SelectedPageIndex to a Carousel's SelectedIndex for two-way synchronized page navigation.",
|
|
() => new PipsPagerCarouselPage()),
|
|
("Features", "Large Collections",
|
|
"Use MaxVisiblePips to limit visible indicators when the page count is large. Pips scroll automatically.",
|
|
() => new PipsPagerLargeCollectionPage()),
|
|
("Features", "Events",
|
|
"Monitor SelectedPageIndex changes to react to user navigation.",
|
|
() => new PipsPagerEventsPage()),
|
|
|
|
("Appearance", "Custom Colors",
|
|
"Override pip indicator colors using resource keys for normal, selected, and hover states.",
|
|
() => new PipsPagerCustomColorsPage()),
|
|
("Appearance", "Custom Buttons",
|
|
"Replace the default chevron navigation buttons with custom styled buttons.",
|
|
() => new PipsPagerCustomButtonsPage()),
|
|
("Appearance", "Custom Templates",
|
|
"Override pip item templates to create squares, pills, numbers, or any custom shape.",
|
|
() => new PipsPagerCustomTemplatesPage()),
|
|
};
|
|
|
|
public PipsPagerPage()
|
|
{
|
|
InitializeComponent();
|
|
Loaded += OnLoaded;
|
|
}
|
|
|
|
private async void OnLoaded(object? sender, RoutedEventArgs e)
|
|
{
|
|
await SampleNav.PushAsync(NavigationDemoHelper.CreateGalleryHomePage(SampleNav, Demos), null);
|
|
}
|
|
}
|
|
}
|
|
|