PageControl

Display and change the current position in a paged collection.

PageControl renders the familiar row of page dots. Bind it to the same count and current index that drive a carousel or pager.

var pages = new PageControl
{
    Count = viewModel.Items.Count,
    HidesForSinglePage = true,
    AllowsScrubbing = true,
    Current = Bind(vm => vm.CurrentIndex)
        .TwoWay((vm, val) => vm.CurrentIndex = val)
};

Count is the number of pages and Current is the zero-based selected page. PageChanged receives a new index when someone interacts with the control.

HidesForSinglePage removes visual noise when fewer than two pages exist. AllowsScrubbing lets people drag across the dots to move through pages. Disable scrubbing when changing pages triggers expensive loading or when the dots are status-only.

DotColor and CurrentDotColor customize inactive and active dots. Preserve sufficient contrast in both appearances, or leave the colors unset to use the system defaults.

The page control does not move content itself. In a two-way setup, its new Current value should update the collection position, and collection scrolling should update Current in return.