HandyOrg / HandyOrg/HandyControl

Bug 动态切换主题后,Carousel的PageIndex未更新

Open
#1,744 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
7.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Carousel控件UpdateItemsPosition()方法:动态切换主题时,Items.Count>0,但PageIndex未更新,闪退

Steps to reproduce the bug

动态切换主题后,当Items.Count=1,此时PageIndex并未更新,依然为-1,闪退,临时方案:额外的检查Items.Count大于0时:PageIndex = PageIndex < 0 ? 0 : PageIndex;

Expected behavior

No response

Screenshots

No response

NuGet package version

None

IDE

No response

Framework type

No response

Windows version

No response

Additional context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Carousel control's UpdateItemsPosition() method and inspect how PageIndex is handled when Items.Count is greater than zero. Reproduce the dynamic theme switch with one item, then verify that PageIndex is updated from -1 and the Carousel no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.