Skip to content

fix: CalendarDatePicker icon disappears when multiple instances are used#1452

Merged
pomianowski merged 2 commits intolepoco:mainfrom
jbryknar:feature/1399-CalendarDatePicker_icon_disappears_multiple_instances
Jun 16, 2025
Merged

fix: CalendarDatePicker icon disappears when multiple instances are used#1452
pomianowski merged 2 commits intolepoco:mainfrom
jbryknar:feature/1399-CalendarDatePicker_icon_disappears_multiple_instances

Conversation

@jbryknar
Copy link
Copy Markdown
Collaborator

@jbryknar jbryknar commented Jun 13, 2025

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

The original behaviour is described in the following issue:
Issue Number: #1399

What is the new behavior?

Each CalendarDatePicker control now receives its own unique SymbolIcon instance instead of sharing a single icon instance across all controls. This resolves an issue where previously rendered CalendarDatePicker icons would disappear when additional instances were added to the same view.

This behavior is achieved by marking the SymbolIcon resource with x:Shared="False" in the ResourceDictionary, ensuring that WPF creates a new instance of the icon for each usage. This prevents shared PathGeometry objects from being reused in the visual tree, eliminating rendering conflicts and ensuring all icons display correctly.

CalednarDatePicker_AfterFix

Other information

@jbryknar jbryknar requested a review from pomianowski as a code owner June 13, 2025 11:07
@github-actions github-actions Bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request release labels Jun 13, 2025
@pomianowski pomianowski changed the title Fix CalendarDatePicker icon disappears when multiple instances are used fix: CalendarDatePicker icon disappears when multiple instances are used Jun 16, 2025
@pomianowski pomianowski self-assigned this Jun 16, 2025
@pomianowski pomianowski merged commit 34c5392 into lepoco:main Jun 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. PR Pull request release styles Topic is related to styles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants