* Add .NET 8 target to packable projects
* Update test projects
* Update sample projects to target .NET 8
* Update main Avalonia package to target .NET 8 as well
* Remove MSBuildEnableWorkloadResolver hack and some minor change
* Use net8.0 in nuke build as well
* Pin 8.0.0 SDK
* Adjust API validation
* Pin a valid version
* Remove net461 target from Avalonia package
* Remove unused net6.0 target from Avalonia.Designer.HostApp
* Adjust API diff
* Update ControlCatalog.Android.csproj
* Remove MSBuildEnableWorkloadResolver
* Fix Browser issues on .NET 8
* Fix .NET 8 error
* Fix merge conflicts
* Replace explicit TFMs in .csproj files with a centralized registry
* Fix merge conflict
* Fix AvsLegacyWindowsTargetFrameworks and add hacks for the tests
* Update XCode project CommandLineArgument
---------
Co-authored-by: Nikita Tsukanov <keks9n@gmail.com>
* Merge core libraries.
Everything below `Avalonia.Controls` into `Avalonia.Base`.
* Move new files to correct place.
* Removed unused dirs/projects,
* Removed outdated references from theme assemblies.
* Merge unit tests to match new assembly layout.
* Fixup test namespaces.
* Make directory match namespace.
* Move files to match namespace.
* Move files to match namespace.
* Fix up incorrect namespace.
`Avalonia.Visuals.Media.Imaging` -> `Avalonia.Media.Imaging`.
* Fix resource URL.
* Removed outdated dependencies.
* Added missing project reference.
* Update test namespaces.
* Fix merge error.
* Fix merge errors.
* Fix bad merge in WindowsInteropTest.csproj.
* Fix up merge errors in csprojs.
* Remove merged tests from nuke.
* Fix up namespace.
* Fix compile error.
* Fix failing tests.
Now that more unit tests are present in Avalonia.Base.UnitTests, general `AvaloniaObject` properties are getting registered. Ignore those.
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
And no longer target net461 in unit tests as we've not had a test pass in net core and fail in netfx in years, and it bloats our CI time; EXCEPT Avalonia.Markup.Xaml.UnitTests where we're still testing against net4.7 as MSIL generation is runtime-sensitive.
Previously we ensured that `AvaloniaObject.SetValue` was run on the main
thread. This makes sure that `GetValue`, `IsSet` and `ClearValue` are
also run on the main thread. Unit testing this turned out to be more
complicated than expected, because `Dispatcher` keeps a hold of a
reference to the first `IPlatformThreadingInterface` it sees, so made
`UnitTestApplication` able to notify `Dispatcher` that it should update
its services.
Rather than adding a TakeUntil(control.StyleDetach) to each applied
style, keep track of the applied styles in a static list. This
dramatically reduces memory usage.
This is needed so that things like the following can be done:
<TreeView>
<TreeView.Styles>
<Style Selector="TreeViewItem">
<Setter Property="IsExpanded" Value="{Binding IsExpanded}"/>
</Style>
</TreeView.Styles>
<TreeView>
(At the moment we have TreeDataTemplate.IsExpanded but this isn't good
enough: it only supports setting IsExpanded on creation of the item with
no binding.)
With this commit, setters can now contain bindings, but they aren't yet
applied correctly. As part of this commit, classes related to binding
have been moved to the Perspex.Data namespace.