displaying-slider-index

Installation
SKILL.md

WPF Slider 0-based Index Display Pattern

Problem Scenario

When displaying collection indices with a slider, internally using 0-based index but displaying as 1-based to users is a common requirement.

Symptoms

  • 120 images exist but displayed as "0 / 120" ~ "119 / 120"
  • Users expect "1 / 120" ~ "120 / 120"
  • Dragging slider to the end doesn't reach the last item

Cause

  • If slider's Maximum is set to TotalCount, it exceeds the valid range
  • Displaying 0-based index directly confuses users

Solution

Related skills

More from christian289/dotnet-with-claudecode

Installs
3
GitHub Stars
31
First Seen
Feb 28, 2026