* ControlCatalog - Side bar improvements
* adjust side bar icon to adapt with side bar size
* update sidebar colors
* add custom title bar decorations to control catalog
* share view code between home page and section page
* improve side bar selection state visual
* drop custom search bar in title decorations
* feat: Add IsVisible to TableViewColumn
* test: Add TableView IsVisible tests
* feat: Add option to hide a column in the ControlCatalog
* chore: Remove unnecessary remark from property
* docs: An other xml comment cleanup
* fix: Use NaN as a sign that the width is reset and needs recalculation
Also, set the ActualWidth of a hidden column to 0
* chore: Add a comment explaining what NaN means for columns ActualSize
* add page navigation using generic type
* add tests
* add default impl to INavigation api
* fix nullable errors
* update api diff
* addressed comment
* update api
* move page externsion to own class
* make parameter overload non-optional
* Add AttachedPropertyAttribute, DirectPropertyAttribute and StyledPropertyAttribute attribtues
* Add shared GeneratedPropertyShape
* Move AvaloniaPropertyAnalyzer ids to DiagnosticIds
* Add generated properties analyzer descriptors
* Implement GeneratedPropertyAnalyzer
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Implement GeneratedProperty code fixers
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Update solution files with new projects
* Enable new diagnostics on Avalonia code itself
* Fix VB project
* Implement actual PropertyGenEmitter
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Replace several manual property declarations in ControlCatalog with new source gen
* Implement basic ConvertToGeneratedProperty analyzer, without code-fixer
* Lower supported C# version to 13
* Misc
* Add AvaloniaPropertyGeneratorIsEnabled msbuild prop
* Fix SetCurrentValue warning
* Use RegisterSyntaxNodeAction instead of RegisterOperationAction for new analyzer
* Fix some of the new CodeFix tests
* Support AddOwner to other generated properties
* Remove `AllowMultiple = false`, it's implied by default
* Remove ChangedMethodName
* Rename new attributes with "Generated" prefix
* Misc improvements
* Enable nullable per each property
* Switch to #nullable enable annotations to not break warnings
* Do not enforce partial callbacks, instead use existing warning if method is missing or incorrect
* Support callbacks defined in the base class
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
* ControlCatalog: add dashboard home page with animated hero and nav cards
A new Home page (first in the drawer) modeled on the Accelerate demo
dashboard: a gradient hero banner with floating control glyphs animated
via keyframed TranslateTransforms, followed by categorized card sections
for every catalog page. Cards carry an icon badge, title and one-line
description, and clicking one navigates via SelectedPageIndex so the
drawer selection stays in sync. PageItem gains Description/Category and
the view model exposes grouped HomeSections plus NavigateToPageCommand.
Card colors are self-contained theme dictionaries so the page works
across Fluent/Fluent2/Simple in both variants.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* ControlCatalog: use the Accelerate demo hero banner verbatim on the home page
Replaces the gradient/glyph hero with a 1:1 copy of AvaloniaProDemo's
DashboardView banner: banner-bg backdrop, the four 3D logos floating at
the original positions/durations, and the centered Avalonia wordmark.
Assets copied from the Accelerate repo (~4.8 MB of PNGs).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* DataGridPage was removed
* Make Main Window a bit wider to fit 3 full columns instead of 2.5
* Fix ScreenPage not rendering
* Replace Avalonia old icon with a new one
* Update main logo too
* Force Avalonia SyncContext inside of OnSizeChanged callback
* Restructure MainWindowViewModel_PageList, avoid duplication of categories
* Fix screens page invalidation
* Fix minor warnings
* Redo HomePage items layouting
* Add missing pages
* Reuse $(SharedAssetsPath)
* Don't pin exact patch version of DiagnosticsSupport
* Resize new assets
* Include page section in search
* Use expression setters in main view model
* Restore filtered page sorting
* Fix CI build
* Add 1px margin to the UniformGrid to fix cropped border issue
---------
Co-authored-by: Mike James <michael.james6@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Proposal: Add week numbers to Calendar
* FluentTheme for adding CW
* Add sample to ControlCatalog about week numbers
* workaround for XAML not accepting empty strings
* SimpleTheme
* refractor TemplateParts of Calendar
* ensure Calendar updates and improve xml comment
* undo whitespace formatting
* Add some test to CalendarTests
* adress self review
* Introduce a method to show / hide the week numbers panel
since it is not part of the MonthGrid, it can leak into the year view. We solved this by updating IsVisible in code behind just like other template parts.
Moved the header into the panel to show / hide it together with the entire Grid.
* fix typo and redundant cast
* Crush the last moths
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Add new IPlatformSettings APIs
* Add control catalog PlatformSettingsPage
* Windows PreferredApplicationLanguage implementation
* Browser PreferredApplicationLanguage implementation
* Run API suppressions for the IPlatformSettings
* Rebase PlatformSettingsPage on new ContentPage
* Return CultureInfo.InstalledUICulture instead of CultureInfo.CurrentUICulture for default PreferredApplicationLanguage implementation
* Android PreferredApplicationLanguage implementation
* iOS PreferredApplicationLanguage implementation
* Use GetUserPreferredUILanguages for Win32 implementation instead of GetUserDefaultLocaleName
* MacOS implementation of PreferredApplicationLanguage
* Use GlobalizationPreferences for WIn32 prefered language, GetUserPreferredUILanguages doesn't work as expected with Windows settigns
* Avoid AvaloniaLocator in control catalog
* Remove unused method
* Add value/remarks XML docs on the PreferredApplicationLanguage
* fix(SelectableTextBlock): fix SelectableTextBlock selection for centered and right-aligned text
* Fix failing unit tests
* Let TextLayout handle out-of-bounds hit testing
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Remove MonoMac.NetStandard
(cherry picked from commit 4aac4c4168a73496b579dd28270e8d71764497c7)
* Several AOT compat issues
(cherry picked from commit e9f0a8e6d29da140f3f255e79bd199067981b0fe)
* Add UnconditionalSuppressMessage to the DataValidationViewModel
* Suppress trimming warning on WithDataAnnotationsValidation method
* Unnecessary AvaloniaXaml
* include TrimmingEnable on all sample projects
* Add missing SelfContained to the WinUI projects
* Include TrimmingEnable on DesignerSupport only for warnings analyzer, explicitly disable IsAotCompatible
* Disable trimming warnings for WinUI projects completely
* Enable back runtime marshalling for samples
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Use CompiledBinding.Create where possible in sample code
* Avoid "FullyQualifiedName" hacks, use AppContext.BaseDirectory
* Avoid ambigious binding to methods in the sample code
* Use ProcessPath, there are no "dll" in aot
* Disable devtools in release
* Remove "DefineDynamicAssembly" used for persistent assemblies output, we don't target net framework anymore
* Add RequiresDynamicCode to the runtime XAML loader
* Bump XAML
* Bump XAML
* Win32: fix None/BorderOnly maximized position on secondary screens
* Fix WindowCustomizationsPage
* Use correct screen when minimized
* Fallback to nearest monitor
* replace hamburger view with drawer page. use ContentPage in control catalog
* Added Icons
* fix listbox and carousel page
* make MainView drawer page
* add PageNavigationHost to control catalog
---------
Co-authored-by: Javier Suárez Ruiz <javiersuarezruiz@hotmail.com>
* feat(ControlCatalog): add sidebar search, auto-sort, and default page selection
- Add search TextBox (PART_SearchBox) to HamburgerMenu pane template
that filters sidebar items by header text (case-insensitive)
- Auto-sort TabItems alphabetically by Header on first load
- Add IsDefaultPage attached property on HamburgerMenu to preselect
a specific TabItem (set on Buttons page in MainView)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: replace IsDefaultPage attached property with simple IsSelected
IsSelected on TabItem is sufficient for preselecting a page after
auto-sort. Removes the custom IsDefaultPage attached property.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Don't tick with render loop when app is idle
* Update src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamArrayPool.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* wip
* wip
* api diff
* fixes
* Address review: clear wakeupPending at tick start, guard CarbonEmissionsHack subscriptions
- Clear _wakeupPending at start of TimerTick so wakeups already processed
by the current tick don't force an unnecessary extra tick
- Guard CarbonEmissionsHack against duplicate subscriptions using a private
attached property
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix lock-order inversion in Add/Remove vs TimerTick
Move Wakeup() and Stop() calls outside the _items lock in Add/Remove
to prevent deadlock with TimerTick which acquires _timerLock then _items.
Add/Remove are UI-thread-only so the extracted logic remains safe.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address review: remove unused usings, guard double Stop(), fix SleepLoop extra frame
- Remove unused using directives from IRenderLoopTask.cs
- Guard TimerTick Stop() with _running check to prevent double Stop()
when Remove() already stopped the timer
- SleepLoopRenderTimer: use WaitOne(timeout) instead of Thread.Sleep
so Stop() can interrupt the sleep, and recheck _stopped before Tick
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix DisplayLinkTimer foreground handler bypassing render loop state
Only resume the display link on WillEnterForeground if the timer was
calling Start() to avoid setting _stopped=false when the render loop
had the timer stopped.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix DisplayLinkTimer thread safety, revert global NU5104 suppression
- Stop() now only sets _stopped flag; OnLinkTick() self-pauses the
CADisplayLink from the timer thread to avoid thread-affinity issues
- Revert NU5104 global suppression in SharedVersion.props
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Cap _ticksSinceLastCommit to prevent int overflow
Stop incrementing once it reaches CommitGraceTicks to prevent
wrapping negative and keeping the render loop awake indefinitely.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: remove Start/Stop from IRenderTimer, merge into Tick setter
Timer start/stop is now controlled entirely by setting the Tick
property: non-null starts, null stops. This eliminates the explicit
Start()/Stop() methods from IRenderTimer, making the API simpler.
DefaultRenderLoop controls the timer purely through Tick assignment
under its _timerLock. A new _hasItems flag tracks subscriber presence
since Tick is now transient (null when idle).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address review comments on timer thread safety and guards
- ChoreographerTimer: add _frameCallbackActive guard to prevent double
PostFrameCallback from both Tick setter and SubscribeView
- ServerCompositor: cap _ticksSinceLastCommit at int.MaxValue
- SleepLoopRenderTimer: make _tick volatile, remove _stopped recheck
(guard moved to DefaultRenderLoop)
- DefaultRenderLoop: add _running check at tick start to drop late ticks
- ThreadProxyRenderTimer: add lock for internal state manipulation
- DisplayLinkTimer: add lock for all internal state manipulation
- Re-add NU5104 suppression to SharedVersion.props
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: make _hasItems volatile for cross-thread visibility
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: guard against redundant starts in DefaultRenderTimer, make _tick volatile across all timers
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove CarbonEmissionsHack, revert iOS/Android timers to always-ticking
- Delete CarbonEmissionsHack class and its XAML reference
- Revert DisplayLinkTimer (iOS) to original always-ticking implementation
- Revert ChoreographerTimer (Android) to original always-ticking implementation
- Add TODO comments for future start/stop on RenderLoop request
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix DirectCompositionConnection WaitOne not respecting process exit cancellation
Use WaitHandle.WaitAny with both _wakeEvent and cts.Token.WaitHandle so
the loop can exit when ProcessExit fires while the timer is stopped.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* timers
* XML docs
* Cache delegate
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Implemented new drawn window decorations API
TODO: check if it works on Win32, bring back titlebar automation peer
* Adjusting naming a bit
* Naming / configuration changes
* Various fixes
* popover fix?
* wip
* Address review
* Extra window roles
* WIP
* Fixed drawn titlebar automation
* Purge ExtendClientAreaChromeHints.
* Fixed dynamically enabling drawn decorations
* api diff
* Add automation IDs for drawn decorations buttons
* Resolved the issues
* build
* Retry a few times when Pager isn't available after test is finished
* Only do faulty test detection if asked
* duplicate package reference
* Try disabling faulty tests on appium1
* Fix ExtendClientAreaWindowTests
* Apply initial button states
* Enable CSD shadow for X11
* net8?
* Address review
* more review comments
* Moar review comments
* Extra hit-test checks
* Moar review
* Prefix integration test app exitfullscreen to avoid clashes
* Disable drawn decorations if parts = None
* Respect SystemDecorations value on mac in extend-client-area mode
* Tidy up logic a bit
* Adjust win32 tests to titlebar not being in the tree when CSD are not enabled
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>