* 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>
* fix(macOS): always raise keyDown before the input context sees the event
AvnView passed every keyDown to the NSTextInputContext first and only
raised a KeyDown when the context did not consume the event. The context
consumes every printable key by routing it to insertText:, so while a
text input client was active no KeyDown was raised for space, letters or
digits and a KeyGesture on those keys could never match. Only modified
keys were special-cased.
keyDown: now always raises exactly one KeyDown per NSEvent before the
input context is consulted. Composition state only decides which key is
reported: while hasMarkedText is set the key is masked as
AvnKeyImeProcessed, the same way Win32 reports VK_PROCESSKEY, so user
code still observes the event but no gesture matches it. The physical key
and the key symbol keep their real values in both cases.
If user code handles the event the input context is skipped entirely, so
no text and no preedit is produced. This mirrors the Win32 behaviour of
swallowing WM_CHAR after a handled WM_KEYDOWN.
The modifier special case, the handleKeyDown: helper and
_lastKeyDownEvent are gone. doCommandBySelector: is kept but empty, since
falling back to NSResponder would perform the default action and beep.
Adds a Keyboard page to IntegrationTestApp that reports the last key
down, a key down count and the last text input, plus Appium tests
covering gestures with and without a modifier, text suppression for a
handled gesture, and a single key down per key press.
* fix(macOS): mask the composition starting key for composing input methods
hasMarkedText only becomes true once a composition is in progress, so the
keystroke that starts one was still reported with its real key and could
match a KeyGesture. Win32 reports VK_PROCESSKEY for that keystroke too.
keyDown: now also masks the key as AvnKeyImeProcessed when a printable
character key is typed into a text input client while the selected
keyboard input source is a composing input method.
Whether an input source composes is resolved through
TISGetInputSourceProperty: anything that is not a plain keyboard layout
composes, except an input method in the alphanumeric input mode, which
passes keys straight through and therefore keeps the real key. Unknown
input sources keep the real key as well, so gestures are never lost to a
failed lookup. The lookup includes installed but not enabled input
sources, since an input method mode can be selected without being listed
as enabled, and the result is cached per input source id because this runs
for every key down.
Only printable character keys are masked. KeySymbolFromScanCode reports
the control character for Backspace, Enter, Tab and Escape, so the
presence of a key symbol is not enough to decide: masking those would stop
TextBox from reacting to them, which broke Backspace while an input method
was selected. Command and Control combinations are shortcuts and are not
masked either.
Plain keyboard layouts are unaffected: dead key compositions are not
driven by the input source and stay covered by hasMarkedText.
The Keyboard page now subscribes to KeyDown and TextInput with
handledEventsToo, so keys TextBox handles in its class handler, such as
Backspace and the arrows, stay visible in the readout.
* test(macOS): skip the Keyboard tests on the Appium 1 leg
The tests synthesize key input through W3C actions, which the mac2
driver bundled with Appium 1 does not implement, so on the macOS CI leg
they could only fail. They keep running on Windows, where WinAppDriver
handles W3C actions, and on macOS builds with IsRunningAppium2, which
target a current mac2 driver. The infrastructure change that would run
them on macOS CI is split out for a separate pull request.
---------
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
* Implement visual geometry hit testing
* fix xml comment
* fix xml comment
* update api diff
* Introduced ICompositionHitTester to avoid duplicated hit test code between point and geometry
* Add geometry hit testing page to RenderDemo
* fix geometry hit testing not including stroke
* fix test
* update api and tests
* update api diff
* Update GeometryHitTestingPage with new API
* addressed reviews.
* remove nullability in GeometryHitTestResult Visual hit
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* 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>
* Only include XAML/AXAML AvaloniaResource in the AdditionalFiles
* Expose AvaloniaResourcePaths for the source generators and Roslyn
* Typo
* Update Generators.Sandbox, include some test assets
* Fix working area changed on windows platform won't trigger screens changed
* Fix ScreensPage on IntegrationTestApp won't remove Screens.Changed listener
* Add SystemParametersInfo.SPI_SETWORKAREA to Win32 UnmanagedMethods class
* Move notify screen working area changed to Win32Platform.WndProc instead of WindowImpl.AppWndProc
* Notify working area changed to screens without check PlatformSettings is Win32PlatformSettings
* Fix TopMost handling for Popups on Windows
* Properly handle TopMost property changes
* Call SetTopMost in PopupRoot constructor (similar to SetWindowManagerAddShadowHint)
* Make sure the parent is focused when the popup is clicked directly to activate the app.
* Move PopupsPage to IntegrationTestApp
* Move Popup code to the XAML, making visual/logical management implicit
* Add popup integration tests
* Fix MenuTests+Default.Click_Grandchild by delaying popup activation
* Kill input focus when input element on popup is focused element
* try to fix tests
* try to fix test v2
* Integration tests: ensure menus get closed after testing
* run popup tests only on windows
* WIP: Removing the hack to see if anything changes.
* WIP: Removing the second hack.
I'm guessing this will fix it.
* fix to make transparent window integration app work on macOS
* fix menu tests
* Fix warning in MenuTests
* Add a background to integration test popup
---------
Co-authored-by: Maxwell Katz <maxkatz6@outlook.com>
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
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
* Adding TransparencyLevel property to CompositionTarget
* Try to pass the WindowTransparencyLevel to surface
* Enable change the AlphaMode in WinUI window.
* Support disable transparency explicitly;
* Adding the test demo code.
* Fix ICompositionDrawingSurfaceInterop.BeginDraw fail. Because the surface do not set size.
* Merge the same code
* Fix compile
* Add test demo code
* Put the re create surface to trycatch block.
Solve the `transaction` do not be disposed when CreateSurface exception.
* Add the dynamic Transparency alpha mode support to DirectComposited
* Revert "Adding TransparencyLevel property to CompositionTarget"
This reverts commit da0af790b1.
* Adding TransparencyLevel property to CompositionTarget
* Adding TransparencyLevel to RenderTargetSceneInfo
* Try remove the pass level
* Finish pass RenderTargetSceneInfo to create surface.
* Remove the unuse argument
* Remove the unuse code
* Bring the comments closer to the code
* Revert sort using
* Remove the unuse using
* Try fix compile error
* Remove the unuse namespace using.
* Try fix API changed
* Try fix compile
* Update api
* Prototype an AABB tree for hit testing
* Some optimizations
* Revert runtime knobs and add tests
* Avoid rebuilding the whole tree
* Revert an invalid optimization
* Add a hit test page
* Clean up
* Format code
* Nit
* Use weak CompositionVisual reference in server-side
* Bucket composition hit-test AABB tree by child order
* Use readback revisions for AABB hit-test updates