Commit Graph

210 Commits

Author SHA1 Message Date
chinboy 34d525a885 fix(Drawer): optimize dialog size handling by replacing style configuration with token bindings 2026-04-22 10:08:06 +08:00
chinboy d0f2470eeb fix(Space): optimize spacing handling by applying token bindings instead of styles 2026-04-22 09:26:58 +08:00
chinboy 4020ab36e3 fix(AvatarGroup, CompactSpace, Space): optimize collection handling by removing unnecessary list creation 2026-04-22 08:24:25 +08:00
chinboy cc9665e781 fix(SpinIndicator): add CustomIndicatorSize property and update related styles 2026-04-21 21:08:28 +08:00
chinboy b8fb9cd056 fix(NavMenu): optimize item retrieval by avoiding unnecessary list conversion 2026-04-21 18:38:23 +08:00
chinboy 7980b70319 fix: simplify visibility subscription logic by introducing SubscribeAncestorIsVisible method 2026-04-21 17:59:30 +08:00
chinboy a002397dcc fix(LineEdit): enhance right content bindings and improve layout efficiency 2026-04-21 16:51:45 +08:00
chinboy 7b0d636e50 fix(AddOnDecoratedBox): implement status foreground and icon brush properties to enhance visual feedback 2026-04-21 13:52:29 +08:00
chinboy 79305e7122 fix(BaseTabStrip, CardTabStrip, BaseTabControl, CardTabControl): refactor binding management to eliminate memory leaks and improve performance 2026-04-21 13:52:29 +08:00
chinboy a47fd6e097 fix(OverlayDialogHeader): ensure disposables are properly disposed and reset on visual tree attachment/detachment 2026-04-21 13:52:29 +08:00
chinboy b7fb6c6740 fix(WindowTitleBar): ensure disposables are properly disposed and reset on visual tree attachment/detachment 2026-04-21 13:52:29 +08:00
chinboy 31eff3e495 fix(MemoryLeakPatterns): update documentation to clarify static constructor subscription patterns and their impact on memory management 2026-04-21 13:52:29 +08:00
chinboy 0069f95f81 fix(AddOnDecoratedBox): add Underlined pseudo-class and update style selectors to prevent memory leaks 2026-04-21 13:52:29 +08:00
chinboy 4809883503 fix(GradientColorSlider): replace global Property.Changed.Subscribe with instance-level GetObservable and remove redundant subscription 2026-04-21 13:52:29 +08:00
chinboy 49165bf572 fix(TimePickerPresenter): replace global Property.Changed.Subscribe with instance-level GetObservable to fix LightweightSubject memory leak 2026-04-21 13:52:29 +08:00
chinboy 614832839e fix(DatePickerPresenter): replace global Property.Changed.Subscribe with instance-level GetObservable to fix LightweightSubject memory leak 2026-04-21 13:52:29 +08:00
chinboy b32fd8f8ee fix(FlyoutStateHelper): replace global Property.Changed.Subscribe with instance-level GetObservable to fix LightweightSubject memory leak 2026-04-21 13:52:29 +08:00
chinboy 61f33a6869 docs: update Transitions refactoring plan - all 76 controls complete (76/76) 2026-04-20 15:25:27 +08:00
chinboy a51e00988c docs: mark Batch 4 Part C controls as completed in table (70/76) 2026-04-20 14:27:10 +08:00
chinboy 672c1673da docs: update Transitions refactoring plan - Batch 4 Part C complete (68/76) 2026-04-20 13:57:51 +08:00
chinboy 9ef731e46b docs: mark Batch 3 controls as completed in table 2026-04-20 10:50:55 +08:00
chinboy acd6e444b7 docs: update Transitions refactoring plan - Batch 3 complete (53/76) 2026-04-20 10:47:17 +08:00
chinboy d29cfa2154 refactor(Spin): migrate AbstractSpin transitions to XAML theme 2026-04-19 22:39:30 +08:00
chinboy 8a694ba36a refactor(ProgressBar): migrate AbstractProgressBar transitions to XAML theme 2026-04-19 22:37:21 +08:00
chinboy cb129f5d4f fix(Switch): migrate SwitchKnob transitions to XAML and fix animation on pointer release
- Move SwitchKnob transitions from C# code to XAML theme using style selector
- Remove ConfigureTransitions, OnLoaded/OnUnloaded lifecycle management
- Fix Switch animation not smoothly transitioning back to circle on pointer release by deferring KnobSize update
- Move PixelPointTransition and RectTransition to Animations/Transitions directory
- Update TransitionsRefactoringPlan.md progress tracking
2026-04-19 22:15:45 +08:00
chinboy f9c8ffb4ce refactor: migrate AbstractScrollViewer Transitions to XAML theme 2026-04-19 20:08:20 +08:00
chinboy 4484f8f9d0 refactor: migrate AbstractScrollBarThumb Transitions to XAML theme 2026-04-19 20:02:50 +08:00
chinboy 9d68863ab0 docs: add Transitions refactoring plan 2026-04-19 19:54:56 +08:00
chinboy d640f2c332 refactor(AddOnDecoratedBox): optimize input control theme structure for performance
Remove code-behind theme classes, consolidate theme definitions into ResourceDictionary format,
add TransitionProvider and SharedTokenResourceValue infrastructure, and remove redundant styles.
2026-04-19 15:51:21 +08:00
chinboy 50ac96478e fix: Improve layout form configuration by adding proper disposal of PropertyChanged subscriptions 2026-04-18 17:59:46 +08:00
chinboy ef5baea0f1 fix: Change IList<double>? to IReadOnlyList<double>? for strokeDashArray in multiple files 2026-04-18 09:55:52 +08:00
chinboy 4f134f3592 fix: Change ButtonTheme.DashedStyle to IReadOnlyList to prevent modification 2026-04-18 09:28:54 +08:00
chinboy 968ffaad13 fix: Ensure proper disposal of CancellationTokenSource in AbstractSpinIndicator, SwitchKnob, and WaveSpiritDecorator 2026-04-18 09:09:01 +08:00
chinboy ce7bc9cf1a fix: AbstractMarqueeLabel 统一 Cancel + Dispose 模式 2026-04-18 08:59:05 +08:00
chinboy 27295dd934 fix: ColorPickerHelpers.CreateBitmapFromPixelData 修正 XML doc,更新文档删除 4.2 2026-04-18 08:49:44 +08:00
chinboy 562e3bf3b3 fix: AbstractQRCode/PreviewImageSource/AbstractImagePreviewer Bitmap 释放,更新文档
- AbstractQRCode: SetupQRCode 加 Value 空值守卫,oldBitmap?.Dispose(),Bitmap? 可空,switch expression 替换 TryParse,移除 using static System.Enum
- PreviewImageSource: 实现 IDisposable
- AbstractImagePreviewer: HandleSourceChanged 替换 EffectiveSources 时 Dispose 旧列表
2026-04-18 08:41:53 +08:00
chinboy 0cebcc8c3d fix: Badge Adorner CTS 补加 Dispose,新增 OnDetachedFromVisualTree 清理,更新文档删除 P4 2026-04-18 00:23:56 +08:00
chinboy 6ba0b2696a fix: FileUploadScheduler CancelUploadAsync 补加 CTS Dispose,更新文档删除 P11 2026-04-18 00:17:36 +08:00
chinboy d73bcce17c docs: 删除已修复条目(6.1 Watermark/6.2 Timer/P8 Space),更新 4.1/4.5/4.6 问题描述 2026-04-18 00:15:55 +08:00
chinboy c2d4c10124 fix: 修复 2.1 - NotificationCard/NavMenuItem 缺少 OnDetachedFromVisualTree,更新文档 2026-04-17 22:08:05 +08:00
chinboy 01f96947ac fix: 修复资源泄漏 - CTS/Timer/Bitmap/事件订阅清理
- ToolTipService: StopTimer() 补加 Tick -= 解订阅
- CarouselPageIndicator: CTS Cancel 后补加 Dispose
- VirtualizingCarouselPanel: _transition CTS 取消分支和 TransitionFinished 均补加 Dispose
- Dialog: _frameCancellationTokenSource Cancel 后补加 Dispose
- Form: Validate()/Submit() 两处 _validationTokenSource Cancel 后补加 Dispose
- FormItem: _validationTokenSource Cancel 后补加 Dispose
- DataGrid: OnDetachedFromVisualTree 解除 pagination 事件订阅,OnAttachedToVisualTree 重新订阅(支持 re-attach)
- ColorSpectrum: 新增 OnDetachedFromVisualTree 释放 9 个 Bitmap 字段,OnAttachedToVisualTree re-attach 后重建
- ColorSlider: 新增 OnDetachedFromVisualTree 释放 _backgroundBitmap(re-attach 后由 BoundsProperty 变化自动重建)
2026-04-17 21:48:08 +08:00
chinboy 12f2e9252d fix: AbstractBackTopFloatButton add OnDetachedFromVisualTree cleanup
- OnAttachedToVisualTree: re-subscribe Target.ScrollChanged with
  idempotent -= before += to handle re-attach correctly
- OnDetachedFromVisualTree: unsubscribe ScrollChanged, Cancel+Dispose
  _cancellationTokenSource (does not clear Target to support re-attach)
- OnClick: Dispose old CTS before creating new one
2026-04-17 19:10:58 +08:00
chinboy bd85cc0099 docs: clean up AtomUI_issues.md, remove all fixed items 2026-04-17 17:22:07 +08:00
chinboy 516cd74f7e fix: add OnDetachedFromVisualTree cleanup to multiple controls
- MotionGhostControl: unsubscribe SizeChanged and reset _layout/
  _maskCenterFrame to null, enabling correct re-initialization on
  re-attach when Content changes while detached
- GradientColorPickerTrack: clear thumbs from LogicalChildren/
  VisualChildren on detach, preventing stale thumbs on re-attach
  when GradientValue becomes null while detached
- CollapseItem: reset InAnimating flag on detach, preventing the
  control from being stuck in animating state after re-attach
- RangeInfoPickerInput: clear _topLevel reference on detach to
  prevent holding a stale TopLevel (window) reference
- TreeViewItem: clear OwnerTreeView on detach to prevent stale
  tree operations during detached period and avoid GC retention
- Card: simplify delegate instantiation style (cosmetic only)

Partially addresses issue 2.1 in docs/Issues/AtomUI_issues.md.
Remaining: AbstractBackTopFloatButtonHost, PopupConfirm,
NotificationCard, NavMenuItem, Collapse, Card token scope.
2026-04-17 17:08:55 +08:00
chinboy 6d41a4e2b3 docs: mark issue 1.4 FloatButtonGroupHost lambda as already fixed
The code was already using named methods (OnFloatButtonGroupOpenRequest/
OnFloatButtonGroupCloseRequest) with CompositeDisposable cleanup.
Update tracking doc to reflect actual state.
2026-04-17 15:50:14 +08:00
chinboy cf9a1b5a28 fix: replace lambda with named method in GroupDescription constructors to avoid closure allocation
- AbstractListGroupDescription: lambda -> OnGroupKeysCollectionChanged
- DataGridGroupDescription: lambda -> OnGroupKeysCollectionChanged
- Eliminates closure object that captures 'this', preventing potential
  self-referencing GC issue (GroupKeys.CollectionChanged holds delegate
  -> delegate captures 'this' -> 'this' owns GroupKeys)
- Update issue tracking doc: mark 1.3 as fixed (P9 done)
2026-04-17 15:48:56 +08:00
chinboy 0af89b8de6 fix(1.2): eliminate lambda closures in WindowNotificationManager.Show()
- Add OnClick/OnClose internal properties to NotificationCard to carry
  per-notification callbacks without capturing local variables
- Replace PointerPressed lambda with static OnNotificationPointerPressed
  (zero closure allocation, reads callback from card.OnClick)
- Replace NotificationClosed lambda with instance OnNotificationClosed
  (accesses _items via 'this', no local variable capture)
- Update AtomUI_issues.md: mark 1.2 as fixed, remove from P8 list
2026-04-17 15:08:39 +08:00
chinboy f5ba2e4ebe fix(1.1): remove Closed += lambda closures in MessageBox/Dialog static APIs
Modal methods (ShowMessageBoxModalAsync, ShowMessageModalAsync,
ShowDialogModalAsync x2): OpenAsync() awaits dialog close, so cleanup
is moved after await tsc.Task — no Closed subscription needed.

Non-modal methods (ShowMessageBoxAsync, ShowMessageAsync,
ShowDialogAsync x2): OpenAsync() returns after dialog is shown, so
Closed lambda is retained as the only close notification point.
The lambda is harmless: Closed fires exactly once, dialog is removed
from parent and GC'd immediately after, releasing the closure.

- Update AtomUI_issues.md: mark 1.1 as fixed, remove from P3 list
- Delete performance_memory_leak.md (tracking moved to AtomUI_issues.md)
2026-04-17 15:01:37 +08:00
chinboy ad6a346c30 fix(3.2): prevent memory leaks in DataGridCell by managing event subscriptions - dispose old subscriptions in OnApplyTemplate to avoid accumulation - release subscriptions in OnDetachedFromVisualTree 2026-04-17 13:55:01 +08:00
chinboy 7f3ab08fd4 docs(3.3): mark ColorPicker complex state management as fixed - Update progress to 34/39 (87.2%) - Mark 3.3 ColorPicker OnApplyTemplate event subscription as fixed - ColorPickerInput, AbstractColorPickerView, ColorSliderThumb all use named handlers with remove-before-add pattern - Remove 3.3 from P2 pending list - Medium: 17/19 fixed 2026-04-17 13:24:51 +08:00