diff --git a/.ncrunch/Avalonia.HarfBuzz.v3.ncrunchproject b/.ncrunch/Avalonia.HarfBuzz.v3.ncrunchproject
new file mode 100644
index 0000000000..0bcc569d05
--- /dev/null
+++ b/.ncrunch/Avalonia.HarfBuzz.v3.ncrunchproject
@@ -0,0 +1,5 @@
+
+
+ False
+
+
\ No newline at end of file
diff --git a/Avalonia.v3.ncrunchsolution b/Avalonia.v3.ncrunchsolution
index 4de91979d6..f675b66f7b 100644
--- a/Avalonia.v3.ncrunchsolution
+++ b/Avalonia.v3.ncrunchsolution
@@ -13,8 +13,9 @@
TargetFrameworks = net10.0
False
+ True
.ncrunch
True
True
-
+
\ No newline at end of file
diff --git a/api/Avalonia.Android.nupkg.xml b/api/Avalonia.Android.nupkg.xml
index 3c65a6fb9d..6ffd08efe1 100644
--- a/api/Avalonia.Android.nupkg.xml
+++ b/api/Avalonia.Android.nupkg.xml
@@ -1,6 +1,12 @@
+
+ CP0001
+ T:Avalonia.Android.Platform.Specific.IAndroidView
+ baseline/Avalonia.Android/lib/net10.0-android36.0/Avalonia.Android.dll
+ current/Avalonia.Android/lib/net10.0-android36.0/Avalonia.Android.dll
+
CP0008
T:Avalonia.Android.AvaloniaActivity
diff --git a/api/Avalonia.Headless.nupkg.xml b/api/Avalonia.Headless.nupkg.xml
new file mode 100644
index 0000000000..229047057a
--- /dev/null
+++ b/api/Avalonia.Headless.nupkg.xml
@@ -0,0 +1,40 @@
+
+
+
+
+ CP0002
+ M:Avalonia.Headless.HeadlessWindowExtensions.DragDrop(Avalonia.Controls.TopLevel,Avalonia.Point,Avalonia.Input.Raw.RawDragEventType,Avalonia.Input.IDataObject,Avalonia.Input.DragDropEffects,Avalonia.Input.RawInputModifiers)
+ baseline/Avalonia.Headless/lib/net10.0/Avalonia.Headless.dll
+ current/Avalonia.Headless/lib/net10.0/Avalonia.Headless.dll
+
+
+ CP0002
+ M:Avalonia.Headless.HeadlessWindowExtensions.KeyPress(Avalonia.Controls.TopLevel,Avalonia.Input.Key,Avalonia.Input.RawInputModifiers)
+ baseline/Avalonia.Headless/lib/net10.0/Avalonia.Headless.dll
+ current/Avalonia.Headless/lib/net10.0/Avalonia.Headless.dll
+
+
+ CP0002
+ M:Avalonia.Headless.HeadlessWindowExtensions.KeyRelease(Avalonia.Controls.TopLevel,Avalonia.Input.Key,Avalonia.Input.RawInputModifiers)
+ baseline/Avalonia.Headless/lib/net10.0/Avalonia.Headless.dll
+ current/Avalonia.Headless/lib/net10.0/Avalonia.Headless.dll
+
+
+ CP0002
+ M:Avalonia.Headless.HeadlessWindowExtensions.DragDrop(Avalonia.Controls.TopLevel,Avalonia.Point,Avalonia.Input.Raw.RawDragEventType,Avalonia.Input.IDataObject,Avalonia.Input.DragDropEffects,Avalonia.Input.RawInputModifiers)
+ baseline/Avalonia.Headless/lib/net8.0/Avalonia.Headless.dll
+ current/Avalonia.Headless/lib/net8.0/Avalonia.Headless.dll
+
+
+ CP0002
+ M:Avalonia.Headless.HeadlessWindowExtensions.KeyPress(Avalonia.Controls.TopLevel,Avalonia.Input.Key,Avalonia.Input.RawInputModifiers)
+ baseline/Avalonia.Headless/lib/net8.0/Avalonia.Headless.dll
+ current/Avalonia.Headless/lib/net8.0/Avalonia.Headless.dll
+
+
+ CP0002
+ M:Avalonia.Headless.HeadlessWindowExtensions.KeyRelease(Avalonia.Controls.TopLevel,Avalonia.Input.Key,Avalonia.Input.RawInputModifiers)
+ baseline/Avalonia.Headless/lib/net8.0/Avalonia.Headless.dll
+ current/Avalonia.Headless/lib/net8.0/Avalonia.Headless.dll
+
+
diff --git a/api/Avalonia.Skia.nupkg.xml b/api/Avalonia.Skia.nupkg.xml
index eda59fc334..8e9d60f7d4 100644
--- a/api/Avalonia.Skia.nupkg.xml
+++ b/api/Avalonia.Skia.nupkg.xml
@@ -1,6 +1,78 @@
+
+ CP0001
+ T:Avalonia.Skia.ISkiaGpuRenderTarget2
+ baseline/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+
+
+ CP0001
+ T:Avalonia.Skia.ISkiaGpuWithPlatformGraphicsContext
+ baseline/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+
+
+ CP0001
+ T:Avalonia.Skia.ISkiaGpuRenderTarget2
+ baseline/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+
+
+ CP0001
+ T:Avalonia.Skia.ISkiaGpuWithPlatformGraphicsContext
+ baseline/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+
+
+ CP0002
+ M:Avalonia.Skia.ISkiaGpuRenderTarget.BeginRenderingSession
+ baseline/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+
+
+ CP0002
+ M:Avalonia.Skia.ISkiaGpuRenderTarget.BeginRenderingSession
+ baseline/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+
+
+ CP0006
+ M:Avalonia.Skia.ISkiaGpu.TryGetGrContext
+ baseline/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+
+
+ CP0006
+ M:Avalonia.Skia.ISkiaGpuRenderTarget.BeginRenderingSession(System.Nullable{Avalonia.PixelSize})
+ baseline/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+
+
+ CP0006
+ P:Avalonia.Skia.ISkiaGpu.PlatformGraphicsContext
+ baseline/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net10.0/Avalonia.Skia.dll
+
+
+ CP0006
+ M:Avalonia.Skia.ISkiaGpu.TryGetGrContext
+ baseline/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+
+
+ CP0006
+ M:Avalonia.Skia.ISkiaGpuRenderTarget.BeginRenderingSession(System.Nullable{Avalonia.PixelSize})
+ baseline/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+
+
+ CP0006
+ P:Avalonia.Skia.ISkiaGpu.PlatformGraphicsContext
+ baseline/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+ current/Avalonia.Skia/lib/net8.0/Avalonia.Skia.dll
+
CP0008
T:Avalonia.Skia.ISkiaGpu
diff --git a/api/Avalonia.nupkg.xml b/api/Avalonia.nupkg.xml
index 5a424cb8ee..38f5a7e8e1 100644
--- a/api/Avalonia.nupkg.xml
+++ b/api/Avalonia.nupkg.xml
@@ -1,12 +1,60 @@
+
+ CP0001
+ T:Avalonia.Animation.CustomAnimatorBase
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Animation.CustomAnimatorBase`1
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Animation.Easings.CubicBezierEasing
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
CP0001
T:Avalonia.Controls.Primitives.IScrollable
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+ CP0001
+ T:Avalonia.Diagnostics.AppliedStyle
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Diagnostics.StyledElementExtensions
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Diagnostics.StyleDiagnostics
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Input.DataObjectExtensions
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Input.IDataObject
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
CP0001
T:Avalonia.Media.Fonts.FontFamilyLoader
@@ -31,54 +79,210 @@
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+ CP0001
+ T:Avalonia.Platform.IRenderTarget2
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Platform.IRenderTargetWithProperties
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
CP0001
T:Avalonia.Platform.OptionalFeatureProviderExtensions
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+ CP0001
+ T:Avalonia.Styling.IStyleable
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
CP0001
T:Avalonia.Utilities.StringTokenizer
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+ CP0001
+ T:Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetimeOptions
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.ApplicationLifetimes.IActivatableApplicationLifetime
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
CP0001
T:Avalonia.Controls.AutoCompleteBox.BindingEvaluator`1
baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+ CP0001
+ T:Avalonia.Controls.FileDialog
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.FileDialogFilter
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.FileSystemDialog
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.Generators.TreeContainerIndex
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.Generators.TreeItemContainerGenerator
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
CP0001
T:Avalonia.Controls.NativeMenuItemToggleType
baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+ CP0001
+ T:Avalonia.Controls.OpenFileDialog
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.OpenFolderDialog
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.Platform.ISystemDialogImpl
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
CP0001
T:Avalonia.Controls.Primitives.IScrollable
baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+ CP0001
+ T:Avalonia.Controls.SaveFileDialog
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.SystemDialog
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Platform.IApplicationPlatformEvents
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
CP0001
T:Avalonia.Markup.Xaml.ConstructorArgumentAttribute
baseline/Avalonia/lib/net10.0/Avalonia.Markup.Xaml.dll
current/Avalonia/lib/net10.0/Avalonia.Markup.Xaml.dll
+
+ CP0001
+ T:Avalonia.OpenGL.Surfaces.IGlPlatformSurfaceRenderTarget2
+ baseline/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+
+
+ CP0001
+ T:Avalonia.OpenGL.Surfaces.IGlPlatformSurfaceRenderTargetWithCorruptionInfo
+ baseline/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+
CP0001
T:Avalonia.Media.Fonts.FontFamilyLoader
baseline/Avalonia/lib/net6.0/Avalonia.Base.dll
current/Avalonia/lib/net6.0/Avalonia.Base.dll
+
+ CP0001
+ T:Avalonia.Animation.CustomAnimatorBase
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Animation.CustomAnimatorBase`1
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Animation.Easings.CubicBezierEasing
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
CP0001
T:Avalonia.Controls.Primitives.IScrollable
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+ CP0001
+ T:Avalonia.Diagnostics.AppliedStyle
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Diagnostics.StyledElementExtensions
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Diagnostics.StyleDiagnostics
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Input.DataObjectExtensions
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Input.IDataObject
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
CP0001
T:Avalonia.Media.Fonts.FontFamilyLoader
@@ -103,12 +307,30 @@
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+ CP0001
+ T:Avalonia.Platform.IRenderTarget2
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0001
+ T:Avalonia.Platform.IRenderTargetWithProperties
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
CP0001
T:Avalonia.Platform.OptionalFeatureProviderExtensions
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+ CP0001
+ T:Avalonia.Styling.IStyleable
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
CP0001
T:Avalonia.Utilities.StringTokenizer
@@ -117,829 +339,1807 @@
CP0001
- T:Avalonia.Controls.AutoCompleteBox.BindingEvaluator`1
+ T:Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetimeOptions
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0001
- T:Avalonia.Controls.NativeMenuItemToggleType
+ T:Avalonia.Controls.ApplicationLifetimes.IActivatableApplicationLifetime
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0001
- T:Avalonia.Controls.Primitives.IScrollable
+ T:Avalonia.Controls.AutoCompleteBox.BindingEvaluator`1
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0001
- T:Avalonia.Markup.Xaml.ConstructorArgumentAttribute
- baseline/Avalonia/lib/net8.0/Avalonia.Markup.Xaml.dll
- current/Avalonia/lib/net8.0/Avalonia.Markup.Xaml.dll
+ T:Avalonia.Controls.FileDialog
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0001
- T:Avalonia.Media.Fonts.FontFamilyLoader
- baseline/Avalonia/lib/netstandard2.0/Avalonia.Base.dll
- current/Avalonia/lib/netstandard2.0/Avalonia.Base.dll
-
-
- CP0002
- F:Avalonia.Controls.ResourcesChangedEventArgs.Empty
- baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
- current/Avalonia/lib/net10.0/Avalonia.Base.dll
+ T:Avalonia.Controls.FileDialogFilter
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
- CP0002
- F:Avalonia.Media.DrawingImage.ViewboxProperty
- baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
- current/Avalonia/lib/net10.0/Avalonia.Base.dll
+ CP0001
+ T:Avalonia.Controls.FileSystemDialog
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
- CP0002
- F:Avalonia.Media.Fonts.FontCollectionBase._glyphTypefaceCache
- baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
- current/Avalonia/lib/net10.0/Avalonia.Base.dll
+ CP0001
+ T:Avalonia.Controls.Generators.TreeContainerIndex
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
- CP0002
- M:Avalonia.Controls.ResourcesChangedEventArgs.#ctor
- baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
- current/Avalonia/lib/net10.0/Avalonia.Base.dll
+ CP0001
+ T:Avalonia.Controls.Generators.TreeItemContainerGenerator
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
- CP0002
- M:Avalonia.Data.ReflectionBinding.#ctor(System.String,Avalonia.Data.BindingMode)
- baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
- current/Avalonia/lib/net10.0/Avalonia.Base.dll
+ CP0001
+ T:Avalonia.Controls.NativeMenuItemToggleType
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
- CP0002
- M:Avalonia.Input.IKeyboardNavigationHandler.Move(Avalonia.Input.IInputElement,Avalonia.Input.NavigationDirection,Avalonia.Input.KeyModifiers)
- baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
- current/Avalonia/lib/net10.0/Avalonia.Base.dll
+ CP0001
+ T:Avalonia.Controls.OpenFileDialog
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
- CP0002
- M:Avalonia.Input.KeyboardNavigationHandler.Move(Avalonia.Input.IInputElement,Avalonia.Input.NavigationDirection,Avalonia.Input.KeyModifiers)
- baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
- current/Avalonia/lib/net10.0/Avalonia.Base.dll
+ CP0001
+ T:Avalonia.Controls.OpenFolderDialog
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
- CP0002
- M:Avalonia.Input.TextInput.TextInputMethodClient.ShowInputPanel
- baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
- current/Avalonia/lib/net10.0/Avalonia.Base.dll
+ CP0001
+ T:Avalonia.Controls.Platform.ISystemDialogImpl
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
- CP0002
- M:Avalonia.Media.DrawingImage.get_Viewbox
+ CP0001
+ T:Avalonia.Controls.Primitives.IScrollable
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.SaveFileDialog
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Controls.SystemDialog
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Platform.IApplicationPlatformEvents
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0001
+ T:Avalonia.Markup.Xaml.ConstructorArgumentAttribute
+ baseline/Avalonia/lib/net8.0/Avalonia.Markup.Xaml.dll
+ current/Avalonia/lib/net8.0/Avalonia.Markup.Xaml.dll
+
+
+ CP0001
+ T:Avalonia.OpenGL.Surfaces.IGlPlatformSurfaceRenderTarget2
+ baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
+
+ CP0001
+ T:Avalonia.OpenGL.Surfaces.IGlPlatformSurfaceRenderTargetWithCorruptionInfo
+ baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
+
+ CP0001
+ T:Avalonia.Media.Fonts.FontFamilyLoader
+ baseline/Avalonia/lib/netstandard2.0/Avalonia.Base.dll
+ current/Avalonia/lib/netstandard2.0/Avalonia.Base.dll
+
+
+ CP0002
+ F:Avalonia.Controls.ResourcesChangedEventArgs.Empty
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.DrawingImage.set_Viewbox(System.Nullable{Avalonia.Rect})
+ F:Avalonia.Data.BindingPriority.TemplatedParent
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.Fonts.FontCollectionBase.Initialize(Avalonia.Platform.IFontManagerImpl)
+ F:Avalonia.Input.DataFormats.FileNames
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.Fonts.IFontCollection.Initialize(Avalonia.Platform.IFontManagerImpl)
+ F:Avalonia.Input.DataFormats.Files
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.Imaging.Bitmap.CopyPixels(Avalonia.Platform.ILockedFramebuffer,Avalonia.Platform.AlphaFormat)
+ F:Avalonia.Input.DataFormats.Text
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.StreamGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
+ F:Avalonia.Media.DrawingImage.ViewboxProperty
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.StreamGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
+ F:Avalonia.Media.Fonts.FontCollectionBase._glyphTypefaceCache
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.StreamGeometryContext.LineTo(Avalonia.Point)
+ F:Avalonia.Media.RadialGradientBrush.RadiusProperty
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.StreamGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
+ M:Avalonia.Animation.Animation.SetAnimator(Avalonia.Animation.IAnimationSetter,Avalonia.Animation.CustomAnimatorBase)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.TextFormatting.GenericTextRunProperties.#ctor(Avalonia.Media.Typeface,Avalonia.Media.FontFeatureCollection,System.Double,Avalonia.Media.TextDecorationCollection,Avalonia.Media.IBrush,Avalonia.Media.IBrush,Avalonia.Media.BaselineAlignment,System.Globalization.CultureInfo)
+ M:Avalonia.AvaloniaObjectExtensions.Bind(Avalonia.AvaloniaObject,Avalonia.AvaloniaProperty,Avalonia.Data.BindingBase,System.Object)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.TextFormatting.GenericTextRunProperties.#ctor(Avalonia.Media.Typeface,System.Double,Avalonia.Media.TextDecorationCollection,Avalonia.Media.IBrush,Avalonia.Media.IBrush,Avalonia.Media.BaselineAlignment,System.Globalization.CultureInfo)
+ M:Avalonia.Controls.ResourcesChangedEventArgs.#ctor
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.TextFormatting.TextCollapsingProperties.CreateCollapsedRuns(Avalonia.Media.TextFormatting.TextLine,System.Int32,Avalonia.Media.FlowDirection,Avalonia.Media.TextFormatting.TextRun)
+ M:Avalonia.Data.CompiledBindingPathBuilder.SetRawSource(System.Object)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.TextFormatting.TextLayout.#ctor(System.String,Avalonia.Media.Typeface,Avalonia.Media.FontFeatureCollection,System.Double,Avalonia.Media.IBrush,Avalonia.Media.TextAlignment,Avalonia.Media.TextWrapping,Avalonia.Media.TextTrimming,Avalonia.Media.TextDecorationCollection,Avalonia.Media.FlowDirection,System.Double,System.Double,System.Double,System.Double,System.Int32,System.Collections.Generic.IReadOnlyList{Avalonia.Utilities.ValueSpan{Avalonia.Media.TextFormatting.TextRunProperties}})
+ M:Avalonia.Data.ReflectionBinding.#ctor(System.String,Avalonia.Data.BindingMode)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.TextFormatting.TextLayout.#ctor(System.String,Avalonia.Media.Typeface,System.Double,Avalonia.Media.IBrush,Avalonia.Media.TextAlignment,Avalonia.Media.TextWrapping,Avalonia.Media.TextTrimming,Avalonia.Media.TextDecorationCollection,Avalonia.Media.FlowDirection,System.Double,System.Double,System.Double,System.Double,System.Int32,System.Collections.Generic.IReadOnlyList{Avalonia.Utilities.ValueSpan{Avalonia.Media.TextFormatting.TextRunProperties}})
+ M:Avalonia.Input.DataObject.Contains(System.String)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.TextFormatting.TextShaperOptions.#ctor(Avalonia.Media.GlyphTypeface,System.Collections.Generic.IReadOnlyList{Avalonia.Media.FontFeature},System.Double,System.SByte,System.Globalization.CultureInfo,System.Double,System.Double)
+ M:Avalonia.Input.DataObject.Get(System.String)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.TextFormatting.TextShaperOptions.#ctor(Avalonia.Media.GlyphTypeface,System.Double,System.SByte,System.Globalization.CultureInfo,System.Double,System.Double)
+ M:Avalonia.Input.DataObject.GetDataFormats
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.IDrawingContextImplWithEffects.PushEffect(Avalonia.Media.IEffect)
+ M:Avalonia.Input.DataObject.Set(System.String,System.Object)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.IFontManagerImpl.TryMatchCharacter(System.Int32,Avalonia.Media.FontStyle,Avalonia.Media.FontWeight,Avalonia.Media.FontStretch,System.Globalization.CultureInfo,Avalonia.Media.Typeface@)
+ M:Avalonia.Input.DragDrop.DoDragDrop(Avalonia.Input.PointerEventArgs,Avalonia.Input.IDataObject,Avalonia.Input.DragDropEffects)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.IGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
+ M:Avalonia.Input.DragEventArgs.#ctor(Avalonia.Interactivity.RoutedEvent{Avalonia.Input.DragEventArgs},Avalonia.Input.IDataObject,Avalonia.Interactivity.Interactive,Avalonia.Point,Avalonia.Input.KeyModifiers)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.IGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
+ M:Avalonia.Input.DragEventArgs.get_Data
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.IGeometryContext.LineTo(Avalonia.Point)
+ M:Avalonia.Input.IKeyboardNavigationHandler.Move(Avalonia.Input.IInputElement,Avalonia.Input.NavigationDirection,Avalonia.Input.KeyModifiers)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.IGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
+ M:Avalonia.Input.KeyboardNavigationHandler.Move(Avalonia.Input.IInputElement,Avalonia.Input.NavigationDirection,Avalonia.Input.KeyModifiers)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.LockedFramebuffer.#ctor(System.IntPtr,Avalonia.PixelSize,System.Int32,Avalonia.Vector,Avalonia.Platform.PixelFormat,System.Action)
+ M:Avalonia.Input.Platform.IClipboard.GetDataAsync(System.String)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Visuals.Platform.PathGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
+ M:Avalonia.Input.Platform.IClipboard.GetFormatsAsync
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Visuals.Platform.PathGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
+ M:Avalonia.Input.Platform.IClipboard.GetTextAsync
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Visuals.Platform.PathGeometryContext.LineTo(Avalonia.Point)
+ M:Avalonia.Input.Platform.IClipboard.SetDataObjectAsync(Avalonia.Input.IDataObject)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Visuals.Platform.PathGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
+ M:Avalonia.Input.Platform.IClipboard.SetTextAsync(System.String)
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- F:Avalonia.Controls.Documents.Inline.TextDecorationsProperty
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Platform.IClipboard.TryGetInProcessDataObjectAsync
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- F:Avalonia.Controls.NativeMenuBar.EnableMenuItemClickForwardingProperty
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Platform.IPlatformDragSource.DoDragDrop(Avalonia.Input.PointerEventArgs,Avalonia.Input.IDataObject,Avalonia.Input.DragDropEffects)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- F:Avalonia.Controls.NativeMenuItem.ToggleTypeProperty
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Raw.RawDragEvent.#ctor(Avalonia.Input.Raw.IDragDropDevice,Avalonia.Input.Raw.RawDragEventType,Avalonia.Input.IInputRoot,Avalonia.Point,Avalonia.Input.IDataObject,Avalonia.Input.DragDropEffects,Avalonia.Input.RawInputModifiers)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- F:Avalonia.Controls.TextBlock.LetterSpacingProperty
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Raw.RawDragEvent.get_Data
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- F:Avalonia.Controls.TextBox.LetterSpacingProperty
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Raw.RawKeyEventArgs.#ctor(Avalonia.Input.IInputDevice,System.UInt64,Avalonia.Input.IInputRoot,Avalonia.Input.Raw.RawKeyEventType,Avalonia.Input.Key,Avalonia.Input.RawInputModifiers,Avalonia.Input.PhysicalKey,Avalonia.Input.KeyDeviceType,System.String)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.CreatePreviewWithControl(System.Object)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Raw.RawKeyEventArgs.#ctor(Avalonia.Input.IInputDevice,System.UInt64,Avalonia.Input.IInputRoot,Avalonia.Input.Raw.RawKeyEventType,Avalonia.Input.Key,Avalonia.Input.RawInputModifiers,Avalonia.Input.PhysicalKey,System.String)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.GetDataContext(Avalonia.Controls.Templates.IDataTemplate)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Raw.RawKeyEventArgs.#ctor(Avalonia.Input.IKeyboardDevice,System.UInt64,Avalonia.Input.IInputRoot,Avalonia.Input.Raw.RawKeyEventType,Avalonia.Input.Key,Avalonia.Input.RawInputModifiers)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.GetPreviewWith(Avalonia.Controls.Templates.IDataTemplate)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.TextInput.TextInputMethodClient.ShowInputPanel
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.GetPreviewWith(Avalonia.Styling.IStyle)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.Color.ToUint32
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.SetDataContext(Avalonia.Controls.Templates.IDataTemplate,System.Object)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.DrawingContext.PushPostTransform(Avalonia.Matrix)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.AvaloniaObject,Avalonia.Controls.Control)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.DrawingContext.PushPreTransform(Avalonia.Matrix)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.AvaloniaObject,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.DrawingContext.PushTransformContainer
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.ResourceDictionary,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.DrawingImage.get_Viewbox
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.Templates.IDataTemplate,Avalonia.Controls.Control)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.DrawingImage.set_Viewbox(System.Nullable{Avalonia.Rect})
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.Fonts.FontCollectionBase.Initialize(Avalonia.Platform.IFontManagerImpl)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.Fonts.IFontCollection.Initialize(Avalonia.Platform.IFontManagerImpl)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.Imaging.Bitmap.CopyPixels(Avalonia.Platform.ILockedFramebuffer,Avalonia.Platform.AlphaFormat)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.Immutable.ImmutableRadialGradientBrush.get_Radius
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.IRadialGradientBrush.get_Radius
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.RadialGradientBrush.get_Radius
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.RadialGradientBrush.set_Radius(System.Double)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.StreamGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.StreamGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.StreamGeometryContext.LineTo(Avalonia.Point)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.StreamGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.TextFormatting.GenericTextRunProperties.#ctor(Avalonia.Media.Typeface,Avalonia.Media.FontFeatureCollection,System.Double,Avalonia.Media.TextDecorationCollection,Avalonia.Media.IBrush,Avalonia.Media.IBrush,Avalonia.Media.BaselineAlignment,System.Globalization.CultureInfo)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.TextFormatting.GenericTextRunProperties.#ctor(Avalonia.Media.Typeface,System.Double,Avalonia.Media.TextDecorationCollection,Avalonia.Media.IBrush,Avalonia.Media.IBrush,Avalonia.Media.BaselineAlignment,System.Globalization.CultureInfo)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.TextFormatting.TextCollapsingProperties.CreateCollapsedRuns(Avalonia.Media.TextFormatting.TextLine,System.Int32,Avalonia.Media.FlowDirection,Avalonia.Media.TextFormatting.TextRun)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.TextFormatting.TextLayout.#ctor(System.String,Avalonia.Media.Typeface,Avalonia.Media.FontFeatureCollection,System.Double,Avalonia.Media.IBrush,Avalonia.Media.TextAlignment,Avalonia.Media.TextWrapping,Avalonia.Media.TextTrimming,Avalonia.Media.TextDecorationCollection,Avalonia.Media.FlowDirection,System.Double,System.Double,System.Double,System.Double,System.Int32,System.Collections.Generic.IReadOnlyList{Avalonia.Utilities.ValueSpan{Avalonia.Media.TextFormatting.TextRunProperties}})
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.TextFormatting.TextLayout.#ctor(System.String,Avalonia.Media.Typeface,System.Double,Avalonia.Media.IBrush,Avalonia.Media.TextAlignment,Avalonia.Media.TextWrapping,Avalonia.Media.TextTrimming,Avalonia.Media.TextDecorationCollection,Avalonia.Media.FlowDirection,System.Double,System.Double,System.Double,System.Double,System.Int32,System.Collections.Generic.IReadOnlyList{Avalonia.Utilities.ValueSpan{Avalonia.Media.TextFormatting.TextRunProperties}})
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.TextFormatting.TextShaperOptions.#ctor(Avalonia.Media.GlyphTypeface,System.Collections.Generic.IReadOnlyList{Avalonia.Media.FontFeature},System.Double,System.SByte,System.Globalization.CultureInfo,System.Double,System.Double)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.TextFormatting.TextShaperOptions.#ctor(Avalonia.Media.GlyphTypeface,System.Double,System.SByte,System.Globalization.CultureInfo,System.Double,System.Double)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Platform.IDrawingContextImplWithEffects.PushEffect(Avalonia.Media.IEffect)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Platform.IFontManagerImpl.TryMatchCharacter(System.Int32,Avalonia.Media.FontStyle,Avalonia.Media.FontWeight,Avalonia.Media.FontStretch,System.Globalization.CultureInfo,Avalonia.Media.Typeface@)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Platform.IGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Platform.IGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Platform.IGeometryContext.LineTo(Avalonia.Point)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Platform.IGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Platform.IPlatformRenderInterfaceContext.CreateOffscreenRenderTarget(Avalonia.PixelSize,System.Double)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Platform.LockedFramebuffer.#ctor(System.IntPtr,Avalonia.PixelSize,System.Int32,Avalonia.Vector,Avalonia.Platform.PixelFormat,System.Action)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Rendering.Composition.ICompositionGpuImportedObject.get_ImportCompeted
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Utilities.AvaloniaResourcesIndexReaderWriter.WriteResources(System.IO.Stream,System.Collections.Generic.List{System.ValueTuple{System.String,System.Int32,System.Func{System.IO.Stream}}})
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Visuals.Platform.PathGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Visuals.Platform.PathGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Visuals.Platform.PathGeometryContext.LineTo(Avalonia.Point)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Visuals.Platform.PathGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0002
+ F:Avalonia.Controls.ContextMenu.PlacementModeProperty
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.Documents.Inline.TextDecorationsProperty
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.NativeMenuBar.EnableMenuItemClickForwardingProperty
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.NativeMenuItem.ToggleTypeProperty
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.Primitives.Popup.PlacementModeProperty
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.Primitives.ToggleButton.CheckedEvent
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.Primitives.ToggleButton.IndeterminateEvent
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.Primitives.ToggleButton.UncheckedEvent
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.TextBlock.LetterSpacingProperty
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.TextBox.LetterSpacingProperty
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.AppBuilder.get_LifetimeOverride
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Application.add_UrlsOpened(System.EventHandler{Avalonia.UrlOpenedEventArgs})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Application.remove_UrlsOpened(System.EventHandler{Avalonia.UrlOpenedEventArgs})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.ContextMenu.get_PlacementMode
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.ContextMenu.set_PlacementMode(Avalonia.Controls.PlacementMode)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.CreatePreviewWithControl(System.Object)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.GetDataContext(Avalonia.Controls.Templates.IDataTemplate)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.GetPreviewWith(Avalonia.Controls.Templates.IDataTemplate)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.GetPreviewWith(Avalonia.Styling.IStyle)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.SetDataContext(Avalonia.Controls.Templates.IDataTemplate,System.Object)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.AvaloniaObject,Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.AvaloniaObject,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.ResourceDictionary,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.Templates.IDataTemplate,Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.Templates.IDataTemplate,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Styling.IStyle,Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Styling.IStyle,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Generators.ItemContainerGenerator.ContainerFromIndex(System.Int32)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Generators.ItemContainerGenerator.IndexFromContainer(Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.ItemsControl.ItemsControlFromItemContaner(Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.NativeMenuBar.SetEnableMenuItemClickForwarding(Avalonia.Controls.MenuItem,System.Boolean)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.NativeMenuItem.get_ToggleType
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Platform.IInsetsManager.get_DisplayEdgeToEdge
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Platform.IInsetsManager.set_DisplayEdgeToEdge(System.Boolean)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Platform.InsetsManagerBase.get_DisplayEdgeToEdge
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Platform.InsetsManagerBase.set_DisplayEdgeToEdge(System.Boolean)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.OverlayPopupHost.ConfigurePosition(Avalonia.Visual,Avalonia.Controls.PlacementMode,Avalonia.Point,Avalonia.Controls.Primitives.PopupPositioning.PopupAnchor,Avalonia.Controls.Primitives.PopupPositioning.PopupGravity,Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment,System.Nullable{Avalonia.Rect})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.OverlayPopupHost.CreatePopupHost(Avalonia.Visual,Avalonia.IAvaloniaDependencyResolver)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.Popup.get_PlacementMode
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.Popup.set_PlacementMode(Avalonia.Controls.PlacementMode)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.PopupRoot.ConfigurePosition(Avalonia.Visual,Avalonia.Controls.PlacementMode,Avalonia.Point,Avalonia.Controls.Primitives.PopupPositioning.PopupAnchor,Avalonia.Controls.Primitives.PopupPositioning.PopupGravity,Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment,System.Nullable{Avalonia.Rect})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.TextSearch.GetText(Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.TextSearch.SetText(Avalonia.Controls.Control,System.String)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.ToggleButton.add_Checked(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.ToggleButton.add_Indeterminate(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.ToggleButton.add_Unchecked(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.ToggleButton.OnChecked(Avalonia.Interactivity.RoutedEventArgs)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.ToggleButton.OnIndeterminate(Avalonia.Interactivity.RoutedEventArgs)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.ToggleButton.OnUnchecked(Avalonia.Interactivity.RoutedEventArgs)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.ToggleButton.remove_Checked(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.ToggleButton.remove_Indeterminate(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Primitives.ToggleButton.remove_Unchecked(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Screens.ScreenFromWindow(Avalonia.Platform.IWindowBaseImpl)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.TabItem.SubscribeToOwnerProperties(Avalonia.AvaloniaObject)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.TreeView.get_ItemContainerGenerator
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Platform.Screen.#ctor(System.Double,Avalonia.PixelRect,Avalonia.PixelRect,System.Boolean)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Platform.Screen.get_PixelDensity
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Platform.Screen.get_Primary
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Platform.Screen.set_Bounds(Avalonia.PixelRect)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Platform.Screen.set_CurrentOrientation(Avalonia.Platform.ScreenOrientation)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Platform.Screen.set_DisplayName(System.String)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Platform.Screen.set_IsPrimary(System.Boolean)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Platform.Screen.set_Scaling(System.Double)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Platform.Screen.set_WorkingArea(Avalonia.PixelRect)
+ baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Dialogs.ManagedFileDialogExtensions.ShowManagedAsync(Avalonia.Controls.OpenFileDialog,Avalonia.Controls.Window,Avalonia.Dialogs.ManagedFileDialogOptions)
+ baseline/Avalonia/lib/net10.0/Avalonia.Dialogs.dll
+ current/Avalonia/lib/net10.0/Avalonia.Dialogs.dll
+
+
+ CP0002
+ M:Avalonia.Dialogs.ManagedFileDialogExtensions.ShowManagedAsync``1(Avalonia.Controls.OpenFileDialog,Avalonia.Controls.Window,Avalonia.Dialogs.ManagedFileDialogOptions)
+ baseline/Avalonia/lib/net10.0/Avalonia.Dialogs.dll
+ current/Avalonia/lib/net10.0/Avalonia.Dialogs.dll
+
+
+ CP0002
+ M:Avalonia.Data.Binding.#ctor(System.String,Avalonia.Data.BindingMode)
+ baseline/Avalonia/lib/net10.0/Avalonia.Markup.dll
+ current/Avalonia/lib/net10.0/Avalonia.Markup.dll
+
+
+ CP0002
+ M:Avalonia.Markup.Xaml.MarkupExtensions.ReflectionBindingExtension.#ctor(System.String,Avalonia.Data.BindingMode)
+ baseline/Avalonia/lib/net10.0/Avalonia.Markup.Xaml.dll
+ current/Avalonia/lib/net10.0/Avalonia.Markup.Xaml.dll
+
+
+ CP0002
+ M:Avalonia.Markup.Xaml.XamlLoadException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
+ baseline/Avalonia/lib/net10.0/Avalonia.Markup.Xaml.dll
+ current/Avalonia/lib/net10.0/Avalonia.Markup.Xaml.dll
+
+
+ CP0002
+ M:Avalonia.OpenGL.Egl.EglPlatformSurfaceRenderTargetBase.BeginDraw
+ baseline/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+
+
+ CP0002
+ M:Avalonia.OpenGL.Egl.EglPlatformSurfaceRenderTargetBase.BeginDrawCore
+ baseline/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+
+
+ CP0002
+ M:Avalonia.OpenGL.Surfaces.IGlPlatformSurfaceRenderTarget.BeginDraw
+ baseline/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+
+
+ CP0002
+ F:Avalonia.Media.Fonts.FontCollectionBase._glyphTypefaceCache
+ baseline/Avalonia/lib/net6.0/Avalonia.Base.dll
+ current/Avalonia/lib/net6.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.Fonts.FontCollectionBase.Initialize(Avalonia.Platform.IFontManagerImpl)
+ baseline/Avalonia/lib/net6.0/Avalonia.Base.dll
+ current/Avalonia/lib/net6.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Media.Fonts.IFontCollection.Initialize(Avalonia.Platform.IFontManagerImpl)
+ baseline/Avalonia/lib/net6.0/Avalonia.Base.dll
+ current/Avalonia/lib/net6.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Platform.IFontManagerImpl.TryMatchCharacter(System.Int32,Avalonia.Media.FontStyle,Avalonia.Media.FontWeight,Avalonia.Media.FontStretch,System.Globalization.CultureInfo,Avalonia.Media.Typeface@)
+ baseline/Avalonia/lib/net6.0/Avalonia.Base.dll
+ current/Avalonia/lib/net6.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Dialogs.Internal.ManagedFileChooserFilterViewModel.#ctor(Avalonia.Platform.Storage.FilePickerFileType)
+ baseline/Avalonia/lib/net6.0/Avalonia.Dialogs.dll
+ current/Avalonia/lib/net6.0/Avalonia.Dialogs.dll
+
+
+ CP0002
+ F:Avalonia.Controls.ResourcesChangedEventArgs.Empty
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ F:Avalonia.Data.BindingPriority.TemplatedParent
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ F:Avalonia.Input.DataFormats.FileNames
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ F:Avalonia.Input.DataFormats.Files
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ F:Avalonia.Input.DataFormats.Text
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ F:Avalonia.Media.DrawingImage.ViewboxProperty
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ F:Avalonia.Media.Fonts.FontCollectionBase._glyphTypefaceCache
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ F:Avalonia.Media.RadialGradientBrush.RadiusProperty
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Animation.Animation.SetAnimator(Avalonia.Animation.IAnimationSetter,Avalonia.Animation.CustomAnimatorBase)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.AvaloniaObjectExtensions.Bind(Avalonia.AvaloniaObject,Avalonia.AvaloniaProperty,Avalonia.Data.BindingBase,System.Object)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Controls.ResourcesChangedEventArgs.#ctor
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Data.CompiledBindingPathBuilder.SetRawSource(System.Object)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Data.ReflectionBinding.#ctor(System.String,Avalonia.Data.BindingMode)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.DataObject.Contains(System.String)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.DataObject.Get(System.String)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.DataObject.GetDataFormats
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.DataObject.Set(System.String,System.Object)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.DragDrop.DoDragDrop(Avalonia.Input.PointerEventArgs,Avalonia.Input.IDataObject,Avalonia.Input.DragDropEffects)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.DragEventArgs.#ctor(Avalonia.Interactivity.RoutedEvent{Avalonia.Input.DragEventArgs},Avalonia.Input.IDataObject,Avalonia.Interactivity.Interactive,Avalonia.Point,Avalonia.Input.KeyModifiers)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.DragEventArgs.get_Data
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.IKeyboardNavigationHandler.Move(Avalonia.Input.IInputElement,Avalonia.Input.NavigationDirection,Avalonia.Input.KeyModifiers)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.KeyboardNavigationHandler.Move(Avalonia.Input.IInputElement,Avalonia.Input.NavigationDirection,Avalonia.Input.KeyModifiers)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.Platform.IClipboard.GetDataAsync(System.String)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.Platform.IClipboard.GetFormatsAsync
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.Platform.IClipboard.GetTextAsync
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.Platform.IClipboard.SetDataObjectAsync(Avalonia.Input.IDataObject)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.Platform.IClipboard.SetTextAsync(System.String)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.Platform.IClipboard.TryGetInProcessDataObjectAsync
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.Platform.IPlatformDragSource.DoDragDrop(Avalonia.Input.PointerEventArgs,Avalonia.Input.IDataObject,Avalonia.Input.DragDropEffects)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+
+ CP0002
+ M:Avalonia.Input.Raw.RawDragEvent.#ctor(Avalonia.Input.Raw.IDragDropDevice,Avalonia.Input.Raw.RawDragEventType,Avalonia.Input.IInputRoot,Avalonia.Point,Avalonia.Input.IDataObject,Avalonia.Input.DragDropEffects,Avalonia.Input.RawInputModifiers)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.Templates.IDataTemplate,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Raw.RawDragEvent.get_Data
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Styling.IStyle,Avalonia.Controls.Control)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Raw.RawKeyEventArgs.#ctor(Avalonia.Input.IInputDevice,System.UInt64,Avalonia.Input.IInputRoot,Avalonia.Input.Raw.RawKeyEventType,Avalonia.Input.Key,Avalonia.Input.RawInputModifiers,Avalonia.Input.PhysicalKey,Avalonia.Input.KeyDeviceType,System.String)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Styling.IStyle,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Raw.RawKeyEventArgs.#ctor(Avalonia.Input.IInputDevice,System.UInt64,Avalonia.Input.IInputRoot,Avalonia.Input.Raw.RawKeyEventType,Avalonia.Input.Key,Avalonia.Input.RawInputModifiers,Avalonia.Input.PhysicalKey,System.String)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.NativeMenuBar.SetEnableMenuItemClickForwarding(Avalonia.Controls.MenuItem,System.Boolean)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.Raw.RawKeyEventArgs.#ctor(Avalonia.Input.IKeyboardDevice,System.UInt64,Avalonia.Input.IInputRoot,Avalonia.Input.Raw.RawKeyEventType,Avalonia.Input.Key,Avalonia.Input.RawInputModifiers)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.NativeMenuItem.get_ToggleType
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Input.TextInput.TextInputMethodClient.ShowInputPanel
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Primitives.OverlayPopupHost.ConfigurePosition(Avalonia.Visual,Avalonia.Controls.PlacementMode,Avalonia.Point,Avalonia.Controls.Primitives.PopupPositioning.PopupAnchor,Avalonia.Controls.Primitives.PopupPositioning.PopupGravity,Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment,System.Nullable{Avalonia.Rect})
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.Color.ToUint32
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Primitives.OverlayPopupHost.CreatePopupHost(Avalonia.Visual,Avalonia.IAvaloniaDependencyResolver)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.DrawingContext.PushPostTransform(Avalonia.Matrix)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Primitives.PopupRoot.ConfigurePosition(Avalonia.Visual,Avalonia.Controls.PlacementMode,Avalonia.Point,Avalonia.Controls.Primitives.PopupPositioning.PopupAnchor,Avalonia.Controls.Primitives.PopupPositioning.PopupGravity,Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment,System.Nullable{Avalonia.Rect})
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.DrawingContext.PushPreTransform(Avalonia.Matrix)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Primitives.TextSearch.GetText(Avalonia.Controls.Control)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.DrawingContext.PushTransformContainer
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.Primitives.TextSearch.SetText(Avalonia.Controls.Control,System.String)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.DrawingImage.get_Viewbox
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.Screen.#ctor(System.Double,Avalonia.PixelRect,Avalonia.PixelRect,System.Boolean)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.DrawingImage.set_Viewbox(System.Nullable{Avalonia.Rect})
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.Screen.set_Bounds(Avalonia.PixelRect)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.Fonts.FontCollectionBase.Initialize(Avalonia.Platform.IFontManagerImpl)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.Screen.set_CurrentOrientation(Avalonia.Platform.ScreenOrientation)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.Fonts.IFontCollection.Initialize(Avalonia.Platform.IFontManagerImpl)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.Screen.set_DisplayName(System.String)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.Imaging.Bitmap.CopyPixels(Avalonia.Platform.ILockedFramebuffer,Avalonia.Platform.AlphaFormat)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.Screen.set_IsPrimary(System.Boolean)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.Immutable.ImmutableRadialGradientBrush.get_Radius
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.Screen.set_Scaling(System.Double)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.IRadialGradientBrush.get_Radius
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.Screen.set_WorkingArea(Avalonia.PixelRect)
- baseline/Avalonia/lib/net10.0/Avalonia.Controls.dll
- current/Avalonia/lib/net10.0/Avalonia.Controls.dll
+ M:Avalonia.Media.RadialGradientBrush.get_Radius
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Data.Binding.#ctor(System.String,Avalonia.Data.BindingMode)
- baseline/Avalonia/lib/net10.0/Avalonia.Markup.dll
- current/Avalonia/lib/net10.0/Avalonia.Markup.dll
+ M:Avalonia.Media.RadialGradientBrush.set_Radius(System.Double)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Markup.Xaml.MarkupExtensions.ReflectionBindingExtension.#ctor(System.String,Avalonia.Data.BindingMode)
- baseline/Avalonia/lib/net10.0/Avalonia.Markup.Xaml.dll
- current/Avalonia/lib/net10.0/Avalonia.Markup.Xaml.dll
+ M:Avalonia.Media.StreamGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- F:Avalonia.Media.Fonts.FontCollectionBase._glyphTypefaceCache
- baseline/Avalonia/lib/net6.0/Avalonia.Base.dll
- current/Avalonia/lib/net6.0/Avalonia.Base.dll
+ M:Avalonia.Media.StreamGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.Fonts.FontCollectionBase.Initialize(Avalonia.Platform.IFontManagerImpl)
- baseline/Avalonia/lib/net6.0/Avalonia.Base.dll
- current/Avalonia/lib/net6.0/Avalonia.Base.dll
+ M:Avalonia.Media.StreamGeometryContext.LineTo(Avalonia.Point)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.Fonts.IFontCollection.Initialize(Avalonia.Platform.IFontManagerImpl)
- baseline/Avalonia/lib/net6.0/Avalonia.Base.dll
- current/Avalonia/lib/net6.0/Avalonia.Base.dll
+ M:Avalonia.Media.StreamGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Platform.IFontManagerImpl.TryMatchCharacter(System.Int32,Avalonia.Media.FontStyle,Avalonia.Media.FontWeight,Avalonia.Media.FontStretch,System.Globalization.CultureInfo,Avalonia.Media.Typeface@)
- baseline/Avalonia/lib/net6.0/Avalonia.Base.dll
- current/Avalonia/lib/net6.0/Avalonia.Base.dll
+ M:Avalonia.Media.TextFormatting.GenericTextRunProperties.#ctor(Avalonia.Media.Typeface,Avalonia.Media.FontFeatureCollection,System.Double,Avalonia.Media.TextDecorationCollection,Avalonia.Media.IBrush,Avalonia.Media.IBrush,Avalonia.Media.BaselineAlignment,System.Globalization.CultureInfo)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Dialogs.Internal.ManagedFileChooserFilterViewModel.#ctor(Avalonia.Platform.Storage.FilePickerFileType)
- baseline/Avalonia/lib/net6.0/Avalonia.Dialogs.dll
- current/Avalonia/lib/net6.0/Avalonia.Dialogs.dll
+ M:Avalonia.Media.TextFormatting.GenericTextRunProperties.#ctor(Avalonia.Media.Typeface,System.Double,Avalonia.Media.TextDecorationCollection,Avalonia.Media.IBrush,Avalonia.Media.IBrush,Avalonia.Media.BaselineAlignment,System.Globalization.CultureInfo)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- F:Avalonia.Controls.ResourcesChangedEventArgs.Empty
+ M:Avalonia.Media.TextFormatting.TextCollapsingProperties.CreateCollapsedRuns(Avalonia.Media.TextFormatting.TextLine,System.Int32,Avalonia.Media.FlowDirection,Avalonia.Media.TextFormatting.TextRun)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- F:Avalonia.Media.DrawingImage.ViewboxProperty
+ M:Avalonia.Media.TextFormatting.TextLayout.#ctor(System.String,Avalonia.Media.Typeface,Avalonia.Media.FontFeatureCollection,System.Double,Avalonia.Media.IBrush,Avalonia.Media.TextAlignment,Avalonia.Media.TextWrapping,Avalonia.Media.TextTrimming,Avalonia.Media.TextDecorationCollection,Avalonia.Media.FlowDirection,System.Double,System.Double,System.Double,System.Double,System.Int32,System.Collections.Generic.IReadOnlyList{Avalonia.Utilities.ValueSpan{Avalonia.Media.TextFormatting.TextRunProperties}})
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- F:Avalonia.Media.Fonts.FontCollectionBase._glyphTypefaceCache
+ M:Avalonia.Media.TextFormatting.TextLayout.#ctor(System.String,Avalonia.Media.Typeface,System.Double,Avalonia.Media.IBrush,Avalonia.Media.TextAlignment,Avalonia.Media.TextWrapping,Avalonia.Media.TextTrimming,Avalonia.Media.TextDecorationCollection,Avalonia.Media.FlowDirection,System.Double,System.Double,System.Double,System.Double,System.Int32,System.Collections.Generic.IReadOnlyList{Avalonia.Utilities.ValueSpan{Avalonia.Media.TextFormatting.TextRunProperties}})
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Controls.ResourcesChangedEventArgs.#ctor
+ M:Avalonia.Media.TextFormatting.TextShaperOptions.#ctor(Avalonia.Media.GlyphTypeface,System.Collections.Generic.IReadOnlyList{Avalonia.Media.FontFeature},System.Double,System.SByte,System.Globalization.CultureInfo,System.Double,System.Double)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Data.ReflectionBinding.#ctor(System.String,Avalonia.Data.BindingMode)
+ M:Avalonia.Media.TextFormatting.TextShaperOptions.#ctor(Avalonia.Media.GlyphTypeface,System.Double,System.SByte,System.Globalization.CultureInfo,System.Double,System.Double)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Input.IKeyboardNavigationHandler.Move(Avalonia.Input.IInputElement,Avalonia.Input.NavigationDirection,Avalonia.Input.KeyModifiers)
+ M:Avalonia.Platform.IDrawingContextImplWithEffects.PushEffect(Avalonia.Media.IEffect)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Input.KeyboardNavigationHandler.Move(Avalonia.Input.IInputElement,Avalonia.Input.NavigationDirection,Avalonia.Input.KeyModifiers)
+ M:Avalonia.Platform.IFontManagerImpl.TryMatchCharacter(System.Int32,Avalonia.Media.FontStyle,Avalonia.Media.FontWeight,Avalonia.Media.FontStretch,System.Globalization.CultureInfo,Avalonia.Media.Typeface@)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Input.TextInput.TextInputMethodClient.ShowInputPanel
+ M:Avalonia.Platform.IGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.DrawingImage.get_Viewbox
+ M:Avalonia.Platform.IGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.DrawingImage.set_Viewbox(System.Nullable{Avalonia.Rect})
+ M:Avalonia.Platform.IGeometryContext.LineTo(Avalonia.Point)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.Fonts.FontCollectionBase.Initialize(Avalonia.Platform.IFontManagerImpl)
+ M:Avalonia.Platform.IGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.Fonts.IFontCollection.Initialize(Avalonia.Platform.IFontManagerImpl)
+ M:Avalonia.Platform.IPlatformRenderInterfaceContext.CreateOffscreenRenderTarget(Avalonia.PixelSize,System.Double)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.Imaging.Bitmap.CopyPixels(Avalonia.Platform.ILockedFramebuffer,Avalonia.Platform.AlphaFormat)
+ M:Avalonia.Platform.LockedFramebuffer.#ctor(System.IntPtr,Avalonia.PixelSize,System.Int32,Avalonia.Vector,Avalonia.Platform.PixelFormat,System.Action)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.StreamGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
+ M:Avalonia.Rendering.Composition.ICompositionGpuImportedObject.get_ImportCompeted
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.StreamGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
+ M:Avalonia.Utilities.AvaloniaResourcesIndexReaderWriter.WriteResources(System.IO.Stream,System.Collections.Generic.List{System.ValueTuple{System.String,System.Int32,System.Func{System.IO.Stream}}})
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.StreamGeometryContext.LineTo(Avalonia.Point)
+ M:Avalonia.Visuals.Platform.PathGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.StreamGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
+ M:Avalonia.Visuals.Platform.PathGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.TextFormatting.GenericTextRunProperties.#ctor(Avalonia.Media.Typeface,Avalonia.Media.FontFeatureCollection,System.Double,Avalonia.Media.TextDecorationCollection,Avalonia.Media.IBrush,Avalonia.Media.IBrush,Avalonia.Media.BaselineAlignment,System.Globalization.CultureInfo)
+ M:Avalonia.Visuals.Platform.PathGeometryContext.LineTo(Avalonia.Point)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.TextFormatting.GenericTextRunProperties.#ctor(Avalonia.Media.Typeface,System.Double,Avalonia.Media.TextDecorationCollection,Avalonia.Media.IBrush,Avalonia.Media.IBrush,Avalonia.Media.BaselineAlignment,System.Globalization.CultureInfo)
+ M:Avalonia.Visuals.Platform.PathGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
CP0002
- M:Avalonia.Media.TextFormatting.TextCollapsingProperties.CreateCollapsedRuns(Avalonia.Media.TextFormatting.TextLine,System.Int32,Avalonia.Media.FlowDirection,Avalonia.Media.TextFormatting.TextRun)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ F:Avalonia.Controls.ContextMenu.PlacementModeProperty
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.Documents.Inline.TextDecorationsProperty
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.NativeMenuBar.EnableMenuItemClickForwardingProperty
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.NativeMenuItem.ToggleTypeProperty
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.Primitives.Popup.PlacementModeProperty
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.Primitives.ToggleButton.CheckedEvent
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.Primitives.ToggleButton.IndeterminateEvent
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.Primitives.ToggleButton.UncheckedEvent
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.TextBlock.LetterSpacingProperty
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ F:Avalonia.Controls.TextBox.LetterSpacingProperty
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.AppBuilder.get_LifetimeOverride
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Application.add_UrlsOpened(System.EventHandler{Avalonia.UrlOpenedEventArgs})
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Application.remove_UrlsOpened(System.EventHandler{Avalonia.UrlOpenedEventArgs})
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.ContextMenu.get_PlacementMode
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.ContextMenu.set_PlacementMode(Avalonia.Controls.PlacementMode)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.CreatePreviewWithControl(System.Object)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.GetDataContext(Avalonia.Controls.Templates.IDataTemplate)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
+
+
+ CP0002
+ M:Avalonia.Controls.Design.GetPreviewWith(Avalonia.Controls.Templates.IDataTemplate)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Media.TextFormatting.TextLayout.#ctor(System.String,Avalonia.Media.Typeface,Avalonia.Media.FontFeatureCollection,System.Double,Avalonia.Media.IBrush,Avalonia.Media.TextAlignment,Avalonia.Media.TextWrapping,Avalonia.Media.TextTrimming,Avalonia.Media.TextDecorationCollection,Avalonia.Media.FlowDirection,System.Double,System.Double,System.Double,System.Double,System.Int32,System.Collections.Generic.IReadOnlyList{Avalonia.Utilities.ValueSpan{Avalonia.Media.TextFormatting.TextRunProperties}})
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Design.GetPreviewWith(Avalonia.Styling.IStyle)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Media.TextFormatting.TextLayout.#ctor(System.String,Avalonia.Media.Typeface,System.Double,Avalonia.Media.IBrush,Avalonia.Media.TextAlignment,Avalonia.Media.TextWrapping,Avalonia.Media.TextTrimming,Avalonia.Media.TextDecorationCollection,Avalonia.Media.FlowDirection,System.Double,System.Double,System.Double,System.Double,System.Int32,System.Collections.Generic.IReadOnlyList{Avalonia.Utilities.ValueSpan{Avalonia.Media.TextFormatting.TextRunProperties}})
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Design.SetDataContext(Avalonia.Controls.Templates.IDataTemplate,System.Object)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Media.TextFormatting.TextShaperOptions.#ctor(Avalonia.Media.GlyphTypeface,System.Collections.Generic.IReadOnlyList{Avalonia.Media.FontFeature},System.Double,System.SByte,System.Globalization.CultureInfo,System.Double,System.Double)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.AvaloniaObject,Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Media.TextFormatting.TextShaperOptions.#ctor(Avalonia.Media.GlyphTypeface,System.Double,System.SByte,System.Globalization.CultureInfo,System.Double,System.Double)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.AvaloniaObject,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Platform.IDrawingContextImplWithEffects.PushEffect(Avalonia.Media.IEffect)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.ResourceDictionary,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Platform.IFontManagerImpl.TryMatchCharacter(System.Int32,Avalonia.Media.FontStyle,Avalonia.Media.FontWeight,Avalonia.Media.FontStretch,System.Globalization.CultureInfo,Avalonia.Media.Typeface@)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.Templates.IDataTemplate,Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Platform.IGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.Templates.IDataTemplate,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Platform.IGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Styling.IStyle,Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Platform.IGeometryContext.LineTo(Avalonia.Point)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Styling.IStyle,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Platform.IGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Generators.ItemContainerGenerator.ContainerFromIndex(System.Int32)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Platform.LockedFramebuffer.#ctor(System.IntPtr,Avalonia.PixelSize,System.Int32,Avalonia.Vector,Avalonia.Platform.PixelFormat,System.Action)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Generators.ItemContainerGenerator.IndexFromContainer(Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Visuals.Platform.PathGeometryContext.ArcTo(Avalonia.Point,Avalonia.Size,System.Double,System.Boolean,Avalonia.Media.SweepDirection)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.ItemsControl.ItemsControlFromItemContaner(Avalonia.Controls.Control)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Visuals.Platform.PathGeometryContext.CubicBezierTo(Avalonia.Point,Avalonia.Point,Avalonia.Point)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.NativeMenuBar.SetEnableMenuItemClickForwarding(Avalonia.Controls.MenuItem,System.Boolean)
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Visuals.Platform.PathGeometryContext.LineTo(Avalonia.Point)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.NativeMenuItem.get_ToggleType
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Visuals.Platform.PathGeometryContext.QuadraticBezierTo(Avalonia.Point,Avalonia.Point)
- baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
- current/Avalonia/lib/net8.0/Avalonia.Base.dll
+ M:Avalonia.Controls.Platform.IInsetsManager.get_DisplayEdgeToEdge
+ baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
+ current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- F:Avalonia.Controls.Documents.Inline.TextDecorationsProperty
+ M:Avalonia.Controls.Platform.IInsetsManager.set_DisplayEdgeToEdge(System.Boolean)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- F:Avalonia.Controls.NativeMenuBar.EnableMenuItemClickForwardingProperty
+ M:Avalonia.Controls.Platform.InsetsManagerBase.get_DisplayEdgeToEdge
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- F:Avalonia.Controls.NativeMenuItem.ToggleTypeProperty
+ M:Avalonia.Controls.Platform.InsetsManagerBase.set_DisplayEdgeToEdge(System.Boolean)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- F:Avalonia.Controls.TextBlock.LetterSpacingProperty
+ M:Avalonia.Controls.Primitives.OverlayPopupHost.ConfigurePosition(Avalonia.Visual,Avalonia.Controls.PlacementMode,Avalonia.Point,Avalonia.Controls.Primitives.PopupPositioning.PopupAnchor,Avalonia.Controls.Primitives.PopupPositioning.PopupGravity,Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment,System.Nullable{Avalonia.Rect})
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- F:Avalonia.Controls.TextBox.LetterSpacingProperty
+ M:Avalonia.Controls.Primitives.OverlayPopupHost.CreatePopupHost(Avalonia.Visual,Avalonia.IAvaloniaDependencyResolver)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.CreatePreviewWithControl(System.Object)
+ M:Avalonia.Controls.Primitives.Popup.get_PlacementMode
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.GetDataContext(Avalonia.Controls.Templates.IDataTemplate)
+ M:Avalonia.Controls.Primitives.Popup.set_PlacementMode(Avalonia.Controls.PlacementMode)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.GetPreviewWith(Avalonia.Controls.Templates.IDataTemplate)
+ M:Avalonia.Controls.Primitives.PopupRoot.ConfigurePosition(Avalonia.Visual,Avalonia.Controls.PlacementMode,Avalonia.Point,Avalonia.Controls.Primitives.PopupPositioning.PopupAnchor,Avalonia.Controls.Primitives.PopupPositioning.PopupGravity,Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment,System.Nullable{Avalonia.Rect})
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.GetPreviewWith(Avalonia.Styling.IStyle)
+ M:Avalonia.Controls.Primitives.TextSearch.GetText(Avalonia.Controls.Control)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.SetDataContext(Avalonia.Controls.Templates.IDataTemplate,System.Object)
+ M:Avalonia.Controls.Primitives.TextSearch.SetText(Avalonia.Controls.Control,System.String)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.AvaloniaObject,Avalonia.Controls.Control)
+ M:Avalonia.Controls.Primitives.ToggleButton.add_Checked(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.AvaloniaObject,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ M:Avalonia.Controls.Primitives.ToggleButton.add_Indeterminate(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.ResourceDictionary,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ M:Avalonia.Controls.Primitives.ToggleButton.add_Unchecked(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.Templates.IDataTemplate,Avalonia.Controls.Control)
+ M:Avalonia.Controls.Primitives.ToggleButton.OnChecked(Avalonia.Interactivity.RoutedEventArgs)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Controls.Templates.IDataTemplate,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ M:Avalonia.Controls.Primitives.ToggleButton.OnIndeterminate(Avalonia.Interactivity.RoutedEventArgs)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Styling.IStyle,Avalonia.Controls.Control)
+ M:Avalonia.Controls.Primitives.ToggleButton.OnUnchecked(Avalonia.Interactivity.RoutedEventArgs)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Design.SetPreviewWith(Avalonia.Styling.IStyle,Avalonia.Controls.ITemplate{Avalonia.Controls.Control})
+ M:Avalonia.Controls.Primitives.ToggleButton.remove_Checked(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.NativeMenuBar.SetEnableMenuItemClickForwarding(Avalonia.Controls.MenuItem,System.Boolean)
+ M:Avalonia.Controls.Primitives.ToggleButton.remove_Indeterminate(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.NativeMenuItem.get_ToggleType
+ M:Avalonia.Controls.Primitives.ToggleButton.remove_Unchecked(System.EventHandler{Avalonia.Interactivity.RoutedEventArgs})
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Primitives.OverlayPopupHost.ConfigurePosition(Avalonia.Visual,Avalonia.Controls.PlacementMode,Avalonia.Point,Avalonia.Controls.Primitives.PopupPositioning.PopupAnchor,Avalonia.Controls.Primitives.PopupPositioning.PopupGravity,Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment,System.Nullable{Avalonia.Rect})
+ M:Avalonia.Controls.Screens.ScreenFromWindow(Avalonia.Platform.IWindowBaseImpl)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Primitives.OverlayPopupHost.CreatePopupHost(Avalonia.Visual,Avalonia.IAvaloniaDependencyResolver)
+ M:Avalonia.Controls.TabItem.SubscribeToOwnerProperties(Avalonia.AvaloniaObject)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Primitives.PopupRoot.ConfigurePosition(Avalonia.Visual,Avalonia.Controls.PlacementMode,Avalonia.Point,Avalonia.Controls.Primitives.PopupPositioning.PopupAnchor,Avalonia.Controls.Primitives.PopupPositioning.PopupGravity,Avalonia.Controls.Primitives.PopupPositioning.PopupPositionerConstraintAdjustment,System.Nullable{Avalonia.Rect})
+ M:Avalonia.Controls.TreeView.get_ItemContainerGenerator
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Primitives.TextSearch.GetText(Avalonia.Controls.Control)
+ M:Avalonia.Platform.Screen.#ctor(System.Double,Avalonia.PixelRect,Avalonia.PixelRect,System.Boolean)
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Controls.Primitives.TextSearch.SetText(Avalonia.Controls.Control,System.String)
+ M:Avalonia.Platform.Screen.get_PixelDensity
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
CP0002
- M:Avalonia.Platform.Screen.#ctor(System.Double,Avalonia.PixelRect,Avalonia.PixelRect,System.Boolean)
+ M:Avalonia.Platform.Screen.get_Primary
baseline/Avalonia/lib/net8.0/Avalonia.Controls.dll
current/Avalonia/lib/net8.0/Avalonia.Controls.dll
@@ -985,6 +2185,18 @@
baseline/Avalonia/lib/net8.0/Avalonia.Dialogs.dll
current/Avalonia/lib/net8.0/Avalonia.Dialogs.dll
+
+ CP0002
+ M:Avalonia.Dialogs.ManagedFileDialogExtensions.ShowManagedAsync(Avalonia.Controls.OpenFileDialog,Avalonia.Controls.Window,Avalonia.Dialogs.ManagedFileDialogOptions)
+ baseline/Avalonia/lib/net8.0/Avalonia.Dialogs.dll
+ current/Avalonia/lib/net8.0/Avalonia.Dialogs.dll
+
+
+ CP0002
+ M:Avalonia.Dialogs.ManagedFileDialogExtensions.ShowManagedAsync``1(Avalonia.Controls.OpenFileDialog,Avalonia.Controls.Window,Avalonia.Dialogs.ManagedFileDialogOptions)
+ baseline/Avalonia/lib/net8.0/Avalonia.Dialogs.dll
+ current/Avalonia/lib/net8.0/Avalonia.Dialogs.dll
+
CP0002
M:Avalonia.Data.Binding.#ctor(System.String,Avalonia.Data.BindingMode)
@@ -997,6 +2209,30 @@
baseline/Avalonia/lib/net8.0/Avalonia.Markup.Xaml.dll
current/Avalonia/lib/net8.0/Avalonia.Markup.Xaml.dll
+
+ CP0002
+ M:Avalonia.Markup.Xaml.XamlLoadException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
+ baseline/Avalonia/lib/net8.0/Avalonia.Markup.Xaml.dll
+ current/Avalonia/lib/net8.0/Avalonia.Markup.Xaml.dll
+
+
+ CP0002
+ M:Avalonia.OpenGL.Egl.EglPlatformSurfaceRenderTargetBase.BeginDraw
+ baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
+
+ CP0002
+ M:Avalonia.OpenGL.Egl.EglPlatformSurfaceRenderTargetBase.BeginDrawCore
+ baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
+
+ CP0002
+ M:Avalonia.OpenGL.Surfaces.IGlPlatformSurfaceRenderTarget.BeginDraw
+ baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
CP0002
F:Avalonia.Media.Fonts.FontCollectionBase._glyphTypefaceCache
@@ -1039,6 +2275,18 @@
baseline/netstandard2.0/Avalonia.Base.dll
target/netstandard2.0/Avalonia.Base.dll
+
+ CP0005
+ M:Avalonia.OpenGL.Egl.EglPlatformSurfaceRenderTargetBase.BeginDrawCore(System.Nullable{Avalonia.PixelSize})
+ baseline/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+
+
+ CP0005
+ M:Avalonia.OpenGL.Egl.EglPlatformSurfaceRenderTargetBase.BeginDrawCore(System.Nullable{Avalonia.PixelSize})
+ baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
CP0006
M:Avalonia.Input.IKeyboardNavigationHandler.Move(Avalonia.Input.IInputElement,Avalonia.Input.NavigationDirection,Avalonia.Input.KeyModifiers,System.Nullable{Avalonia.Input.KeyDeviceType})
@@ -1093,18 +2341,54 @@
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+ CP0006
+ M:Avalonia.Platform.IPlatformRenderInterfaceContext.CreateOffscreenRenderTarget(Avalonia.PixelSize,Avalonia.Vector,System.Boolean)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0006
+ M:Avalonia.Platform.IRenderTarget.CreateDrawingContext(Avalonia.PixelSize,Avalonia.Platform.RenderTargetDrawingContextProperties@)
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
CP0006
P:Avalonia.Platform.ILockedFramebuffer.AlphaFormat
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+ CP0006
+ P:Avalonia.Platform.IPlatformRenderInterfaceContext.MaxOffscreenRenderTargetPixelSize
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
CP0006
P:Avalonia.Platform.IReadableBitmapImpl.AlphaFormat
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+ CP0006
+ P:Avalonia.Platform.IRenderTarget.Properties
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+
+ CP0006
+ M:Avalonia.OpenGL.Surfaces.IGlPlatformSurfaceRenderTarget.BeginDraw(System.Nullable{Avalonia.PixelSize})
+ baseline/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+
+
+ CP0006
+ P:Avalonia.OpenGL.Surfaces.IGlPlatformSurfaceRenderTarget.IsCorrupted
+ baseline/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+
CP0006
M:Avalonia.Input.Platform.IClipboard.SetDataAsync(Avalonia.Input.IAsyncDataTransfer)
@@ -1243,12 +2527,24 @@
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+ CP0006
+ M:Avalonia.Platform.IPlatformRenderInterfaceContext.CreateOffscreenRenderTarget(Avalonia.PixelSize,Avalonia.Vector,System.Boolean)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
CP0006
M:Avalonia.Platform.IPlatformRenderInterfaceImportedImage.SnapshotWithTimelineSemaphores(Avalonia.Platform.IPlatformRenderInterfaceImportedSemaphore,System.UInt64,Avalonia.Platform.IPlatformRenderInterfaceImportedSemaphore,System.UInt64)
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+ CP0006
+ M:Avalonia.Platform.IRenderTarget.CreateDrawingContext(Avalonia.PixelSize,Avalonia.Platform.RenderTargetDrawingContextProperties@)
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
CP0006
M:Avalonia.Platform.Storage.IStorageProvider.SaveFilePickerWithResultAsync(Avalonia.Platform.Storage.FilePickerSaveOptions)
@@ -1261,12 +2557,24 @@
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+ CP0006
+ P:Avalonia.Platform.IPlatformRenderInterfaceContext.MaxOffscreenRenderTargetPixelSize
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
CP0006
P:Avalonia.Platform.IReadableBitmapImpl.AlphaFormat
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+ CP0006
+ P:Avalonia.Platform.IRenderTarget.Properties
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
CP0006
M:Avalonia.OpenGL.IGlExternalSemaphore.SignalTimelineSemaphore(Avalonia.OpenGL.IGlExternalImageTexture,System.UInt64)
@@ -1279,12 +2587,24 @@
baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
+ CP0006
+ M:Avalonia.OpenGL.Surfaces.IGlPlatformSurfaceRenderTarget.BeginDraw(System.Nullable{Avalonia.PixelSize})
+ baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
CP0006
P:Avalonia.OpenGL.IGlExternalImageTexture.TextureType
baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
+ CP0006
+ P:Avalonia.OpenGL.Surfaces.IGlPlatformSurfaceRenderTarget.IsCorrupted
+ baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
CP0006
M:Avalonia.Input.Platform.IClipboard.SetDataAsync(Avalonia.Input.IAsyncDataTransfer)
@@ -1357,6 +2677,12 @@
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+ CP0008
+ T:Avalonia.Input.DataObject
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
CP0008
T:Avalonia.Media.ImmediateDrawingContext
@@ -1447,6 +2773,12 @@
baseline/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
current/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+
+ CP0008
+ T:Avalonia.OpenGL.Egl.EglPlatformSurfaceRenderTargetBase
+ baseline/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net10.0/Avalonia.OpenGL.dll
+
CP0008
T:Avalonia.OpenGL.IGlContext
@@ -1465,6 +2797,12 @@
baseline/Avalonia/lib/net10.0/Avalonia.Vulkan.dll
current/Avalonia/lib/net10.0/Avalonia.Vulkan.dll
+
+ CP0008
+ T:Avalonia.Input.DataObject
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
CP0008
T:Avalonia.Media.ImmediateDrawingContext
@@ -1555,6 +2893,12 @@
baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
+ CP0008
+ T:Avalonia.OpenGL.Egl.EglPlatformSurfaceRenderTargetBase
+ baseline/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+ current/Avalonia/lib/net8.0/Avalonia.OpenGL.dll
+
CP0008
T:Avalonia.OpenGL.IGlContext
@@ -1579,6 +2923,12 @@
baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
+ CP0009
+ T:Avalonia.Input.DataObject
+ baseline/Avalonia/lib/net10.0/Avalonia.Base.dll
+ current/Avalonia/lib/net10.0/Avalonia.Base.dll
+
CP0009
T:Avalonia.Platform.Screen
@@ -1591,6 +2941,12 @@
baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
+ CP0009
+ T:Avalonia.Input.DataObject
+ baseline/Avalonia/lib/net8.0/Avalonia.Base.dll
+ current/Avalonia/lib/net8.0/Avalonia.Base.dll
+
CP0009
T:Avalonia.Platform.Screen
diff --git a/native/Avalonia.Native/src/OSX/AvnView.mm b/native/Avalonia.Native/src/OSX/AvnView.mm
index 0da6f43bf4..600dca865f 100644
--- a/native/Avalonia.Native/src/OSX/AvnView.mm
+++ b/native/Avalonia.Native/src/OSX/AvnView.mm
@@ -42,7 +42,8 @@
- (void) updateRenderTarget
{
if(_currentRenderTarget) {
- [_currentRenderTarget resize:_lastPixelSize withScale:static_cast([[self window] backingScaleFactor])];
+ AvnPixelSize size { MAX(_lastPixelSize.Width, 1), MAX(_lastPixelSize.Height, 1) };
+ [_currentRenderTarget resize:size withScale:static_cast([[self window] backingScaleFactor])];
[self setNeedsDisplayInRect:[self frame]];
}
}
diff --git a/samples/BindingDemo/MainWindow.xaml b/samples/BindingDemo/MainWindow.xaml
index 9d68c8da8a..3ff80069f4 100644
--- a/samples/BindingDemo/MainWindow.xaml
+++ b/samples/BindingDemo/MainWindow.xaml
@@ -1,7 +1,7 @@
-
+
-
-
-
-
+
+
+
+
-
+
-
+
!BooleanString
!!BooleanString
@@ -43,24 +43,24 @@
-
+
-
-
-
-
+
-
+
@@ -91,19 +91,19 @@
-
+
-
+
-
-
+
+
-
+
-
-
+
+
diff --git a/samples/ControlCatalog/MainView.xaml b/samples/ControlCatalog/MainView.xaml
index 984daf1200..803ca52254 100644
--- a/samples/ControlCatalog/MainView.xaml
+++ b/samples/ControlCatalog/MainView.xaml
@@ -34,6 +34,9 @@
+
+
+
diff --git a/samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml b/samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml
index b682ebf51d..35e917f996 100644
--- a/samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml
+++ b/samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml
@@ -39,8 +39,12 @@
-
-
+
+
+
+
+
+
diff --git a/samples/ControlCatalog/Pages/BitmapCachePage.axaml b/samples/ControlCatalog/Pages/BitmapCachePage.axaml
new file mode 100644
index 0000000000..5902be8e51
--- /dev/null
+++ b/samples/ControlCatalog/Pages/BitmapCachePage.axaml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+ Render at scale
+
+ Scale
+
+ Enable clear type
+
+ Snap to device pixels
+ Subpixel offset X
+
+
+
+
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
+
+
+
+
+
diff --git a/samples/ControlCatalog/Pages/BitmapCachePage.axaml.cs b/samples/ControlCatalog/Pages/BitmapCachePage.axaml.cs
new file mode 100644
index 0000000000..92b3cbec68
--- /dev/null
+++ b/samples/ControlCatalog/Pages/BitmapCachePage.axaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace ControlCatalog.Pages;
+
+public partial class BitmapCachePage : UserControl
+{
+ public BitmapCachePage()
+ {
+ InitializeComponent();
+ }
+}
\ No newline at end of file
diff --git a/samples/ControlCatalog/Pages/CalendarDatePickerPage.xaml b/samples/ControlCatalog/Pages/CalendarDatePickerPage.xaml
index 7a22c0ddab..8734758d26 100644
--- a/samples/ControlCatalog/Pages/CalendarDatePickerPage.xaml
+++ b/samples/ControlCatalog/Pages/CalendarDatePickerPage.xaml
@@ -5,7 +5,7 @@
x:Class="ControlCatalog.Pages.CalendarDatePickerPage">
A control for selecting dates with a calendar drop-down
-
+
+ PlaceholderText="Placeholder"/>
-
+ PlaceholderText="Floating Placeholder"
+ UseFloatingPlaceholder="True"/>
+
+
+
+
-
+
-
+
diff --git a/samples/ControlCatalog/Pages/ClipboardPage.xaml b/samples/ControlCatalog/Pages/ClipboardPage.xaml
index 80b3f4d1ed..864a520aca 100644
--- a/samples/ControlCatalog/Pages/ClipboardPage.xaml
+++ b/samples/ControlCatalog/Pages/ClipboardPage.xaml
@@ -1,4 +1,4 @@
-
@@ -21,7 +21,7 @@
+ PlaceholderText="Text to copy of file names per line" />
diff --git a/samples/ControlCatalog/Pages/DialogsPage.xaml b/samples/ControlCatalog/Pages/DialogsPage.xaml
index 7320c1f3d7..e6b3568909 100644
--- a/samples/ControlCatalog/Pages/DialogsPage.xaml
+++ b/samples/ControlCatalog/Pages/DialogsPage.xaml
@@ -49,26 +49,17 @@
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
Desktop
@@ -80,17 +71,17 @@
-
+
-
+
+ PlaceholderText="Picked file content" />
diff --git a/samples/ControlCatalog/Pages/DialogsPage.xaml.cs b/samples/ControlCatalog/Pages/DialogsPage.xaml.cs
index 0e2ad7d2b9..892e320afc 100644
--- a/samples/ControlCatalog/Pages/DialogsPage.xaml.cs
+++ b/samples/ControlCatalog/Pages/DialogsPage.xaml.cs
@@ -1,23 +1,14 @@
using System;
using System.Buffers;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
-using System.Reflection;
using System.Security;
-using System.Text;
using System.Threading.Tasks;
using Avalonia;
using Avalonia.Controls;
-using Avalonia.Controls.Presenters;
using Avalonia.Dialogs;
using Avalonia.Layout;
-using Avalonia.Markup.Xaml;
using Avalonia.Platform.Storage;
-using Avalonia.Platform.Storage.FileIO;
-
-#pragma warning disable CS0618 // Type or member is obsolete
-#nullable enable
namespace ControlCatalog.Pages
{
@@ -70,14 +61,6 @@ namespace ControlCatalog.Pages
};
- List GetFilters()
- {
- return GetFileTypes()?.Select(f => new FileDialogFilter
- {
- Name = f.Name, Extensions = f.Patterns!.ToList()
- }).ToList() ?? new List();
- }
-
List? BuildFileTypes()
{
var selectedItem = (FilterSelector.SelectedItem as ComboBoxItem)?.Content
@@ -168,88 +151,12 @@ namespace ControlCatalog.Pages
void UpdateSuggestedFilterSelectorState() =>
suggestedFilterSelector.IsEnabled = useSuggestedFilter.IsChecked == true;
- useSuggestedFilter.Checked += (_, _) => UpdateSuggestedFilterSelectorState();
- useSuggestedFilter.Unchecked += (_, _) => UpdateSuggestedFilterSelectorState();
+ useSuggestedFilter.IsCheckedChanged += (_, _) => UpdateSuggestedFilterSelectorState();
UpdateSuggestedFilterSelectorState();
FilterSelector.SelectionChanged += (_, _) => UpdateSuggestedFilterSelector(BuildFileTypes());
UpdateSuggestedFilterSelector(BuildFileTypes());
- OpenFile.Click += async delegate
- {
- // Almost guaranteed to exist
- var uri = Assembly.GetEntryAssembly()?.GetModules().FirstOrDefault()?.FullyQualifiedName;
- var initialFileName = uri == null ? null : System.IO.Path.GetFileName(uri);
- var initialDirectory = uri == null ? null : System.IO.Path.GetDirectoryName(uri);
-
- var result = await new OpenFileDialog()
- {
- Title = "Open file",
- Filters = GetFilters(),
- Directory = initialDirectory,
- InitialFileName = initialFileName
- }.ShowAsync(GetWindow());
- results.ItemsSource = result;
- resultsVisible.IsVisible = result?.Any() == true;
- };
- OpenMultipleFiles.Click += async delegate
- {
- var result = await new OpenFileDialog()
- {
- Title = "Open multiple files",
- Filters = GetFilters(),
- Directory = lastSelectedDirectory?.Path is {IsAbsoluteUri:true} path ? path.LocalPath : null,
- AllowMultiple = true
- }.ShowAsync(GetWindow());
- results.ItemsSource = result;
- resultsVisible.IsVisible = result?.Any() == true;
- };
- SaveFile.Click += async delegate
- {
- var filters = GetFilters();
- var result = await new SaveFileDialog()
- {
- Title = "Save file",
- Filters = filters,
- Directory = lastSelectedDirectory?.Path is {IsAbsoluteUri:true} path ? path.LocalPath : null,
- DefaultExtension = filters?.Any() == true ? "txt" : null,
- InitialFileName = "test.txt"
- }.ShowAsync(GetWindow());
- results.ItemsSource = new[] { result };
- resultsVisible.IsVisible = result != null;
- };
- SelectFolder.Click += async delegate
- {
- var result = await new OpenFolderDialog()
- {
- Title = "Select folder",
- Directory = lastSelectedDirectory?.Path is {IsAbsoluteUri:true} path ? path.LocalPath : null,
- }.ShowAsync(GetWindow());
- if (string.IsNullOrEmpty(result))
- {
- resultsVisible.IsVisible = false;
- }
- else
- {
- SetFolder(await GetStorageProvider().TryGetFolderFromPathAsync(result!));
- results.ItemsSource = new[] { result };
- resultsVisible.IsVisible = true;
- }
- };
- OpenBoth.Click += async delegate
- {
- var result = await new OpenFileDialog()
- {
- Title = "Select both",
- Directory = lastSelectedDirectory?.Path is {IsAbsoluteUri:true} path ? path.LocalPath : null,
- AllowMultiple = true
- }.ShowManagedAsync(GetWindow(), new ManagedFileDialogOptions
- {
- AllowDirectorySelection = true
- });
- results.ItemsSource = result;
- resultsVisible.IsVisible = result?.Any() == true;
- };
DecoratedWindow.Click += delegate
{
new DecoratedWindow().Show();
diff --git a/samples/ControlCatalog/Pages/NumericUpDownPage.xaml b/samples/ControlCatalog/Pages/NumericUpDownPage.xaml
index b01b4a93bc..a112f79c02 100644
--- a/samples/ControlCatalog/Pages/NumericUpDownPage.xaml
+++ b/samples/ControlCatalog/Pages/NumericUpDownPage.xaml
@@ -1,4 +1,4 @@
-
- Watermark:
-
+ PlaceholderText:
+
Text:
@@ -81,23 +81,23 @@
+ PlaceholderText="Enter text" FormatString="{Binding SelectedFormat.Value}"/>
+ PlaceholderText="Enter text" FormatString="{Binding SelectedFormat.Value}"/>
-
+
+ PlaceholderText="Enter text" FormatString="{Binding SelectedFormat.Value}">
-
+
@@ -110,10 +110,18 @@
-
+
+
+
+
+
+
diff --git a/samples/ControlCatalog/Pages/TextBoxPage.xaml b/samples/ControlCatalog/Pages/TextBoxPage.xaml
index e2230e3cb6..346e561dfc 100644
--- a/samples/ControlCatalog/Pages/TextBoxPage.xaml
+++ b/samples/ControlCatalog/Pages/TextBoxPage.xaml
@@ -17,34 +17,41 @@
-
-
+
+
+
+
-
+
-
+
-
+
+ SelectionStart="5" SelectionEnd="22"
+ SelectionBrush="Green" SelectionForegroundBrush="Yellow" ClearSelectionOnLostFocus="False"/>
@@ -54,11 +61,11 @@
-
+
+ FontFamily="Comic Sans MS"
+ FontSize="10"
+ Foreground="Red"/>
-
diff --git a/samples/ControlCatalog/Pages/ThemePage.axaml b/samples/ControlCatalog/Pages/ThemePage.axaml
index 2d948c44a0..7eb95471a0 100644
--- a/samples/ControlCatalog/Pages/ThemePage.axaml
+++ b/samples/ControlCatalog/Pages/ThemePage.axaml
@@ -1,4 +1,4 @@
-
-
-
+
+
diff --git a/samples/Generators.Sandbox/Controls/SignUpView.xaml b/samples/Generators.Sandbox/Controls/SignUpView.xaml
index b256d7a31c..09313705f4 100644
--- a/samples/Generators.Sandbox/Controls/SignUpView.xaml
+++ b/samples/Generators.Sandbox/Controls/SignUpView.xaml
@@ -1,4 +1,4 @@
-
+ PlaceholderText="Please, enter user name..."
+ UseFloatingPlaceholder="True" />
+
+
diff --git a/samples/IntegrationTestApp/Pages/EmbeddingPage.axaml.cs b/samples/IntegrationTestApp/Pages/EmbeddingPage.axaml.cs
index 93855cd13d..465743afbf 100644
--- a/samples/IntegrationTestApp/Pages/EmbeddingPage.axaml.cs
+++ b/samples/IntegrationTestApp/Pages/EmbeddingPage.axaml.cs
@@ -1,10 +1,19 @@
+using System;
+using Avalonia.Automation;
using Avalonia.Controls;
+using Avalonia.Controls.Embedding;
using Avalonia.Interactivity;
+using IntegrationTestApp.Embedding;
+using MonoMac.AppKit;
+using MonoMac.CoreGraphics;
+using MonoMac.ObjCRuntime;
namespace IntegrationTestApp;
public partial class EmbeddingPage : UserControl
{
+ private const long NSModalResponseContinue = -1002;
+
public EmbeddingPage()
{
InitializeComponent();
@@ -19,5 +28,65 @@ public partial class EmbeddingPage : UserControl
private void Reset_Click(object? sender, RoutedEventArgs e)
{
ResetText();
+ ModalResultTextBox.Text = "";
+ }
+
+ private void RunNativeModalSession_OnClick(object? sender, RoutedEventArgs e)
+ {
+ MacHelper.EnsureInitialized();
+
+ var app = NSApplication.SharedApplication;
+ var modalWindow = CreateNativeWindow();
+ var session = app.BeginModalSession(modalWindow);
+
+ while (true)
+ {
+ if (app.RunModalSession(session) != NSModalResponseContinue)
+ break;
+ }
+
+ app.EndModalSession(session);
+ }
+
+ private NSWindow CreateNativeWindow()
+ {
+ var button = new Button
+ {
+ Name = "ButtonInModal",
+ Content = "Button"
+ };
+
+ AutomationProperties.SetAutomationId(button, "ButtonInModal");
+
+ var root = new EmbeddableControlRoot
+ {
+ Width = 200,
+ Height = 200,
+ Content = button
+ };
+ root.Prepare();
+
+ var window = new NSWindow(
+ new CGRect(0, 0, root.Width, root.Height),
+ NSWindowStyle.Titled | NSWindowStyle.Closable,
+ NSBackingStore.Buffered,
+ false);
+
+ window.Identifier = "ModalNativeWindow";
+ window.WillClose += (_, _) => NSApplication.SharedApplication.StopModal();
+
+ button.Click += (_, _) =>
+ {
+ ModalResultTextBox.Text = "Clicked";
+ window.Close();
+ };
+
+ if (root.TryGetPlatformHandle() is not { } handle)
+ throw new InvalidOperationException("Could not get platform handle");
+
+ window.ContentView = (NSView)Runtime.GetNSObject(handle.Handle)!;
+ root.StartRendering();
+
+ return window;
}
}
diff --git a/samples/IntegrationTestApp/Pages/ScreensPage.axaml b/samples/IntegrationTestApp/Pages/ScreensPage.axaml
index 2d95c4719a..7f0b341714 100644
--- a/samples/IntegrationTestApp/Pages/ScreensPage.axaml
+++ b/samples/IntegrationTestApp/Pages/ScreensPage.axaml
@@ -8,12 +8,12 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/samples/IntegrationTestApp/Pages/WindowDecorationsPage.axaml b/samples/IntegrationTestApp/Pages/WindowDecorationsPage.axaml
index d6b418952a..0a7dce9c02 100644
--- a/samples/IntegrationTestApp/Pages/WindowDecorationsPage.axaml
+++ b/samples/IntegrationTestApp/Pages/WindowDecorationsPage.axaml
@@ -10,7 +10,7 @@
-
+
diff --git a/samples/IntegrationTestApp/Pages/WindowPage.axaml b/samples/IntegrationTestApp/Pages/WindowPage.axaml
index 60900a4778..797c1c7170 100644
--- a/samples/IntegrationTestApp/Pages/WindowPage.axaml
+++ b/samples/IntegrationTestApp/Pages/WindowPage.axaml
@@ -6,7 +6,7 @@
x:Class="IntegrationTestApp.Pages.WindowPage">
-
+
NonOwned
Owned
diff --git a/samples/SafeAreaDemo/Views/MainView.xaml b/samples/SafeAreaDemo/Views/MainView.xaml
index 85163e7dad..c03ffc1f39 100644
--- a/samples/SafeAreaDemo/Views/MainView.xaml
+++ b/samples/SafeAreaDemo/Views/MainView.xaml
@@ -24,7 +24,7 @@
+ HorizontalContentAlignment="Right">View Bounds
Use Safe Area
Automatic Paddings
Hide System Bars
-
+
diff --git a/samples/SingleProjectSandbox/MainView.axaml b/samples/SingleProjectSandbox/MainView.axaml
index e1764b0795..b7f1bdaa53 100644
--- a/samples/SingleProjectSandbox/MainView.axaml
+++ b/samples/SingleProjectSandbox/MainView.axaml
@@ -5,10 +5,10 @@
x:DataType="local:MainView">
-
-
-
-
+
+
+
+
diff --git a/src/Android/Avalonia.Android/Platform/AndroidInsetsManager.cs b/src/Android/Avalonia.Android/Platform/AndroidInsetsManager.cs
index 4991a7547f..a8ab825808 100644
--- a/src/Android/Avalonia.Android/Platform/AndroidInsetsManager.cs
+++ b/src/Android/Avalonia.Android/Platform/AndroidInsetsManager.cs
@@ -318,8 +318,6 @@ namespace Avalonia.Android.Platform
}
}
- public bool DisplayEdgeToEdge { get => DisplaysEdgeToEdge; set => DisplayEdgeToEdgePreference = value; }
-
public bool DisplaysEdgeToEdge => _displaysEdgeToEdge;
internal void ApplyStatusBarState()
diff --git a/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs b/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs
index 8f133f266d..42f0877eca 100644
--- a/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs
+++ b/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs
@@ -26,7 +26,7 @@ using ClipboardManager = Android.Content.ClipboardManager;
namespace Avalonia.Android.Platform.SkiaPlatform
{
- class TopLevelImpl : IAndroidView, ITopLevelImpl, EglGlPlatformSurface.IEglWindowGlPlatformSurfaceInfoWithWaitPolicy
+ class TopLevelImpl : ITopLevelImpl, EglGlPlatformSurface.IEglWindowGlPlatformSurfaceInfoWithWaitPolicy
{
private readonly AndroidKeyboardEventsHelper _keyboardHelper;
private readonly AndroidMotionEventsHelper _pointerHelper;
diff --git a/src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidKeyboardEventsHelper.cs b/src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidKeyboardEventsHelper.cs
index 58fc59f804..03be7c2153 100644
--- a/src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidKeyboardEventsHelper.cs
+++ b/src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidKeyboardEventsHelper.cs
@@ -8,7 +8,7 @@ using Avalonia.Input.Raw;
namespace Avalonia.Android.Platform.Specific.Helpers
{
- internal class AndroidKeyboardEventsHelper : IDisposable where TView : TopLevelImpl, IAndroidView
+ internal class AndroidKeyboardEventsHelper : IDisposable where TView : TopLevelImpl
{
private readonly TView _view;
@@ -65,8 +65,8 @@ namespace Avalonia.Android.Platform.Specific.Helpers
AndroidKeyboardDevice.ConvertKey(e.KeyCode),
GetModifierKeys(e),
physicalKey,
- keyDeviceType,
- keySymbol);
+ keySymbol,
+ keyDeviceType);
_view.Input?.Invoke(rawKeyEvent);
diff --git a/src/Android/Avalonia.Android/Platform/Specific/IAndroidView.cs b/src/Android/Avalonia.Android/Platform/Specific/IAndroidView.cs
deleted file mode 100644
index 056912835a..0000000000
--- a/src/Android/Avalonia.Android/Platform/Specific/IAndroidView.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-using Android.Views;
-
-namespace Avalonia.Android.Platform.Specific
-{
- public interface IAndroidView
- {
- [Obsolete("Use TopLevel.TryGetPlatformHandle instead, which can be casted to AndroidViewControlHandle.")]
- View View { get; }
- }
-}
diff --git a/src/Avalonia.Base/Animation/Animation.AnimatorRegistry.cs b/src/Avalonia.Base/Animation/Animation.AnimatorRegistry.cs
index b07bd686b8..da3c4cb8e6 100644
--- a/src/Avalonia.Base/Animation/Animation.AnimatorRegistry.cs
+++ b/src/Avalonia.Base/Animation/Animation.AnimatorRegistry.cs
@@ -7,17 +7,6 @@ namespace Avalonia.Animation;
partial class Animation
{
- ///
- /// Sets the value of the Animator attached property for a setter.
- ///
- /// The animation setter.
- /// The property animator value.
- [Obsolete("CustomAnimatorBase will be removed before 11.0, use InterpolatingAnimator", true)]
- public static void SetAnimator(IAnimationSetter setter, CustomAnimatorBase value)
- {
- s_animators[setter] = (value.WrapperType, value.CreateWrapper);
- }
-
///
/// Sets the value of the Animator attached property for a setter.
///
@@ -92,4 +81,4 @@ partial class Animation
return null;
}
-}
\ No newline at end of file
+}
diff --git a/src/Avalonia.Base/Animation/Easings/CubicBezierEasing.cs b/src/Avalonia.Base/Animation/Easings/CubicBezierEasing.cs
deleted file mode 100644
index 2e43e97da2..0000000000
--- a/src/Avalonia.Base/Animation/Easings/CubicBezierEasing.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-
-namespace Avalonia.Animation.Easings;
-
-[Obsolete("Use SplineEasing instead")]
-public sealed class CubicBezierEasing : IEasing
-{
- private CubicBezierEasing()
- {
- }
-
- public Point ControlPoint2 { get; set; }
- public Point ControlPoint1 { get; set; }
-
- double IEasing.Ease(double progress)
- => throw new NotSupportedException();
-}
diff --git a/src/Avalonia.Base/Animation/ICustomAnimator.cs b/src/Avalonia.Base/Animation/ICustomAnimator.cs
index 119a6115da..7155af1223 100644
--- a/src/Avalonia.Base/Animation/ICustomAnimator.cs
+++ b/src/Avalonia.Base/Animation/ICustomAnimator.cs
@@ -2,34 +2,6 @@ using System;
using Avalonia.Animation.Animators;
namespace Avalonia.Animation;
-[Obsolete("This class will be removed before 11.0, use InterpolatingAnimator", true)]
-public abstract class CustomAnimatorBase
-{
- internal abstract IAnimator CreateWrapper();
- internal abstract Type WrapperType { get; }
-}
-
-[Obsolete("This class will be removed before 11.0, use InterpolatingAnimator", true)]
-public abstract class CustomAnimatorBase : CustomAnimatorBase
-{
- public abstract T Interpolate(double progress, T oldValue, T newValue);
-
- internal override Type WrapperType => typeof(AnimatorWrapper);
- internal override IAnimator CreateWrapper() => new AnimatorWrapper(this);
-
- internal class AnimatorWrapper : Animator
- {
- private readonly CustomAnimatorBase _parent;
-
- public AnimatorWrapper(CustomAnimatorBase parent)
- {
- _parent = parent;
- }
-
- public override T Interpolate(double progress, T oldValue, T newValue) => _parent.Interpolate(progress, oldValue, newValue);
- }
-}
-
public interface ICustomAnimator
{
internal IAnimator CreateWrapper();
@@ -55,4 +27,4 @@ public abstract class InterpolatingAnimator : ICustomAnimator
public override T Interpolate(double progress, T oldValue, T newValue) => _parent.Interpolate(progress, oldValue, newValue);
}
-}
\ No newline at end of file
+}
diff --git a/src/Avalonia.Base/AvaloniaObjectExtensions.cs b/src/Avalonia.Base/AvaloniaObjectExtensions.cs
index 7c4e67b5cc..3c9c047684 100644
--- a/src/Avalonia.Base/AvaloniaObjectExtensions.cs
+++ b/src/Avalonia.Base/AvaloniaObjectExtensions.cs
@@ -227,33 +227,6 @@ namespace Avalonia
};
}
- ///
- /// Binds a property on an to an .
- ///
- /// The object.
- /// The property to bind.
- /// The binding.
- ///
- /// An optional anchor from which to locate required context. When binding to objects that
- /// are not in the logical tree, certain types of binding need an anchor into the tree in
- /// order to locate named controls or resources. The parameter
- /// can be used to provide this context.
- ///
- /// An which can be used to cancel the binding.
- [Obsolete("Use AvaloniaObject.Bind(AvaloniaProperty, IBinding")]
- public static IDisposable Bind(
- this AvaloniaObject target,
- AvaloniaProperty property,
- BindingBase binding,
- object? anchor = null)
- {
- target = target ?? throw new ArgumentNullException(nameof(target));
- property = property ?? throw new ArgumentNullException(nameof(property));
- binding = binding ?? throw new ArgumentNullException(nameof(binding));
-
- return target.Bind(property, binding);
- }
-
///
/// Gets a value.
///
diff --git a/src/Avalonia.Base/Data/BindingPriority.cs b/src/Avalonia.Base/Data/BindingPriority.cs
index cb7f559e0a..b817c89f7b 100644
--- a/src/Avalonia.Base/Data/BindingPriority.cs
+++ b/src/Avalonia.Base/Data/BindingPriority.cs
@@ -46,9 +46,6 @@ namespace Avalonia.Data
///
/// The value is uninitialized.
///
- Unset = int.MaxValue,
-
- [Obsolete("Use Template priority"), EditorBrowsable(EditorBrowsableState.Never)]
- TemplatedParent = Template,
+ Unset = int.MaxValue
}
}
diff --git a/src/Avalonia.Base/Data/CompiledBinding.cs b/src/Avalonia.Base/Data/CompiledBinding.cs
index 952a5cddc4..e243246b4f 100644
--- a/src/Avalonia.Base/Data/CompiledBinding.cs
+++ b/src/Avalonia.Base/Data/CompiledBinding.cs
@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
using System.Globalization;
+using System.Linq.Expressions;
using Avalonia.Controls;
using Avalonia.Data.Converters;
using Avalonia.Data.Core;
@@ -27,6 +29,95 @@ public class CompiledBinding : BindingBase
/// The binding path.
public CompiledBinding(CompiledBindingPath path) => Path = path;
+ ///
+ /// Creates a from a lambda expression.
+ ///
+ /// The input type of the binding expression.
+ /// The output type of the binding expression.
+ ///
+ /// The lambda expression representing the binding path
+ /// (e.g., vm => vm.PropertyName).
+ ///
+ /// The source object for the binding. If null, uses the target's DataContext.
+ ///
+ ///
+ /// Optional value converter to transform values between source and target.
+ ///
+ ///
+ /// The binding mode. Default is which resolves to the
+ /// property's default binding mode.
+ ///
+ /// The binding priority.
+ /// The culture in which to evaluate the converter.
+ /// A parameter to pass to the converter.
+ ///
+ /// The value to use when the binding is unable to produce a value.
+ ///
+ /// The string format for the binding result.
+ /// The value to use when the binding result is null.
+ ///
+ /// The timing of binding source updates for TwoWay/OneWayToSource bindings.
+ ///
+ ///
+ /// The amount of time, in milliseconds, to wait before updating the binding source.
+ ///
+ ///
+ /// A configured instance ready to be applied to a property.
+ ///
+ ///
+ /// Thrown when the expression contains unsupported operations or invalid syntax for binding
+ /// expressions.
+ ///
+ ///
+ /// This builds a with a path described by a lambda expression.
+ /// The resulting binding avoids reflection for property access, providing better performance
+ /// than reflection-based bindings.
+ ///
+ /// Supported expressions include:
+ ///
+ /// - Property access: x => x.Property
+ /// - Nested properties: x => x.Property.Nested
+ /// - Indexers: x => x.Items[0]
+ /// - Type casts: x => ((DerivedType)x).Property
+ /// - Logical NOT: x => !x.BoolProperty
+ /// - Stream bindings: x => x.TaskProperty (Task/Observable)
+ /// - AvaloniaProperty access: x => x[MyProperty]
+ ///
+ ///
+ [RequiresDynamicCode(TrimmingMessages.ExpressionNodeRequiresDynamicCodeMessage)]
+ [RequiresUnreferencedCode(TrimmingMessages.ExpressionNodeRequiresUnreferencedCodeMessage)]
+ public static CompiledBinding Create(
+ Expression> expression,
+ object? source = null,
+ IValueConverter? converter = null,
+ BindingMode mode = BindingMode.Default,
+ BindingPriority priority = BindingPriority.LocalValue,
+ CultureInfo? converterCulture = null,
+ object? converterParameter = null,
+ object? fallbackValue = null,
+ string? stringFormat = null,
+ object? targetNullValue = null,
+ UpdateSourceTrigger updateSourceTrigger = UpdateSourceTrigger.Default,
+ int delay = 0)
+ {
+ var path = BindingExpressionVisitor.BuildPath(expression);
+ return new CompiledBinding(path)
+ {
+ Source = source ?? AvaloniaProperty.UnsetValue,
+ Converter = converter,
+ ConverterCulture = converterCulture,
+ ConverterParameter = converterParameter,
+ FallbackValue = fallbackValue ?? AvaloniaProperty.UnsetValue,
+ Mode = mode,
+ Priority = priority,
+ StringFormat = stringFormat,
+ TargetNullValue = targetNullValue ?? AvaloniaProperty.UnsetValue,
+ UpdateSourceTrigger = updateSourceTrigger,
+ Delay = delay
+ };
+ }
+
///
/// Gets or sets the amount of time, in milliseconds, to wait before updating the binding
/// source after the value on the target changes.
diff --git a/src/Avalonia.Base/Data/CompiledBindingPath.cs b/src/Avalonia.Base/Data/CompiledBindingPath.cs
index aea320702e..886d89df43 100644
--- a/src/Avalonia.Base/Data/CompiledBindingPath.cs
+++ b/src/Avalonia.Base/Data/CompiledBindingPath.cs
@@ -203,12 +203,6 @@ namespace Avalonia.Data
return this;
}
- [Obsolete("This method doesn't do anything anymore. Use Binding.Source instead.")]
- public CompiledBindingPathBuilder SetRawSource(object? rawSource)
- {
- return this;
- }
-
public CompiledBindingPath Build() => new CompiledBindingPath(_elements.ToArray());
}
diff --git a/src/Avalonia.Base/Data/Core/BindingExpression.cs b/src/Avalonia.Base/Data/Core/BindingExpression.cs
index 6ad1a99f41..00a90f87fe 100644
--- a/src/Avalonia.Base/Data/Core/BindingExpression.cs
+++ b/src/Avalonia.Base/Data/Core/BindingExpression.cs
@@ -173,59 +173,6 @@ internal class BindingExpression : UntypedBindingExpressionBase, IDescription, I
_nodes[0].SetSource(source, null);
}
- ///
- /// Creates an from an expression tree.
- ///
- /// The input type of the binding expression.
- /// The output type of the binding expression.
- /// The source from which the binding value will be read.
- /// The expression representing the binding path.
- /// The converter to use.
- /// The converter culture to use.
- /// The converter parameter.
- /// Whether data validation should be enabled for the binding.
- /// The fallback value.
- /// The binding mode.
- /// The binding priority.
- /// The null target value.
- /// Whether to allow reflection for target type conversion.
- [RequiresUnreferencedCode(TrimmingMessages.ExpressionNodeRequiresUnreferencedCodeMessage)]
-#if NET8_0_OR_GREATER
- [RequiresDynamicCode(TrimmingMessages.ExpressionNodeRequiresDynamicCodeMessage)]
-#endif
- internal static BindingExpression Create(
- TIn source,
- Expression> expression,
- IValueConverter? converter = null,
- CultureInfo? converterCulture = null,
- object? converterParameter = null,
- bool enableDataValidation = false,
- Optional
@@ -35,10 +34,7 @@ namespace Avalonia
ISetInheritanceParent,
ISupportInitialize,
INamed,
- IAvaloniaListItemValidator,
-#pragma warning disable CS0618 // Type or member is obsolete
- IStyleable
-#pragma warning restore CS0618 // Type or member is obsolete
+ IAvaloniaListItemValidator
{
///
/// Defines the property.
@@ -330,9 +326,6 @@ namespace Avalonia
bool IResourceNode.HasResources => (_resources?.HasResources ?? false) ||
(((IResourceNode?)_styles)?.HasResources ?? false);
- ///
- IAvaloniaReadOnlyList IStyleable.Classes => Classes;
-
///
bool IStyleHost.IsStylesInitialized => _styles != null;
@@ -668,7 +661,7 @@ namespace Avalonia
// If the Theme property is not set, try to find a ControlTheme resource with our StyleKey.
if (_implicitTheme is null)
{
- var key = GetStyleKey(this);
+ var key = StyleKey;
if (this.TryFindResource(key, out var value) && value is ControlTheme t)
_implicitTheme = t;
@@ -699,22 +692,6 @@ namespace Avalonia
}
}
- ///
- /// Internal getter for so that we only need to suppress the obsolete
- /// warning in one place.
- ///
- /// The element
- ///
- /// is obsolete and will be removed in a future version, but for backwards
- /// compatibility we need to support code which overrides .
- ///
- internal static Type GetStyleKey(StyledElement e)
- {
-#pragma warning disable CS0618 // Type or member is obsolete
- return ((IStyleable)e).StyleKey;
-#pragma warning restore CS0618 // Type or member is obsolete
- }
-
private static void DataContextNotifying(AvaloniaObject o, bool updateStarted)
{
if (o is StyledElement element)
diff --git a/src/Avalonia.Base/Styling/ControlTheme.cs b/src/Avalonia.Base/Styling/ControlTheme.cs
index fbd869a9a7..138c2f9de5 100644
--- a/src/Avalonia.Base/Styling/ControlTheme.cs
+++ b/src/Avalonia.Base/Styling/ControlTheme.cs
@@ -50,7 +50,7 @@ namespace Avalonia.Styling
using var activity = Diagnostic.AttachingStyle()?
.AddTag(Diagnostic.Tags.Style, this);
- if (HasSettersOrAnimations && TargetType.IsAssignableFrom(StyledElement.GetStyleKey(target)))
+ if (HasSettersOrAnimations && TargetType.IsAssignableFrom(target.StyleKey))
{
Attach(target, null, type, true);
activity?.AddTag(Diagnostic.Tags.SelectorResult, SelectorMatchResult.AlwaysThisType);
diff --git a/src/Avalonia.Base/Styling/IStyleable.cs b/src/Avalonia.Base/Styling/IStyleable.cs
deleted file mode 100644
index 0768669905..0000000000
--- a/src/Avalonia.Base/Styling/IStyleable.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using Avalonia.Collections;
-
-namespace Avalonia.Styling
-{
- ///
- /// Interface for styleable elements.
- ///
- [Obsolete("This interface may be removed in 12.0. Use StyledElement, or override StyledElement.StyleKeyOverride to override the StyleKey for a class.")]
- public interface IStyleable : INamed
- {
- ///
- /// Gets the list of classes for the control.
- ///
- IAvaloniaReadOnlyList Classes { get; }
-
- ///
- /// Gets the type by which the control is styled.
- ///
- [Obsolete("Override StyledElement.StyleKeyOverride instead.")]
- Type StyleKey { get; }
-
- ///
- /// Gets the template parent of this element if the control comes from a template.
- ///
- AvaloniaObject? TemplatedParent { get; }
- }
-}
diff --git a/src/Avalonia.Base/Styling/NestingSelector.cs b/src/Avalonia.Base/Styling/NestingSelector.cs
index 4f6920c224..07fc24b644 100644
--- a/src/Avalonia.Base/Styling/NestingSelector.cs
+++ b/src/Avalonia.Base/Styling/NestingSelector.cs
@@ -23,7 +23,7 @@ namespace Avalonia.Styling
{
if (theme.TargetType is null)
throw new InvalidOperationException("ControlTheme has no TargetType.");
- return theme.TargetType.IsAssignableFrom(StyledElement.GetStyleKey(control)) ?
+ return theme.TargetType.IsAssignableFrom(control.StyleKey) ?
SelectorMatch.AlwaysThisType :
SelectorMatch.NeverThisType;
}
@@ -31,7 +31,7 @@ namespace Avalonia.Styling
{
if (queryTheme.TargetType is null)
throw new InvalidOperationException("ControlTheme has no TargetType.");
- return queryTheme.TargetType.IsAssignableFrom(StyledElement.GetStyleKey(control)) ?
+ return queryTheme.TargetType.IsAssignableFrom(control.StyleKey) ?
SelectorMatch.AlwaysThisType :
SelectorMatch.NeverThisType;
}
diff --git a/src/Avalonia.Base/Styling/TypeNameAndClassSelector.cs b/src/Avalonia.Base/Styling/TypeNameAndClassSelector.cs
index 4fba8c02c6..4f78d91a38 100644
--- a/src/Avalonia.Base/Styling/TypeNameAndClassSelector.cs
+++ b/src/Avalonia.Base/Styling/TypeNameAndClassSelector.cs
@@ -93,7 +93,7 @@ namespace Avalonia.Styling
{
if (TargetType != null)
{
- var controlType = StyledElement.GetStyleKey(control) ?? control.GetType();
+ var controlType = control.StyleKey ?? control.GetType();
if (IsConcreteType)
{
diff --git a/src/Avalonia.Base/Utilities/AvaloniaResourcesIndex.cs b/src/Avalonia.Base/Utilities/AvaloniaResourcesIndex.cs
index 452898937d..d84d9cf737 100644
--- a/src/Avalonia.Base/Utilities/AvaloniaResourcesIndex.cs
+++ b/src/Avalonia.Base/Utilities/AvaloniaResourcesIndex.cs
@@ -67,14 +67,6 @@ namespace Avalonia.Utilities
}
}
- [Obsolete]
- public static void WriteResources(Stream output, List<(string Path, int Size, Func Open)> resources)
- {
- WriteResources(output,
- resources.Select(r => new AvaloniaResourcesEntry { Path = r.Path, Open = r.Open, Size = r.Size })
- .ToList());
- }
-
public static void WriteResources(Stream output, IReadOnlyList resources)
{
var entries = new List();
diff --git a/src/Avalonia.Base/Utilities/MathUtilities.cs b/src/Avalonia.Base/Utilities/MathUtilities.cs
index 01f041c5ee..1ebf4f6457 100644
--- a/src/Avalonia.Base/Utilities/MathUtilities.cs
+++ b/src/Avalonia.Base/Utilities/MathUtilities.cs
@@ -18,7 +18,7 @@ namespace Avalonia.Utilities
// smallest such that 1.0+DoubleEpsilon != 1.0
internal const double DoubleEpsilon = 2.2204460492503131e-016;
- private const float FloatEpsilon = 1.192092896e-07F;
+ internal const float FloatEpsilon = 1.192092896e-07F;
///
/// AreClose - Returns whether or not two doubles are "close". That is, whether or
diff --git a/src/Avalonia.Base/Visual.Composition.cs b/src/Avalonia.Base/Visual.Composition.cs
index a1f90a5407..be2d42782d 100644
--- a/src/Avalonia.Base/Visual.Composition.cs
+++ b/src/Avalonia.Base/Visual.Composition.cs
@@ -144,6 +144,10 @@ public partial class Visual
if (!Equals(comp.OpacityMask, OpacityMask))
comp.OpacityMask = OpacityMask;
+ var cacheMode = CacheMode?.GetForCompositor(comp.Compositor);
+ if (!ReferenceEquals(comp.CacheMode, cacheMode))
+ comp.CacheMode = cacheMode;
+
if (!comp.Effect.EffectEquals(Effect))
comp.Effect = Effect?.ToImmutable();
diff --git a/src/Avalonia.Base/Visual.cs b/src/Avalonia.Base/Visual.cs
index ee960cee1e..843914dc1d 100644
--- a/src/Avalonia.Base/Visual.cs
+++ b/src/Avalonia.Base/Visual.cs
@@ -68,6 +68,12 @@ namespace Avalonia
public static readonly StyledProperty OpacityMaskProperty =
AvaloniaProperty.Register(nameof(OpacityMask));
+ ///
+ /// Defines the property.
+ ///
+ public static readonly StyledProperty CacheModeProperty = AvaloniaProperty.Register(
+ nameof(CacheMode));
+
///
/// Defines the property.
///
@@ -256,6 +262,15 @@ namespace Avalonia
set { SetValue(OpacityMaskProperty, value); }
}
+ ///
+ /// Gets or sets the cache mode of the visual.
+ ///
+ public CacheMode? CacheMode
+ {
+ get => GetValue(CacheModeProperty);
+ set => SetValue(CacheModeProperty, value);
+ }
+
///
/// Gets or sets the effect of the control.
///
@@ -326,11 +341,11 @@ namespace Avalonia
///
protected internal IRenderRoot? VisualRoot => _visualRoot;
- internal RenderOptions RenderOptions
- {
+ internal RenderOptions RenderOptions
+ {
get => _renderOptions;
- set
- {
+ set
+ {
_renderOptions = value;
InvalidateVisual();
}
diff --git a/src/Avalonia.Base/VisualTree/VisualExtensions.cs b/src/Avalonia.Base/VisualTree/VisualExtensions.cs
index 670d879f29..55176a6502 100644
--- a/src/Avalonia.Base/VisualTree/VisualExtensions.cs
+++ b/src/Avalonia.Base/VisualTree/VisualExtensions.cs
@@ -358,14 +358,7 @@ namespace Avalonia.VisualTree
return Array.Empty();
}
- var rootPoint = visual.TranslatePoint(p, (Visual)root);
-
- if (rootPoint.HasValue)
- {
- return root.HitTester.HitTest(rootPoint.Value, visual, filter);
- }
-
- return Enumerable.Empty();
+ return root.HitTester.HitTest(p, visual, filter);
}
///
diff --git a/src/Avalonia.Base/composition-schema.xml b/src/Avalonia.Base/composition-schema.xml
index dd1d284cd5..febf465042 100644
--- a/src/Avalonia.Base/composition-schema.xml
+++ b/src/Avalonia.Base/composition-schema.xml
@@ -35,17 +35,18 @@
-
+
-
+
-
+
-
+
@@ -110,4 +111,11 @@
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Controls/AppBuilder.cs b/src/Avalonia.Controls/AppBuilder.cs
index dbf8482ee7..9d6bcff813 100644
--- a/src/Avalonia.Controls/AppBuilder.cs
+++ b/src/Avalonia.Controls/AppBuilder.cs
@@ -1,11 +1,8 @@
using System;
-using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
-using System.Linq;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Platform;
-using Avalonia.Media.Fonts;
using Avalonia.Media;
using Avalonia.Metadata;
@@ -56,13 +53,6 @@ namespace Avalonia
///
public Action? RenderingSubsystemInitializer { get; private set; }
- ///
- /// Gets a method to override a lifetime factory.
- ///
- [Obsolete("This property has no effect", true)]
- [DebuggerBrowsable(DebuggerBrowsableState.Never)]
- public Func? LifetimeOverride { get; private set; }
-
///
/// Gets the name of the currently selected rendering subsystem.
///
diff --git a/src/Avalonia.Controls/Application.cs b/src/Avalonia.Controls/Application.cs
index ff04499c42..90e272c7bd 100644
--- a/src/Avalonia.Controls/Application.cs
+++ b/src/Avalonia.Controls/Application.cs
@@ -30,7 +30,7 @@ namespace Avalonia
/// method.
/// - Tracks the lifetime of the application.
///
- public class Application : AvaloniaObject, IDataContextProvider, IGlobalDataTemplates, IGlobalStyles, IThemeVariantHost, IResourceHost, IApplicationPlatformEvents, IOptionalFeatureProvider
+ public class Application : AvaloniaObject, IDataContextProvider, IGlobalDataTemplates, IGlobalStyles, IThemeVariantHost, IResourceHost, IOptionalFeatureProvider
{
///
/// The application-global data templates.
@@ -61,9 +61,6 @@ namespace Avalonia
///
public event EventHandler? ResourcesChanged;
- [Obsolete("Use Application.Current.TryGetFeature() instead.")]
- public event EventHandler? UrlsOpened;
-
///
public event EventHandler? ActualThemeVariantChanged;
@@ -177,8 +174,8 @@ namespace Avalonia
/// Currently supported lifetimes are:
/// -
/// -
- /// -
- /// -
+ /// -
+ /// -
///
public IApplicationLifetime? ApplicationLifetime
{
@@ -283,11 +280,6 @@ namespace Avalonia
public virtual void OnFrameworkInitializationCompleted()
{
}
-
- void IApplicationPlatformEvents.RaiseUrlsOpened(string[] urls)
- {
- UrlsOpened?.Invoke(this, new UrlOpenedEventArgs (urls));
- }
private string? _name;
///
diff --git a/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs b/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs
index 35e63e8ef5..8d509832fa 100644
--- a/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs
+++ b/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs
@@ -99,16 +99,6 @@ namespace Avalonia.Controls.ApplicationLifetimes
Startup?.Invoke(this, new ControlledApplicationLifetimeStartupEventArgs(args));
- var options = AvaloniaLocator.Current.GetService();
-
- if(options != null && options.ProcessUrlActivationCommandLine && args.Length > 0)
- {
- if (Application.Current is IApplicationPlatformEvents events)
- {
- events.RaiseUrlsOpened(args);
- }
- }
-
var lifetimeEvents = AvaloniaLocator.Current.GetService();
if (lifetimeEvents != null)
@@ -223,11 +213,6 @@ namespace Avalonia.Controls.ApplicationLifetimes
private void OnShutdownRequested(object? sender, ShutdownRequestedEventArgs e) => DoShutdown(e, false);
}
-
- public class ClassicDesktopStyleApplicationLifetimeOptions
- {
- public bool ProcessUrlActivationCommandLine { get; set; }
- }
}
namespace Avalonia
diff --git a/src/Avalonia.Controls/ApplicationLifetimes/IActivatableApplicationLifetime.cs b/src/Avalonia.Controls/ApplicationLifetimes/IActivatableApplicationLifetime.cs
index e07e8cd6a1..23e3546d50 100644
--- a/src/Avalonia.Controls/ApplicationLifetimes/IActivatableApplicationLifetime.cs
+++ b/src/Avalonia.Controls/ApplicationLifetimes/IActivatableApplicationLifetime.cs
@@ -1,15 +1,8 @@
using System;
-using System.Diagnostics;
using Avalonia.Metadata;
namespace Avalonia.Controls.ApplicationLifetimes;
-[NotClientImplementable]
-[Obsolete("This interface has no effect. Instead use Application.Current.TryGetFeature().", true)]
-public interface IActivatableApplicationLifetime : IActivatableLifetime {
-
-}
-
///
/// An interface for ApplicationLifetimes where the application can be Activated and Deactivated.
///
diff --git a/src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.Properties.cs b/src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.Properties.cs
index 45566f186b..1faa9b340e 100644
--- a/src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.Properties.cs
+++ b/src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.Properties.cs
@@ -1,4 +1,4 @@
-// (c) Copyright Microsoft Corporation.
+// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see https://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
@@ -24,8 +24,37 @@ namespace Avalonia.Controls
defaultValue: 0,
defaultBindingMode: BindingMode.TwoWay));
- public static readonly StyledProperty WatermarkProperty =
- TextBox.WatermarkProperty.AddOwner();
+ ///
+ /// Defines the property.
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1013",
+ Justification = "We keep WatermarkProperty for backward compatibility.")]
+ public static readonly StyledProperty PlaceholderTextProperty =
+ TextBox.PlaceholderTextProperty.AddOwner();
+
+ ///
+ /// Defines the property.
+ ///
+ [Obsolete("Use PlaceholderTextProperty instead.", false)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022",
+ Justification = "Obsolete property alias for backward compatibility.")]
+ public static readonly StyledProperty WatermarkProperty = PlaceholderTextProperty;
+
+ ///
+ /// Defines the property.
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1013",
+ Justification = "We keep WatermarkForegroundProperty for backward compatibility.")]
+ public static readonly StyledProperty PlaceholderForegroundProperty =
+ TextBox.PlaceholderForegroundProperty.AddOwner();
+
+ ///
+ /// Defines the property.
+ ///
+ [Obsolete("Use PlaceholderForegroundProperty instead.", false)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022",
+ Justification = "Obsolete property alias for backward compatibility.")]
+ public static readonly StyledProperty WatermarkForegroundProperty = PlaceholderForegroundProperty;
///
/// Identifies the property.
@@ -406,10 +435,46 @@ namespace Avalonia.Controls
set => SetValue(FilterModeProperty, value);
}
+ ///
+ /// Gets or sets the placeholder or descriptive text that is displayed even if the text is not yet set.
+ ///
+ public string? PlaceholderText
+ {
+ get => GetValue(PlaceholderTextProperty);
+ set => SetValue(PlaceholderTextProperty, value);
+ }
+
+ ///
+ /// Gets or sets the placeholder or descriptive text that is displayed even if the text is not yet set.
+ ///
+ [Obsolete("Use PlaceholderText instead.", false)]
public string? Watermark
{
- get => GetValue(WatermarkProperty);
- set => SetValue(WatermarkProperty, value);
+ get => PlaceholderText;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
+ Justification = "Obsolete property setter for backward compatibility.")]
+ set => PlaceholderText = value;
+ }
+
+ ///
+ /// Gets or sets the brush used for the foreground color of the placeholder text.
+ ///
+ public Media.IBrush? PlaceholderForeground
+ {
+ get => GetValue(PlaceholderForegroundProperty);
+ set => SetValue(PlaceholderForegroundProperty, value);
+ }
+
+ ///
+ /// Gets or sets the brush used for the foreground color of the placeholder text.
+ ///
+ [Obsolete("Use PlaceholderForeground instead.", false)]
+ public Media.IBrush? WatermarkForeground
+ {
+ get => PlaceholderForeground;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
+ Justification = "Obsolete property setter for backward compatibility.")]
+ set => PlaceholderForeground = value;
}
///
diff --git a/src/Avalonia.Controls/BorderVisual.cs b/src/Avalonia.Controls/BorderVisual.cs
index f51cccbe7c..5a50650e5c 100644
--- a/src/Avalonia.Controls/BorderVisual.cs
+++ b/src/Avalonia.Controls/BorderVisual.cs
@@ -70,27 +70,24 @@ class CompositionBorderVisual : CompositionDrawListVisual
protected override void RenderCore(ServerVisualRenderContext ctx, LtrbRect currentTransformedClip)
{
- var canvas = ctx.Canvas;
- RenderOwnContent(ctx, currentTransformedClip);
-
- if (ClipToBounds)
+ if (ClipToBounds && Clip == null)
{
- var clipRect = Root!.SnapToDevicePixels(new Rect(new Size(Size.X, Size.Y)));
+ var canvas = ctx.Canvas;
+ canvas.PopClip();
+ base.RenderCore(ctx, currentTransformedClip);
+
+ var clipRect = new Rect(new Size(Size.X, Size.Y));
var keypoints = GeometryBuilder.CalculateRoundedCornersRectangleWinUI(
clipRect,
_borderThickness,
_cornerRadius,
BackgroundSizing.InnerBorderEdge);
canvas.PushClip(keypoints.ToRoundedRect());
+ return;
}
- RenderChildren(ctx, currentTransformedClip);
-
- if (ClipToBounds)
- canvas.PopClip();
-
+ base.RenderCore(ctx, currentTransformedClip);
}
-
protected override void DeserializeChangesCore(BatchStreamReader reader, TimeSpan committedAt)
{
base.DeserializeChangesCore(reader, committedAt);
@@ -100,7 +97,18 @@ class CompositionBorderVisual : CompositionDrawListVisual
_borderThickness = reader.Read();
}
- protected override bool HandlesClipToBounds => true;
+
+ protected override void PushClipToBounds(IDrawingContextImpl canvas)
+ {
+ var clipRect = new Rect(new Size(Size.X, Size.Y));
+ var keypoints = GeometryBuilder.CalculateRoundedCornersRectangleWinUI(
+ clipRect,
+ _borderThickness,
+ _cornerRadius,
+ BackgroundSizing.InnerBorderEdge);
+ canvas.PushClip(keypoints.ToRoundedRect());
+ }
+
}
}
diff --git a/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.Properties.cs b/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.Properties.cs
index 1454b4ab6c..864ba86ef0 100644
--- a/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.Properties.cs
+++ b/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.Properties.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using Avalonia.Controls.Primitives;
using Avalonia.Data;
using Avalonia.Layout;
@@ -53,7 +53,7 @@ namespace Avalonia.Controls
public static readonly StyledProperty SelectedDateProperty =
AvaloniaProperty.Register(
nameof(SelectedDate),
- enableDataValidation: true,
+ enableDataValidation: true,
defaultBindingMode:BindingMode.TwoWay);
///
@@ -80,17 +80,53 @@ namespace Avalonia.Controls
public static readonly StyledProperty TextProperty =
AvaloniaProperty.Register(nameof(Text));
+ ///
+ /// Defines the property.
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1013",
+ Justification = "We keep WatermarkProperty for backward compatibility.")]
+ public static readonly StyledProperty PlaceholderTextProperty =
+ TextBox.PlaceholderTextProperty.AddOwner();
+
///
/// Defines the property.
///
- public static readonly StyledProperty WatermarkProperty =
- TextBox.WatermarkProperty.AddOwner();
+ [Obsolete("Use PlaceholderTextProperty instead.", false)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022",
+ Justification = "Obsolete property alias for backward compatibility.")]
+ public static readonly StyledProperty WatermarkProperty = PlaceholderTextProperty;
+
+ ///
+ /// Defines the property.
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1013",
+ Justification = "We keep UseFloatingWatermarkProperty for backward compatibility.")]
+ public static readonly StyledProperty UseFloatingPlaceholderProperty =
+ TextBox.UseFloatingPlaceholderProperty.AddOwner();
///
/// Defines the property.
///
- public static readonly StyledProperty UseFloatingWatermarkProperty =
- TextBox.UseFloatingWatermarkProperty.AddOwner();
+ [Obsolete("Use UseFloatingPlaceholderProperty instead.", false)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022",
+ Justification = "Obsolete property alias for backward compatibility.")]
+ public static readonly StyledProperty UseFloatingWatermarkProperty = UseFloatingPlaceholderProperty;
+
+ ///
+ /// Defines the property.
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1013",
+ Justification = "We keep WatermarkForegroundProperty for backward compatibility.")]
+ public static readonly StyledProperty PlaceholderForegroundProperty =
+ TextBox.PlaceholderForegroundProperty.AddOwner();
+
+ ///
+ /// Defines the property.
+ ///
+ [Obsolete("Use PlaceholderForegroundProperty instead.", false)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022",
+ Justification = "Obsolete property alias for backward compatibility.")]
+ public static readonly StyledProperty WatermarkForegroundProperty = PlaceholderForegroundProperty;
///
/// Defines the property.
@@ -130,7 +166,7 @@ namespace Avalonia.Controls
get => GetValue(DisplayDateProperty);
set => SetValue(DisplayDateProperty, value);
}
-
+
///
/// Gets or sets the first date to be displayed.
///
@@ -254,18 +290,55 @@ namespace Avalonia.Controls
set => SetValue(TextProperty, value);
}
+ ///
+ public string? PlaceholderText
+ {
+ get => GetValue(PlaceholderTextProperty);
+ set => SetValue(PlaceholderTextProperty, value);
+ }
+
///
+ [Obsolete("Use PlaceholderText instead.", false)]
public string? Watermark
{
- get => GetValue(WatermarkProperty);
- set => SetValue(WatermarkProperty, value);
+ get => PlaceholderText;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
+ Justification = "Obsolete property setter for backward compatibility.")]
+ set => PlaceholderText = value;
+ }
+
+ ///
+ public bool UseFloatingPlaceholder
+ {
+ get => GetValue(UseFloatingPlaceholderProperty);
+ set => SetValue(UseFloatingPlaceholderProperty, value);
}
///
+ [Obsolete("Use UseFloatingPlaceholder instead.", false)]
public bool UseFloatingWatermark
{
- get => GetValue(UseFloatingWatermarkProperty);
- set => SetValue(UseFloatingWatermarkProperty, value);
+ get => UseFloatingPlaceholder;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
+ Justification = "Obsolete property setter for backward compatibility.")]
+ set => UseFloatingPlaceholder = value;
+ }
+
+ ///
+ public Media.IBrush? PlaceholderForeground
+ {
+ get => GetValue(PlaceholderForegroundProperty);
+ set => SetValue(PlaceholderForegroundProperty, value);
+ }
+
+ ///
+ [Obsolete("Use PlaceholderForeground instead.", false)]
+ public Media.IBrush? WatermarkForeground
+ {
+ get => PlaceholderForeground;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
+ Justification = "Obsolete property setter for backward compatibility.")]
+ set => PlaceholderForeground = value;
}
///
diff --git a/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs b/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs
index e3ce49ac96..c07d43b77c 100644
--- a/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs
+++ b/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs
@@ -570,7 +570,7 @@ namespace Avalonia.Controls
private void Calendar_PointerReleased(object? sender, PointerReleasedEventArgs e)
{
-
+
if (e.InitialPressMouseButton == MouseButton.Left)
{
e.Handled = true;
@@ -779,7 +779,7 @@ namespace Avalonia.Controls
return true;
}
case Key.Down:
- {
+ {
if ((e.KeyModifiers & KeyModifiers.Control) == KeyModifiers.Control)
{
TogglePopUp();
@@ -816,7 +816,7 @@ namespace Avalonia.Controls
}
}
DateTime? d = SetTextBoxValue(s);
-
+
if (SelectedDate != d)
{
SetCurrentValue(SelectedDateProperty, d);
@@ -880,39 +880,39 @@ namespace Avalonia.Controls
if (_textBox != null)
{
SetCurrentValue(TextProperty, String.Empty);
-
- if (string.IsNullOrEmpty(Watermark) && !UseFloatingWatermark)
+
+ if (string.IsNullOrEmpty(PlaceholderText) && !UseFloatingPlaceholder)
{
DateTimeFormatInfo dtfi = DateTimeHelper.GetCurrentDateFormat();
_defaultText = string.Empty;
- var watermarkFormat = "<{0}>";
- string watermarkText;
+ var placeholderFormat = "<{0}>";
+ string placeholderText;
switch (SelectedDateFormat)
{
case CalendarDatePickerFormat.Custom:
{
- watermarkText = string.Format(CultureInfo.CurrentCulture, watermarkFormat, CustomDateFormatString);
+ placeholderText = string.Format(CultureInfo.CurrentCulture, placeholderFormat, CustomDateFormatString);
break;
}
case CalendarDatePickerFormat.Long:
{
- watermarkText = string.Format(CultureInfo.CurrentCulture, watermarkFormat, dtfi.LongDatePattern.ToString());
+ placeholderText = string.Format(CultureInfo.CurrentCulture, placeholderFormat, dtfi.LongDatePattern.ToString());
break;
}
case CalendarDatePickerFormat.Short:
default:
{
- watermarkText = string.Format(CultureInfo.CurrentCulture, watermarkFormat, dtfi.ShortDatePattern.ToString());
+ placeholderText = string.Format(CultureInfo.CurrentCulture, placeholderFormat, dtfi.ShortDatePattern.ToString());
break;
}
}
- _textBox.Watermark = watermarkText;
+ _textBox.PlaceholderText = placeholderText;
}
else
{
- _textBox.ClearValue(TextBox.WatermarkProperty);
+ _textBox.ClearValue(TextBox.PlaceholderTextProperty);
}
}
}
diff --git a/src/Avalonia.Controls/ContextMenu.cs b/src/Avalonia.Controls/ContextMenu.cs
index e8c36546ba..7790251f81 100644
--- a/src/Avalonia.Controls/ContextMenu.cs
+++ b/src/Avalonia.Controls/ContextMenu.cs
@@ -53,17 +53,9 @@ namespace Avalonia.Controls
///
/// Defines the property.
///
- [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1013",
- Justification = "We keep PlacementModeProperty for backward compatibility.")]
public static readonly StyledProperty PlacementProperty =
Popup.PlacementProperty.AddOwner();
- ///
- /// Defines the property.
- ///
- [Obsolete("Use the Placement property instead."), EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly StyledProperty PlacementModeProperty = PlacementProperty;
-
///
/// Defines the property.
///
@@ -154,14 +146,6 @@ namespace Avalonia.Controls
set => SetValue(PlacementGravityProperty, value);
}
- ///
- [Obsolete("Use the Placement property instead."), EditorBrowsable(EditorBrowsableState.Never)]
- public PlacementMode PlacementMode
- {
- get => GetValue(PlacementProperty);
- set => SetValue(PlacementProperty, value);
- }
-
///
public PlacementMode Placement
{
diff --git a/src/Avalonia.Controls/Generators/ItemContainerGenerator.cs b/src/Avalonia.Controls/Generators/ItemContainerGenerator.cs
index 91e8dae0a1..272bedb3cc 100644
--- a/src/Avalonia.Controls/Generators/ItemContainerGenerator.cs
+++ b/src/Avalonia.Controls/Generators/ItemContainerGenerator.cs
@@ -156,11 +156,5 @@ namespace Avalonia.Controls.Generators
/// returned false for the item.
///
public void ClearItemContainer(Control container) => _owner.ClearItemContainer(container);
-
- [Obsolete("Use ItemsControl.ContainerFromIndex"), EditorBrowsable(EditorBrowsableState.Never)]
- public Control? ContainerFromIndex(int index) => _owner.ContainerFromIndex(index);
-
- [Obsolete("Use ItemsControl.IndexFromContainer"), EditorBrowsable(EditorBrowsableState.Never)]
- public int IndexFromContainer(Control container) => _owner.IndexFromContainer(container);
}
}
diff --git a/src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs b/src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs
deleted file mode 100644
index 717dadb6ea..0000000000
--- a/src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-
-namespace Avalonia.Controls.Generators
-{
- public class TreeItemContainerGenerator : ItemContainerGenerator
- {
- internal TreeItemContainerGenerator(TreeView owner)
- : base(owner)
- {
- Index = new TreeContainerIndex(owner);
- }
-
- public TreeContainerIndex Index { get; }
- }
-
- public class TreeContainerIndex
- {
- private readonly TreeView _owner;
-
- internal TreeContainerIndex(TreeView owner) => _owner = owner;
-
- [Obsolete("Use TreeView.GetRealizedTreeContainers"), EditorBrowsable(EditorBrowsableState.Never)]
- public IEnumerable Containers => _owner.GetRealizedTreeContainers();
-
- [Obsolete("Use TreeView.TreeContainerFromItem"), EditorBrowsable(EditorBrowsableState.Never)]
- public Control? ContainerFromItem(object item) => _owner.TreeContainerFromItem(item);
-
- [Obsolete("Use TreeView.TreeItemFromContainer"), EditorBrowsable(EditorBrowsableState.Never)]
- public object? ItemFromContainer(Control container) => _owner.TreeItemFromContainer(container);
- }
-}
diff --git a/src/Avalonia.Controls/ItemsControl.cs b/src/Avalonia.Controls/ItemsControl.cs
index 0c3e908bbf..c176f3aeee 100644
--- a/src/Avalonia.Controls/ItemsControl.cs
+++ b/src/Avalonia.Controls/ItemsControl.cs
@@ -101,11 +101,7 @@ namespace Avalonia.Controls
/// Gets the for the control.
///
public ItemContainerGenerator ItemContainerGenerator
- {
-#pragma warning disable CS0612 // Type or member is obsolete
- get => _itemContainerGenerator ??= CreateItemContainerGenerator();
-#pragma warning restore CS0612 // Type or member is obsolete
- }
+ => _itemContainerGenerator ??= new ItemContainerGenerator(this);
///
/// Gets the items to display.
@@ -319,19 +315,6 @@ namespace Avalonia.Controls
/// The item.
public void ScrollIntoView(object item) => ScrollIntoView(ItemsView.IndexOf(item));
- ///
- /// Returns the that owns the specified container control.
- ///
- /// The container.
- ///
- /// The owning or null if the control is not an items container.
- ///
- [Obsolete("Typo, use ItemsControlFromItemContainer instead")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Browsable(false)]
- public static ItemsControl? ItemsControlFromItemContaner(Control container) =>
- ItemsControlFromItemContainer(container);
-
///
/// Returns the that owns the specified container control.
///
@@ -672,20 +655,6 @@ namespace Avalonia.Controls
ItemCount = ItemsView.Count;
}
- ///
- /// Creates the
- ///
- ///
- /// This method is only present for backwards compatibility with 0.10.x in order for
- /// TreeView to be able to create a . Can be
- /// removed in 12.0.
- ///
- [Obsolete, EditorBrowsable(EditorBrowsableState.Never)]
- private protected virtual ItemContainerGenerator CreateItemContainerGenerator()
- {
- return new ItemContainerGenerator(this);
- }
-
internal void AddLogicalChild(Control c)
{
if (!LogicalChildren.Contains(c))
@@ -720,7 +689,7 @@ namespace Avalonia.Controls
{
var itemContainerTheme = ItemContainerTheme;
- if (itemContainerTheme?.TargetType?.IsAssignableFrom(GetStyleKey(container)) == true)
+ if (itemContainerTheme?.TargetType?.IsAssignableFrom(container.StyleKey) == true)
{
// We have an ItemContainerTheme and it matches the container. Set the Theme
// property, and mark the container as having had ItemContainerTheme applied.
diff --git a/src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs b/src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs
index 188497d230..ab3861db47 100644
--- a/src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs
+++ b/src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Globalization;
using System.IO;
using System.Linq;
@@ -108,11 +108,35 @@ namespace Avalonia.Controls
AvaloniaProperty.Register(nameof(Value), coerce: (s,v) => ((NumericUpDown)s).OnCoerceValue(v),
defaultBindingMode: BindingMode.TwoWay, enableDataValidation: true);
+ ///
+ /// Defines the property.
+ ///
+ public static readonly StyledProperty PlaceholderTextProperty =
+ AvaloniaProperty.Register(nameof(PlaceholderText));
+
///
/// Defines the property.
///
- public static readonly StyledProperty WatermarkProperty =
- AvaloniaProperty.Register(nameof(Watermark));
+ [Obsolete("Use PlaceholderTextProperty instead.", false)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022",
+ Justification = "Obsolete property alias for backward compatibility.")]
+ public static readonly StyledProperty WatermarkProperty = PlaceholderTextProperty;
+
+ ///
+ /// Defines the property.
+ ///
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1013",
+ Justification = "We keep WatermarkForegroundProperty for backward compatibility.")]
+ public static readonly StyledProperty PlaceholderForegroundProperty =
+ TextBox.PlaceholderForegroundProperty.AddOwner();
+
+ ///
+ /// Defines the property.
+ ///
+ [Obsolete("Use PlaceholderForegroundProperty instead.", false)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022",
+ Justification = "Obsolete property alias for backward compatibility.")]
+ public static readonly StyledProperty WatermarkForegroundProperty = PlaceholderForegroundProperty;
///
/// Defines the property.
@@ -253,7 +277,7 @@ namespace Avalonia.Controls
///
/// Gets or sets the parsing style (AllowLeadingWhite, Float, AllowHexSpecifier, ...). By default, Any.
- /// Note that Hex style does not work with decimal.
+ /// Note that Hex style does not work with decimal.
/// For hexadecimal display, use .
///
public NumberStyles ParsingNumberStyle
@@ -273,7 +297,7 @@ namespace Avalonia.Controls
///
/// Gets or sets the custom bidirectional Text-Value converter.
- /// Non-null converter overrides , providing finer control over
+ /// Non-null converter overrides , providing finer control over
/// string representation of the underlying value.
///
public IValueConverter? TextConverter
@@ -292,12 +316,45 @@ namespace Avalonia.Controls
}
///
- /// Gets or sets the object to use as a watermark if the is null.
+ /// Gets or sets the object to use as a placeholder if the is null.
+ ///
+ public string? PlaceholderText
+ {
+ get => GetValue(PlaceholderTextProperty);
+ set => SetValue(PlaceholderTextProperty, value);
+ }
+
+ ///
+ /// Gets or sets the object to use as a placeholder if the is null.
///
+ [Obsolete("Use PlaceholderText instead.", false)]
public string? Watermark
{
- get => GetValue(WatermarkProperty);
- set => SetValue(WatermarkProperty, value);
+ get => PlaceholderText;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
+ Justification = "Obsolete property setter for backward compatibility.")]
+ set => PlaceholderText = value;
+ }
+
+ ///
+ /// Gets or sets the brush used for the foreground color of the placeholder text.
+ ///
+ public Media.IBrush? PlaceholderForeground
+ {
+ get => GetValue(PlaceholderForegroundProperty);
+ set => SetValue(PlaceholderForegroundProperty, value);
+ }
+
+ ///
+ /// Gets or sets the brush used for the foreground color of the placeholder text.
+ ///
+ [Obsolete("Use PlaceholderForeground instead.", false)]
+ public Media.IBrush? WatermarkForeground
+ {
+ get => PlaceholderForeground;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
+ Justification = "Obsolete property setter for backward compatibility.")]
+ set => PlaceholderForeground = value;
}
///
@@ -700,8 +757,8 @@ namespace Avalonia.Controls
}
else
{
- // if Minimum is set we set value to Minimum on Increment.
- // otherwise we set value to 0. It ill be clamped to be between Minimum and Maximum later, so we don't need to do it here.
+ // if Minimum is set we set value to Minimum on Increment.
+ // otherwise we set value to 0. It ill be clamped to be between Minimum and Maximum later, so we don't need to do it here.
result = IsSet(MinimumProperty) ? Minimum : 0;
}
@@ -721,8 +778,8 @@ namespace Avalonia.Controls
}
else
{
- // if Maximum is set we set value to Maximum on decrement.
- // otherwise we set value to 0. It ill be clamped to be between Minimum and Maximum later, so we don't need to do it here.
+ // if Maximum is set we set value to Maximum on decrement.
+ // otherwise we set value to 0. It ill be clamped to be between Minimum and Maximum later, so we don't need to do it here.
result = IsSet(MaximumProperty) ? Maximum : 0;
}
diff --git a/src/Avalonia.Controls/Platform/Dialogs/ISystemDialogImpl.cs b/src/Avalonia.Controls/Platform/Dialogs/ISystemDialogImpl.cs
deleted file mode 100644
index a593caecaf..0000000000
--- a/src/Avalonia.Controls/Platform/Dialogs/ISystemDialogImpl.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Threading.Tasks;
-using Avalonia.Metadata;
-
-namespace Avalonia.Controls.Platform
-{
- ///
- /// Defines a platform-specific system dialog implementation.
- ///
- [Obsolete("Use Window.StorageProvider API or TopLevel.StorageProvider API"), EditorBrowsable(EditorBrowsableState.Never)]
- [Unstable]
- public interface ISystemDialogImpl
- {
- ///
- /// Shows a file dialog.
- ///
- /// The details of the file dialog to show.
- /// The parent window.
- /// A task returning the selected filenames.
- Task ShowFileDialogAsync(FileDialog dialog, Window parent);
-
- Task ShowFolderDialogAsync(OpenFolderDialog dialog, Window parent);
- }
-}
diff --git a/src/Avalonia.Controls/Platform/Dialogs/SystemDialogImpl.cs b/src/Avalonia.Controls/Platform/Dialogs/SystemDialogImpl.cs
deleted file mode 100644
index b2d193fcaf..0000000000
--- a/src/Avalonia.Controls/Platform/Dialogs/SystemDialogImpl.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Linq;
-using System.Threading.Tasks;
-using Avalonia.Platform.Storage;
-
-namespace Avalonia.Controls.Platform
-{
- ///
- /// Defines a platform-specific system dialog implementation.
- ///
- [Obsolete, EditorBrowsable(EditorBrowsableState.Never)]
- internal class SystemDialogImpl : ISystemDialogImpl
- {
- public async Task ShowFileDialogAsync(FileDialog dialog, Window parent)
- {
- if (dialog is OpenFileDialog openDialog)
- {
- var filePicker = parent.StorageProvider;
- if (!filePicker.CanOpen)
- {
- return null;
- }
-
- var options = openDialog.ToFilePickerOpenOptions();
-
- var files = await filePicker.OpenFilePickerAsync(options);
- return files
- .Select(file => file.TryGetLocalPath() ?? file.Name)
- .ToArray();
- }
- else if (dialog is SaveFileDialog saveDialog)
- {
- var filePicker = parent.StorageProvider;
- if (!filePicker.CanSave)
- {
- return null;
- }
-
- var options = saveDialog.ToFilePickerSaveOptions();
-
- var file = await filePicker.SaveFilePickerAsync(options);
- if (file is null)
- {
- return null;
- }
-
- var filePath = file.TryGetLocalPath() ?? file.Name;
- return new[] { filePath };
- }
- return null;
- }
-
- public async Task ShowFolderDialogAsync(OpenFolderDialog dialog, Window parent)
- {
- var filePicker = parent.StorageProvider;
- if (!filePicker.CanPickFolder)
- {
- return null;
- }
-
- var options = dialog.ToFolderPickerOpenOptions();
-
- var folders = await filePicker.OpenFolderPickerAsync(options);
- return folders
- .Select(folder => folder.TryGetLocalPath() ?? folder.Name)
- .FirstOrDefault(u => u is not null);
- }
- }
-}
diff --git a/src/Avalonia.Controls/Platform/IApplicationPlatformEvents.cs b/src/Avalonia.Controls/Platform/IApplicationPlatformEvents.cs
deleted file mode 100644
index dade84afc4..0000000000
--- a/src/Avalonia.Controls/Platform/IApplicationPlatformEvents.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using Avalonia.Metadata;
-
-namespace Avalonia.Platform
-{
- [Unstable("This interface will be removed in 12.0.")]
- public interface IApplicationPlatformEvents
- {
- void RaiseUrlsOpened(string[] urls);
- }
-}
diff --git a/src/Avalonia.Controls/Platform/IInsetsManager.cs b/src/Avalonia.Controls/Platform/IInsetsManager.cs
index fb68e980f4..1cbd1d64f4 100644
--- a/src/Avalonia.Controls/Platform/IInsetsManager.cs
+++ b/src/Avalonia.Controls/Platform/IInsetsManager.cs
@@ -3,7 +3,6 @@ using Avalonia.Media;
using Avalonia.Metadata;
using Avalonia.Threading;
-#nullable enable
namespace Avalonia.Controls.Platform
{
[NotClientImplementable]
@@ -19,13 +18,6 @@ namespace Avalonia.Controls.Platform
///
bool DisplayEdgeToEdgePreference { get; set; }
-
- ///
- /// Gets or sets whether the window draws edge to edge. behind any visible system bars.
- ///
- [Obsolete("Use DisplayEdgeToEdgePreference")]
- bool DisplayEdgeToEdge { get; set; }
-
///
/// Gets whether the window is currently displaying edge to edge.
///
@@ -52,7 +44,6 @@ namespace Avalonia.Controls.Platform
{
public virtual bool? IsSystemBarVisible { get; set; }
public virtual bool DisplayEdgeToEdgePreference { get; set; }
- public virtual bool DisplayEdgeToEdge { get => DisplaysEdgeToEdge; set => DisplayEdgeToEdgePreference = value; }
public virtual Thickness SafeAreaPadding { get; protected set; }
public virtual Color? SystemBarColor { get; set; }
public virtual bool DisplaysEdgeToEdge => DisplayEdgeToEdgePreference;
diff --git a/src/Avalonia.Controls/Platform/InProcessDragSource.cs b/src/Avalonia.Controls/Platform/InProcessDragSource.cs
index aa8694b6ac..615decc753 100644
--- a/src/Avalonia.Controls/Platform/InProcessDragSource.cs
+++ b/src/Avalonia.Controls/Platform/InProcessDragSource.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Linq;
+using System.Linq;
using Avalonia.Reactive;
using System.Threading.Tasks;
using Avalonia.Controls;
@@ -31,13 +30,6 @@ namespace Avalonia.Platform
_dragDrop = AvaloniaLocator.Current.GetRequiredService();
}
- [Obsolete($"Use {nameof(DoDragDropAsync)} instead.")]
- Task IPlatformDragSource.DoDragDrop(
- PointerEventArgs triggerEvent,
- IDataObject data,
- DragDropEffects allowedEffects)
- => DoDragDropAsync(triggerEvent, new DataObjectToDataTransferWrapper(data), allowedEffects);
-
public async Task DoDragDropAsync(
PointerEventArgs triggerEvent,
IDataTransfer dataTransfer,
diff --git a/src/Avalonia.Controls/Platform/Screen.cs b/src/Avalonia.Controls/Platform/Screen.cs
index c3b62860c7..493a5cc941 100644
--- a/src/Avalonia.Controls/Platform/Screen.cs
+++ b/src/Avalonia.Controls/Platform/Screen.cs
@@ -63,10 +63,6 @@ namespace Avalonia.Platform
///
public double Scaling { get; protected set; } = 1;
- ///
- [Obsolete("Use the Scaling property instead.", true), EditorBrowsable(EditorBrowsableState.Never)]
- public double PixelDensity => Scaling;
-
///
/// Gets the overall pixel-size and position of the screen.
///
@@ -89,10 +85,6 @@ namespace Avalonia.Platform
///
public bool IsPrimary { get; protected set; }
- ///
- [Obsolete("Use the IsPrimary property instead.", true), EditorBrowsable(EditorBrowsableState.Never)]
- public bool Primary => IsPrimary;
-
private protected Screen() { }
///
diff --git a/src/Avalonia.Controls/Primitives/Popup.cs b/src/Avalonia.Controls/Primitives/Popup.cs
index 6de5b1ea78..76fa73f4c3 100644
--- a/src/Avalonia.Controls/Primitives/Popup.cs
+++ b/src/Avalonia.Controls/Primitives/Popup.cs
@@ -76,12 +76,6 @@ namespace Avalonia.Controls.Primitives
public static readonly StyledProperty PlacementProperty =
AvaloniaProperty.Register(nameof(Placement), defaultValue: PlacementMode.Bottom);
- ///
- /// Defines the property.
- ///
- [Obsolete("Use the Placement property instead."), EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly StyledProperty PlacementModeProperty = PlacementProperty;
-
///
/// Defines the property.
///
@@ -277,14 +271,6 @@ namespace Avalonia.Controls.Primitives
set => SetValue(PlacementGravityProperty, value);
}
- ///
- [Obsolete("Use the Placement property instead."), EditorBrowsable(EditorBrowsableState.Never)]
- public PlacementMode PlacementMode
- {
- get => GetValue(PlacementProperty);
- set => SetValue(PlacementProperty, value);
- }
-
///
/// Gets or sets the desired placement of the popup in relation to the .
///
diff --git a/src/Avalonia.Controls/Primitives/ToggleButton.cs b/src/Avalonia.Controls/Primitives/ToggleButton.cs
index fa1bc76de4..2a5c1c3cf3 100644
--- a/src/Avalonia.Controls/Primitives/ToggleButton.cs
+++ b/src/Avalonia.Controls/Primitives/ToggleButton.cs
@@ -26,33 +26,6 @@ namespace Avalonia.Controls.Primitives
public static readonly StyledProperty IsThreeStateProperty =
AvaloniaProperty.Register(nameof(IsThreeState));
- ///
- /// Defines the event.
- ///
- [Obsolete("Use IsCheckedChangedEvent instead."), EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly RoutedEvent CheckedEvent =
- RoutedEvent.Register(
- nameof(Checked),
- RoutingStrategies.Bubble);
-
- ///
- /// Defines the event.
- ///
- [Obsolete("Use IsCheckedChangedEvent instead."), EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly RoutedEvent UncheckedEvent =
- RoutedEvent.Register(
- nameof(Unchecked),
- RoutingStrategies.Bubble);
-
- ///
- /// Defines the event.
- ///
- [Obsolete("Use IsCheckedChangedEvent instead."), EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly RoutedEvent IndeterminateEvent =
- RoutedEvent.Register(
- nameof(Indeterminate),
- RoutingStrategies.Bubble);
-
///
/// Defines the event.
///
@@ -70,36 +43,6 @@ namespace Avalonia.Controls.Primitives
UpdatePseudoClasses(IsChecked);
}
- ///
- /// Raised when a is checked.
- ///
- [Obsolete("Use IsCheckedChanged instead."), EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandler? Checked
- {
- add => AddHandler(CheckedEvent, value);
- remove => RemoveHandler(CheckedEvent, value);
- }
-
- ///
- /// Raised when a is unchecked.
- ///
- [Obsolete("Use IsCheckedChanged instead."), EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandler? Unchecked
- {
- add => AddHandler(UncheckedEvent, value);
- remove => RemoveHandler(UncheckedEvent, value);
- }
-
- ///
- /// Raised when a is neither checked nor unchecked.
- ///
- [Obsolete("Use IsCheckedChanged instead."), EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandler? Indeterminate
- {
- add => AddHandler(IndeterminateEvent, value);
- remove => RemoveHandler(IndeterminateEvent, value);
- }
-
///
/// Raised when the property value changes.
///
@@ -165,36 +108,6 @@ namespace Avalonia.Controls.Primitives
SetCurrentValue(IsCheckedProperty, newValue);
}
- ///
- /// Called when becomes true.
- ///
- /// Event arguments for the routed event that is raised by the default implementation of this method.
- [Obsolete("Use OnIsCheckedChanged instead."), EditorBrowsable(EditorBrowsableState.Never)]
- protected virtual void OnChecked(RoutedEventArgs e)
- {
- RaiseEvent(e);
- }
-
- ///
- /// Called when becomes false.
- ///
- /// Event arguments for the routed event that is raised by the default implementation of this method.
- [Obsolete("Use OnIsCheckedChanged instead."), EditorBrowsable(EditorBrowsableState.Never)]
- protected virtual void OnUnchecked(RoutedEventArgs e)
- {
- RaiseEvent(e);
- }
-
- ///
- /// Called when becomes null.
- ///
- /// Event arguments for the routed event that is raised by the default implementation of this method.
- [Obsolete("Use OnIsCheckedChanged instead."), EditorBrowsable(EditorBrowsableState.Never)]
- protected virtual void OnIndeterminate(RoutedEventArgs e)
- {
- RaiseEvent(e);
- }
-
///
/// Called when changes.
///
@@ -217,24 +130,7 @@ namespace Avalonia.Controls.Primitives
if (change.Property == IsCheckedProperty)
{
var newValue = change.GetNewValue();
-
UpdatePseudoClasses(newValue);
-
-#pragma warning disable CS0618 // Type or member is obsolete
- switch (newValue)
- {
- case true:
- OnChecked(new RoutedEventArgs(CheckedEvent));
- break;
- case false:
- OnUnchecked(new RoutedEventArgs(UncheckedEvent));
- break;
- default:
- OnIndeterminate(new RoutedEventArgs(IndeterminateEvent));
- break;
- }
-#pragma warning restore CS0618 // Type or member is obsolete
-
OnIsCheckedChanged(new RoutedEventArgs(IsCheckedChangedEvent));
}
}
diff --git a/src/Avalonia.Controls/Screens.cs b/src/Avalonia.Controls/Screens.cs
index d940900e2c..4d6e88963d 100644
--- a/src/Avalonia.Controls/Screens.cs
+++ b/src/Avalonia.Controls/Screens.cs
@@ -116,17 +116,6 @@ namespace Avalonia.Controls
return _iScreenImpl.ScreenFromTopLevel(topLevel.PlatformImpl);
}
- ///
- /// Retrieves a Screen for the display that contains the specified .
- ///
- /// The window impl for which to retrieve the Screen.
- /// The .
- [Obsolete("Use ScreenFromWindow(WindowBase) overload.", true), EditorBrowsable(EditorBrowsableState.Never)]
- public Screen? ScreenFromWindow(IWindowBaseImpl window)
- {
- return _iScreenImpl.ScreenFromWindow(window);
- }
-
///
/// Retrieves a Screen for the display that contains the specified point.
///
diff --git a/src/Avalonia.Controls/SystemDialog.cs b/src/Avalonia.Controls/SystemDialog.cs
deleted file mode 100644
index 8d4dab11d7..0000000000
--- a/src/Avalonia.Controls/SystemDialog.cs
+++ /dev/null
@@ -1,206 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Threading.Tasks;
-using Avalonia.Controls.Platform;
-using Avalonia.Platform.Storage;
-using Avalonia.Platform.Storage.FileIO;
-
-namespace Avalonia.Controls
-{
- ///
- /// Base class for system file dialogs.
- ///
- [Obsolete("Use Window.StorageProvider API or TopLevel.StorageProvider API"), EditorBrowsable(EditorBrowsableState.Never)]
- public abstract class FileDialog : FileSystemDialog
- {
- ///
- /// Gets or sets a collection of filters which determine the types of files displayed in an
- /// or an .
- ///
- public List Filters { get; set; } = new List();
-
- ///
- /// Gets or sets initial file name that is displayed when the dialog is opened.
- ///
- public string? InitialFileName { get; set; }
- }
-
- ///
- /// Base class for system file and directory dialogs.
- ///
- [Obsolete("Use Window.StorageProvider API or TopLevel.StorageProvider API"), EditorBrowsable(EditorBrowsableState.Never)]
- public abstract class FileSystemDialog : SystemDialog
- {
- ///
- /// Gets or sets the initial directory that will be displayed when the file system dialog
- /// is opened.
- ///
- public string? Directory { get; set; }
- }
-
- ///
- /// Represents a system dialog that prompts the user to select a location for saving a file.
- ///
- [Obsolete("Use Window.StorageProvider API or TopLevel.StorageProvider API"), EditorBrowsable(EditorBrowsableState.Never)]
- public class SaveFileDialog : FileDialog
- {
- ///
- /// Gets or sets the default extension to be used to save the file (including the period ".").
- ///
- public string? DefaultExtension { get; set; }
-
- ///
- /// Gets or sets a value indicating whether to display a warning if the user specifies the name of a file that already exists.
- ///
- public bool? ShowOverwritePrompt { get; set; }
-
- ///
- /// Shows the save file dialog.
- ///
- /// The parent window.
- ///
- /// A task that on completion contains the full path of the save location, or null if the
- /// dialog was canceled.
- ///
- public async Task ShowAsync(Window parent)
- {
- if(parent == null)
- throw new ArgumentNullException(nameof(parent));
- var service = AvaloniaLocator.Current.GetRequiredService();
- return (await service.ShowFileDialogAsync(this, parent) ??
- Array.Empty()).FirstOrDefault();
- }
-
- public FilePickerSaveOptions ToFilePickerSaveOptions()
- {
- return new FilePickerSaveOptions
- {
- SuggestedFileName = InitialFileName,
- DefaultExtension = DefaultExtension,
- FileTypeChoices = Filters?.Select(f => new FilePickerFileType(f.Name!) { Patterns = f.Extensions.Select(e => $"*.{e}").ToArray() }).ToArray(),
- Title = Title,
- SuggestedStartLocation = Directory is { } directory
- ? new BclStorageFolder(new System.IO.DirectoryInfo(directory))
- : null,
- ShowOverwritePrompt = ShowOverwritePrompt
- };
- }
- }
-
- ///
- /// Represents a system dialog that allows the user to select one or more files to open.
- ///
- [Obsolete("Use Window.StorageProvider API or TopLevel.StorageProvider API"), EditorBrowsable(EditorBrowsableState.Never)]
- public class OpenFileDialog : FileDialog
- {
- ///
- /// Gets or sets a value indicating whether the user can select multiple files.
- ///
- public bool AllowMultiple { get; set; }
-
- ///
- /// Shows the open file dialog.
- ///
- /// The parent window.
- ///
- /// A task that on completion returns an array containing the full path to the selected
- /// files, or null if the dialog was canceled.
- ///
- public Task ShowAsync(Window parent)
- {
- if(parent == null)
- throw new ArgumentNullException(nameof(parent));
- var service = AvaloniaLocator.Current.GetRequiredService();
- return service.ShowFileDialogAsync(this, parent);
- }
-
- public FilePickerOpenOptions ToFilePickerOpenOptions()
- {
- return new FilePickerOpenOptions
- {
- AllowMultiple = AllowMultiple,
- FileTypeFilter = Filters?.Select(f => new FilePickerFileType(f.Name!) { Patterns = f.Extensions.Select(e => $"*.{e}").ToArray() }).ToArray(),
- Title = Title,
- SuggestedStartLocation = Directory is { } directory
- ? new BclStorageFolder(new System.IO.DirectoryInfo(directory))
- : null
- };
- }
- }
-
- ///
- /// Represents a system dialog that allows the user to select a directory.
- ///
- [Obsolete("Use Window.StorageProvider API or TopLevel.StorageProvider API"), EditorBrowsable(EditorBrowsableState.Never)]
- public class OpenFolderDialog : FileSystemDialog
- {
- ///
- /// Shows the open folder dialog.
- ///
- /// The parent window.
- ///
- /// A task that on completion returns the full path of the selected directory, or null if the
- /// dialog was canceled.
- ///
- public Task ShowAsync(Window parent)
- {
- if(parent == null)
- throw new ArgumentNullException(nameof(parent));
- var service = AvaloniaLocator.Current.GetRequiredService();
- return service.ShowFolderDialogAsync(this, parent);
- }
-
- public FolderPickerOpenOptions ToFolderPickerOpenOptions()
- {
- return new FolderPickerOpenOptions
- {
- Title = Title,
- SuggestedStartLocation = Directory is { } directory
- ? new BclStorageFolder(new System.IO.DirectoryInfo(directory))
- : null
- };
- }
- }
-
-
- ///
- /// Base class for system dialogs.
- ///
- [Obsolete("Use Window.StorageProvider API or TopLevel.StorageProvider API"), EditorBrowsable(EditorBrowsableState.Never)]
- public abstract class SystemDialog
- {
- static SystemDialog()
- {
- if (AvaloniaLocator.Current.GetService() is null)
- {
- // Register default implementation.
- AvaloniaLocator.CurrentMutable.Bind().ToSingleton();
- }
- }
-
- ///
- /// Gets or sets the dialog title.
- ///
- public string? Title { get; set; }
- }
-
- ///
- /// Represents a filter in an or an .
- ///
- [Obsolete("Use Window.StorageProvider API or TopLevel.StorageProvider API"), EditorBrowsable(EditorBrowsableState.Never)]
- public class FileDialogFilter
- {
- ///
- /// Gets or sets the name of the filter, e.g. ("Text files (.txt)").
- ///
- public string? Name { get; set; }
-
- ///
- /// Gets or sets a list of file extensions matched by the filter (e.g. "txt" or "*" for all
- /// files).
- ///
- public List Extensions { get; set; } = new List();
- }
-}
diff --git a/src/Avalonia.Controls/TabItem.cs b/src/Avalonia.Controls/TabItem.cs
index 78785876ad..0f3c60cbff 100644
--- a/src/Avalonia.Controls/TabItem.cs
+++ b/src/Avalonia.Controls/TabItem.cs
@@ -71,11 +71,6 @@ namespace Avalonia.Controls
protected override AutomationPeer OnCreateAutomationPeer() => new ListItemAutomationPeer(this);
- [Obsolete("Owner manages its children properties by itself")]
- protected void SubscribeToOwnerProperties(AvaloniaObject owner)
- {
- }
-
private static void OnAccessKeyPressed(TabItem tabItem, AccessKeyPressedEventArgs e)
{
if (e.Handled || (e.Target != null && tabItem.IsSelected))
diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs
index b501722676..447a6a41fc 100644
--- a/src/Avalonia.Controls/TextBox.cs
+++ b/src/Avalonia.Controls/TextBox.cs
@@ -48,13 +48,13 @@ namespace Avalonia.Controls
///
/// Defines the property
///
- public static readonly StyledProperty IsInactiveSelectionHighlightEnabledProperty =
+ public static readonly StyledProperty IsInactiveSelectionHighlightEnabledProperty =
AvaloniaProperty.Register(nameof(IsInactiveSelectionHighlightEnabled), defaultValue: true);
///
/// Defines the property
///
- public static readonly StyledProperty ClearSelectionOnLostFocusProperty =
+ public static readonly StyledProperty ClearSelectionOnLostFocusProperty =
AvaloniaProperty.Register(nameof(ClearSelectionOnLostFocus), defaultValue: true);
///
@@ -181,16 +181,46 @@ namespace Avalonia.Controls
TextBlock.LineHeightProperty.AddOwner(new(defaultValue: double.NaN));
///
- /// Defines the property
+ /// Defines the property.
///
- public static readonly StyledProperty WatermarkProperty =
- AvaloniaProperty.Register(nameof(Watermark));
+ public static readonly StyledProperty PlaceholderTextProperty =
+ AvaloniaProperty.Register(nameof(PlaceholderText));
///
- /// Defines the property
+ /// Defines the property.
///
- public static readonly StyledProperty UseFloatingWatermarkProperty =
- AvaloniaProperty.Register(nameof(UseFloatingWatermark));
+ [Obsolete("Use PlaceholderTextProperty instead.", false)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022",
+ Justification = "Obsolete property alias for backward compatibility.")]
+ public static readonly StyledProperty WatermarkProperty = PlaceholderTextProperty;
+
+ ///
+ /// Defines the property.
+ ///
+ public static readonly StyledProperty UseFloatingPlaceholderProperty =
+ AvaloniaProperty.Register(nameof(UseFloatingPlaceholder));
+
+ ///
+ /// Defines the property.
+ ///
+ [Obsolete("Use UseFloatingPlaceholderProperty instead.", false)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022",
+ Justification = "Obsolete property alias for backward compatibility.")]
+ public static readonly StyledProperty UseFloatingWatermarkProperty = UseFloatingPlaceholderProperty;
+
+ ///
+ /// Defines the property.
+ ///
+ public static readonly StyledProperty PlaceholderForegroundProperty =
+ AvaloniaProperty.Register(nameof(PlaceholderForeground));
+
+ ///
+ /// Defines the property.
+ ///
+ [Obsolete("Use PlaceholderForegroundProperty instead.", false)]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1022",
+ Justification = "Obsolete property alias for backward compatibility.")]
+ public static readonly StyledProperty WatermarkForegroundProperty = PlaceholderForegroundProperty;
///
/// Defines the property
@@ -394,8 +424,8 @@ namespace Avalonia.Controls
///
public bool ClearSelectionOnLostFocus
{
- get=> GetValue(ClearSelectionOnLostFocusProperty);
- set=> SetValue(ClearSelectionOnLostFocusProperty, value);
+ get => GetValue(ClearSelectionOnLostFocusProperty);
+ set => SetValue(ClearSelectionOnLostFocusProperty, value);
}
///
@@ -408,7 +438,7 @@ namespace Avalonia.Controls
}
///
- /// Gets or sets a value that determins whether the TextBox allows and displays tabs
+ /// Gets or sets a value that determines whether the TextBox allows and displays tabs
///
public bool AcceptsTab
{
@@ -516,7 +546,7 @@ namespace Avalonia.Controls
/// Gets or sets the end position of the text selected in the TextBox
///
///
- /// When the SelectionEnd is equal to , there is no
+ /// When the SelectionEnd is equal to , there is no
/// selected text and it marks the caret position
///
public int SelectionEnd
@@ -665,20 +695,67 @@ namespace Avalonia.Controls
/// Gets or sets the placeholder or descriptive text that is displayed even if the
/// property is not yet set.
///
+ public string? PlaceholderText
+ {
+ get => GetValue(PlaceholderTextProperty);
+ set => SetValue(PlaceholderTextProperty, value);
+ }
+
+ ///
+ /// Gets or sets the placeholder or descriptive text that is displayed even if the
+ /// property is not yet set.
+ ///
+ [Obsolete("Use PlaceholderText instead.", false)]
public string? Watermark
{
- get => GetValue(WatermarkProperty);
- set => SetValue(WatermarkProperty, value);
+ get => PlaceholderText;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
+ Justification = "Obsolete property setter for backward compatibility.")]
+ set => PlaceholderText = value;
}
///
- /// Gets or sets a value indicating whether the will still be shown above the
+ /// Gets or sets a value indicating whether the will still be shown above the
/// even after a text value is set.
///
+ public bool UseFloatingPlaceholder
+ {
+ get => GetValue(UseFloatingPlaceholderProperty);
+ set => SetValue(UseFloatingPlaceholderProperty, value);
+ }
+
+ ///
+ /// Gets or sets a value indicating whether the will still be shown above the
+ /// even after a text value is set.
+ ///
+ [Obsolete("Use UseFloatingPlaceholder instead.", false)]
public bool UseFloatingWatermark
{
- get => GetValue(UseFloatingWatermarkProperty);
- set => SetValue(UseFloatingWatermarkProperty, value);
+ get => UseFloatingPlaceholder;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
+ Justification = "Obsolete property setter for backward compatibility.")]
+ set => UseFloatingPlaceholder = value;
+ }
+
+ ///
+ /// Gets or sets the brush used for the foreground color of the placeholder text.
+ ///
+ public IBrush? PlaceholderForeground
+ {
+ get => GetValue(PlaceholderForegroundProperty);
+ set => SetValue(PlaceholderForegroundProperty, value);
+ }
+
+ ///
+ /// Gets or sets the brush used for the foreground color of the placeholder text.
+ ///
+ [Obsolete("Use PlaceholderForeground instead.", false)]
+ public IBrush? WatermarkForeground
+ {
+ get => PlaceholderForeground;
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
+ Justification = "Obsolete property setter for backward compatibility.")]
+ set => PlaceholderForeground = value;
}
///
@@ -1018,7 +1095,7 @@ namespace Avalonia.Controls
if(_presenter != null)
{
_presenter.ShowSelectionHighlight = true;
- }
+ }
// when navigating to a textbox via the tab key, select all text if
// 1) this textbox is *not* a multiline textbox
diff --git a/src/Avalonia.Controls/TreeView.cs b/src/Avalonia.Controls/TreeView.cs
index 809e200e8c..068ffbcb66 100644
--- a/src/Avalonia.Controls/TreeView.cs
+++ b/src/Avalonia.Controls/TreeView.cs
@@ -76,12 +76,6 @@ namespace Avalonia.Controls
remove => RemoveHandler(SelectingItemsControl.SelectionChangedEvent, value);
}
- ///
- /// Gets the for the tree view.
- ///
- public new TreeItemContainerGenerator ItemContainerGenerator =>
- (TreeItemContainerGenerator)base.ItemContainerGenerator;
-
///
/// Gets or sets a value indicating whether to automatically scroll to newly selected items.
///
@@ -773,12 +767,6 @@ namespace Avalonia.Controls
}
}
- [Obsolete, EditorBrowsable(EditorBrowsableState.Never)]
- private protected override ItemContainerGenerator CreateItemContainerGenerator()
- {
- return new TreeItemContainerGenerator(this);
- }
-
///
/// Find which node is first in hierarchy.
///
diff --git a/src/Avalonia.DesignerSupport/Remote/Stubs.cs b/src/Avalonia.DesignerSupport/Remote/Stubs.cs
index a352b414fe..caa8bff00f 100644
--- a/src/Avalonia.DesignerSupport/Remote/Stubs.cs
+++ b/src/Avalonia.DesignerSupport/Remote/Stubs.cs
@@ -223,26 +223,12 @@ namespace Avalonia.DesignerSupport.Remote
class ClipboardStub : IClipboard
{
- public Task GetTextAsync() => Task.FromResult(null);
-
- public Task SetTextAsync(string? text) => Task.CompletedTask;
-
public Task ClearAsync() => Task.CompletedTask;
- [Obsolete($"Use {nameof(SetDataAsync)} instead.")]
- public Task SetDataObjectAsync(IDataObject data) => Task.CompletedTask;
-
public Task SetDataAsync(IAsyncDataTransfer? dataTransfer) => Task.CompletedTask;
- public Task GetFormatsAsync() => Task.FromResult([]);
-
- public Task GetDataAsync(string format) => Task.FromResult(null);
-
public Task TryGetDataAsync() => Task.FromResult(null);
- [Obsolete($"Use {nameof(TryGetInProcessDataAsync)} instead.")]
- public Task TryGetInProcessDataObjectAsync() => Task.FromResult(null);
-
public Task FlushAsync() => Task.CompletedTask;
public Task TryGetInProcessDataAsync() => Task.FromResult(null);
diff --git a/src/Avalonia.Dialogs/ManagedFileDialogExtensions.cs b/src/Avalonia.Dialogs/ManagedFileDialogExtensions.cs
index 1157c5516f..c8f7d388f5 100644
--- a/src/Avalonia.Dialogs/ManagedFileDialogExtensions.cs
+++ b/src/Avalonia.Dialogs/ManagedFileDialogExtensions.cs
@@ -1,11 +1,7 @@
using System;
-using System.ComponentModel;
-using System.Linq;
using System.Runtime.Versioning;
-using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Controls.Platform;
-using Avalonia.Controls.Primitives;
using Avalonia.Platform.Storage;
namespace Avalonia.Dialogs
@@ -41,22 +37,6 @@ namespace Avalonia.Dialogs
return builder.UseManagedSystemDialogs(() => new TWindow());
}
- [Obsolete("Use Window.StorageProvider API or TopLevel.StorageProvider API"), EditorBrowsable(EditorBrowsableState.Never)]
- public static Task ShowManagedAsync(this OpenFileDialog dialog, Window parent,
- ManagedFileDialogOptions? options = null) => ShowManagedAsync(dialog, parent, options);
-
- [Obsolete("Use Window.StorageProvider API or TopLevel.StorageProvider API"), EditorBrowsable(EditorBrowsableState.Never)]
- public static async Task ShowManagedAsync(this OpenFileDialog dialog, Window parent,
- ManagedFileDialogOptions? options = null) where TWindow : Window, new()
- {
- var impl = new ManagedStorageProvider(parent, PrepareOptions(options, () => new TWindow()));
-
- var files = await impl.OpenFilePickerAsync(dialog.ToFilePickerOpenOptions());
- return files
- .Select(file => file.TryGetLocalPath() ?? file.Name)
- .ToArray();
- }
-
private static ManagedFileDialogOptions? PrepareOptions(
ManagedFileDialogOptions? optionsOverride = null,
Func? customRootFactory = null)
diff --git a/src/Avalonia.Native/AvaloniaNativeApplicationPlatform.cs b/src/Avalonia.Native/AvaloniaNativeApplicationPlatform.cs
index 68e0c5dce6..b05aa0576e 100644
--- a/src/Avalonia.Native/AvaloniaNativeApplicationPlatform.cs
+++ b/src/Avalonia.Native/AvaloniaNativeApplicationPlatform.cs
@@ -16,8 +16,6 @@ namespace Avalonia.Native
void IAvnApplicationEvents.FilesOpened(IAvnStringArray urls)
{
- ((IApplicationPlatformEvents?)Application.Current)?.RaiseUrlsOpened(urls.ToStringArray());
-
if (AvaloniaLocator.Current.GetService() is ActivatableLifetimeBase lifetime
&& AvaloniaLocator.Current.GetService() is StorageProviderApi storageApi)
{
@@ -41,9 +39,6 @@ namespace Avalonia.Native
void IAvnApplicationEvents.UrlsOpened(IAvnStringArray urls)
{
- // Raise the urls opened event to be compatible with legacy behavior.
- ((IApplicationPlatformEvents?)Application.Current)?.RaiseUrlsOpened(urls.ToStringArray());
-
if (AvaloniaLocator.Current.GetService() is ActivatableLifetimeBase lifetime
&& AvaloniaLocator.Current.GetService() is StorageProviderApi storageApi)
{
diff --git a/src/Avalonia.Native/AvaloniaNativeDragSource.cs b/src/Avalonia.Native/AvaloniaNativeDragSource.cs
index 3c9397f8cc..662d79d1b8 100644
--- a/src/Avalonia.Native/AvaloniaNativeDragSource.cs
+++ b/src/Avalonia.Native/AvaloniaNativeDragSource.cs
@@ -32,13 +32,6 @@ namespace Avalonia.Native
}
}
- [Obsolete($"Use {nameof(DoDragDropAsync)} instead.")]
- Task IPlatformDragSource.DoDragDrop(
- PointerEventArgs triggerEvent,
- IDataObject data,
- DragDropEffects allowedEffects)
- => DoDragDropAsync(triggerEvent, new DataObjectToDataTransferWrapper(data), allowedEffects);
-
public Task DoDragDropAsync(
PointerEventArgs triggerEvent,
IDataTransfer dataTransfer,
diff --git a/src/Avalonia.Native/AvaloniaNativeGlPlatformGraphics.cs b/src/Avalonia.Native/AvaloniaNativeGlPlatformGraphics.cs
index 2a6a1f16c7..fdf80bdc18 100644
--- a/src/Avalonia.Native/AvaloniaNativeGlPlatformGraphics.cs
+++ b/src/Avalonia.Native/AvaloniaNativeGlPlatformGraphics.cs
@@ -173,8 +173,11 @@ namespace Avalonia.Native
_context = context;
}
- public IGlPlatformSurfaceRenderingSession BeginDraw()
+ public bool IsCorrupted => false;
+
+ public IGlPlatformSurfaceRenderingSession BeginDraw(PixelSize? expectedPixelSize)
{
+ // TODO: use expectedPixelSize
ObjectDisposedException.ThrowIf(_target is null, this);
return new GlPlatformSurfaceRenderingSession(_context, _target.BeginDrawing());
}
diff --git a/src/Avalonia.Native/TopLevelImpl.cs b/src/Avalonia.Native/TopLevelImpl.cs
index d45e50d5c6..9ac24eb85a 100644
--- a/src/Avalonia.Native/TopLevelImpl.cs
+++ b/src/Avalonia.Native/TopLevelImpl.cs
@@ -65,8 +65,8 @@ internal class TopLevelImpl : ITopLevelImpl, IFramebufferPlatformSurface
private NativeControlHostImpl? _nativeControlHost;
private PlatformBehaviorInhibition? _platformBehaviorInhibition;
- private readonly MouseDevice? _mouse;
- private readonly PenDevice? _pen;
+ private readonly MouseDevice _mouse;
+ private readonly PenDevice _pen;
private readonly IKeyboardDevice? _keyboard;
private readonly ICursorFactory? _cursorFactory;
@@ -480,6 +480,18 @@ internal class TopLevelImpl : ITopLevelImpl, IFramebufferPlatformSurface
void IAvnTopLevelEvents.LostFocus()
{
_parent.LostFocus?.Invoke();
+
+ // macOS doesn't have the concept of mouse capture. If we're losing the focus during an implicit capture
+ // (standard mouse down), we should release it to avoid mouse events going to an old window.
+ var mouse = _parent._mouse;
+ var captured = mouse.Pointer.Captured;
+
+ if (captured is not null &&
+ mouse.Pointer.CaptureSource == CaptureSource.Implicit &&
+ TopLevel.GetTopLevel(captured as Visual)?.PlatformImpl == _parent)
+ {
+ mouse.PlatformCaptureLost();
+ }
}
AvnDragDropEffects IAvnTopLevelEvents.DragEvent(AvnDragEventType type, AvnPoint position,
@@ -554,8 +566,8 @@ internal class TopLevelImpl : ITopLevelImpl, IFramebufferPlatformSurface
{
ObjectDisposedException.ThrowIf(_target is null, this);
- var w = _parent._savedLogicalSize.Width * _parent._savedScaling;
- var h = _parent._savedLogicalSize.Height * _parent._savedScaling;
+ var w = Math.Max(_parent._savedLogicalSize.Width * _parent._savedScaling, 1);
+ var h = Math.Max(_parent._savedLogicalSize.Height * _parent._savedScaling, 1);
var dpi = _parent._savedScaling * 96;
return new DeferredFramebuffer(_target, cb =>
{
diff --git a/src/Avalonia.OpenGL/Egl/EglGlPlatformSurface.cs b/src/Avalonia.OpenGL/Egl/EglGlPlatformSurface.cs
index d8d48d0944..0565dfee88 100644
--- a/src/Avalonia.OpenGL/Egl/EglGlPlatformSurface.cs
+++ b/src/Avalonia.OpenGL/Egl/EglGlPlatformSurface.cs
@@ -54,8 +54,9 @@ namespace Avalonia.OpenGL.Egl
public override void Dispose() => _glSurface?.Dispose();
- public override IGlPlatformSurfaceRenderingSession BeginDrawCore()
+ public override IGlPlatformSurfaceRenderingSession BeginDrawCore(PixelSize? expectedPixelSize)
{
+ // TODO: use expectedPixelSize
if (_info.Size != _currentSize
|| _handle != _info.Handle
|| _glSurface == null)
diff --git a/src/Avalonia.OpenGL/Egl/EglGlPlatformSurfaceBase.cs b/src/Avalonia.OpenGL/Egl/EglGlPlatformSurfaceBase.cs
index 6df293e033..f7cfeecdc2 100644
--- a/src/Avalonia.OpenGL/Egl/EglGlPlatformSurfaceBase.cs
+++ b/src/Avalonia.OpenGL/Egl/EglGlPlatformSurfaceBase.cs
@@ -8,7 +8,7 @@ namespace Avalonia.OpenGL.Egl
public abstract IGlPlatformSurfaceRenderTarget CreateGlRenderTarget(IGlContext context);
}
- public abstract class EglPlatformSurfaceRenderTargetBase : IGlPlatformSurfaceRenderTargetWithCorruptionInfo
+ public abstract class EglPlatformSurfaceRenderTargetBase : IGlPlatformSurfaceRenderTarget
{
protected EglContext Context { get; }
@@ -22,17 +22,17 @@ namespace Avalonia.OpenGL.Egl
}
- public IGlPlatformSurfaceRenderingSession BeginDraw()
+ public IGlPlatformSurfaceRenderingSession BeginDraw(PixelSize? expectedPixelSize)
{
if (Context.IsLost)
throw new RenderTargetCorruptedException();
- return BeginDrawCore();
+ return BeginDrawCore(expectedPixelSize);
}
private protected virtual bool SkipWaits => false;
- public abstract IGlPlatformSurfaceRenderingSession BeginDrawCore();
+ public abstract IGlPlatformSurfaceRenderingSession BeginDrawCore(PixelSize? expectedPixelSize);
protected IGlPlatformSurfaceRenderingSession BeginDraw(EglSurface surface,
PixelSize size, double scaling, Action? onFinish = null, bool isYFlipped = false)
diff --git a/src/Avalonia.OpenGL/Surfaces/IGlPlatformSurfaceRenderTarget.cs b/src/Avalonia.OpenGL/Surfaces/IGlPlatformSurfaceRenderTarget.cs
index 13e89e9550..436cb4ce03 100644
--- a/src/Avalonia.OpenGL/Surfaces/IGlPlatformSurfaceRenderTarget.cs
+++ b/src/Avalonia.OpenGL/Surfaces/IGlPlatformSurfaceRenderTarget.cs
@@ -1,22 +1,11 @@
using System;
-using Avalonia.Metadata;
namespace Avalonia.OpenGL.Surfaces
{
public interface IGlPlatformSurfaceRenderTarget : IDisposable
- {
- IGlPlatformSurfaceRenderingSession BeginDraw();
- }
-
- public interface IGlPlatformSurfaceRenderTargetWithCorruptionInfo : IGlPlatformSurfaceRenderTarget
{
bool IsCorrupted { get; }
- }
- [PrivateApi]
- public interface IGlPlatformSurfaceRenderTarget2 : IGlPlatformSurfaceRenderTargetWithCorruptionInfo
- {
- IGlPlatformSurfaceRenderingSession BeginDraw(PixelSize expectedPixelSize);
+ IGlPlatformSurfaceRenderingSession BeginDraw(PixelSize? expectedPixelSize);
}
-
}
diff --git a/src/Avalonia.Themes.Fluent/Controls/AutoCompleteBox.xaml b/src/Avalonia.Themes.Fluent/Controls/AutoCompleteBox.xaml
index 462dfe0323..92c46ecd41 100644
--- a/src/Avalonia.Themes.Fluent/Controls/AutoCompleteBox.xaml
+++ b/src/Avalonia.Themes.Fluent/Controls/AutoCompleteBox.xaml
@@ -1,4 +1,4 @@
-
@@ -20,7 +20,7 @@
-
+
@@ -34,7 +34,8 @@
-
@@ -74,5 +75,5 @@
-
+
diff --git a/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml b/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml
index ce580764d7..3a8db8ae36 100644
--- a/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml
+++ b/src/Avalonia.Themes.Fluent/Controls/CalendarDatePicker.xaml
@@ -1,4 +1,4 @@
-
@@ -92,8 +92,9 @@
CornerRadius="{TemplateBinding CornerRadius}"
Margin="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
- Watermark="{TemplateBinding Watermark}"
- UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
+ PlaceholderText="{TemplateBinding PlaceholderText}"
+ PlaceholderForeground="{TemplateBinding PlaceholderForeground}"
+ UseFloatingPlaceholder="{TemplateBinding UseFloatingPlaceholder}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
@@ -112,7 +113,7 @@
-
diff --git a/src/Avalonia.Themes.Fluent/Controls/ComboBox.xaml b/src/Avalonia.Themes.Fluent/Controls/ComboBox.xaml
index bcba646461..d9ce927153 100644
--- a/src/Avalonia.Themes.Fluent/Controls/ComboBox.xaml
+++ b/src/Avalonia.Themes.Fluent/Controls/ComboBox.xaml
@@ -1,4 +1,4 @@
-
@@ -16,7 +16,7 @@
Item 1
Item 2
-
+
@@ -126,7 +126,7 @@
Foreground="{TemplateBinding Foreground}"
Background="Transparent"
Text="{TemplateBinding Text, Mode=TwoWay}"
- Watermark="{TemplateBinding PlaceholderText}"
+ PlaceholderText="{TemplateBinding PlaceholderText}"
BorderThickness="0"
IsVisible="{TemplateBinding IsEditable}">
diff --git a/src/Avalonia.Themes.Fluent/Controls/ManagedFileChooser.xaml b/src/Avalonia.Themes.Fluent/Controls/ManagedFileChooser.xaml
index 598cec7ace..c980135eca 100644
--- a/src/Avalonia.Themes.Fluent/Controls/ManagedFileChooser.xaml
+++ b/src/Avalonia.Themes.Fluent/Controls/ManagedFileChooser.xaml
@@ -1,4 +1,4 @@
-
@@ -184,7 +184,7 @@
IsVisible="{Binding ShowFilters}"
ItemsSource="{Binding Filters}"
SelectedItem="{Binding SelectedFilter}" />
-
+
@@ -344,7 +344,7 @@
-
+
diff --git a/src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml b/src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml
index 22b6ef045c..b6c19484e9 100644
--- a/src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml
+++ b/src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml
@@ -1,21 +1,21 @@
-
+
-
+ Maximum="10"
+ Increment="0.5"
+ VerticalContentAlignment="Center"
+ HorizontalContentAlignment="Center"
+ ButtonSpinnerLocation="Left"
+ PlaceholderText="Enter text" />
Clear
Reveal Password
Password Revealed
-
-
- Content
+
+
+ Content
@@ -20,7 +20,7 @@
M 11.416016,10 20,1.4160156 18.583984,0 10,8.5839846 1.4160156,0 0,1.4160156 8.5839844,10 0,18.583985 1.4160156,20 10,11.416015 18.583984,20 20,18.583985 Z
m10.051 7.0032c2.215 0 4.0105 1.7901 4.0105 3.9984s-1.7956 3.9984-4.0105 3.9984c-2.215 0-4.0105-1.7901-4.0105-3.9984s1.7956-3.9984 4.0105-3.9984zm0 1.4994c-1.3844 0-2.5066 1.1188-2.5066 2.499s1.1222 2.499 2.5066 2.499 2.5066-1.1188 2.5066-2.499-1.1222-2.499-2.5066-2.499zm0-5.0026c4.6257 0 8.6188 3.1487 9.7267 7.5613 0.10085 0.40165-0.14399 0.80877-0.54686 0.90931-0.40288 0.10054-0.81122-0.14355-0.91208-0.54521-0.94136-3.7492-4.3361-6.4261-8.2678-6.4261-3.9334 0-7.3292 2.6792-8.2689 6.4306-0.10063 0.40171-0.50884 0.64603-0.91177 0.54571s-0.648-0.5073-0.54737-0.90901c1.106-4.4152 5.1003-7.5667 9.728-7.5667z
m0.21967 0.21965c-0.26627 0.26627-0.29047 0.68293-0.07262 0.97654l0.07262 0.08412 4.0346 4.0346c-1.922 1.3495-3.3585 3.365-3.9554 5.7495-0.10058 0.4018 0.14362 0.8091 0.54543 0.9097 0.40182 0.1005 0.80909-0.1436 0.90968-0.5455 0.52947-2.1151 1.8371-3.8891 3.5802-5.0341l1.8096 1.8098c-0.70751 0.7215-1.1438 1.71-1.1438 2.8003 0 2.2092 1.7909 4 4 4 1.0904 0 2.0788-0.4363 2.8004-1.1438l5.9193 5.9195c0.2929 0.2929 0.7677 0.2929 1.0606 0 0.2663-0.2662 0.2905-0.6829 0.0726-0.9765l-0.0726-0.0841-6.1135-6.1142 0.0012-0.0015-1.2001-1.1979-2.8699-2.8693 2e-3 -8e-4 -2.8812-2.8782 0.0012-0.0018-1.1333-1.1305-4.3064-4.3058c-0.29289-0.29289-0.76777-0.29289-1.0607 0zm7.9844 9.0458 3.5351 3.5351c-0.45 0.4358-1.0633 0.704-1.7392 0.704-1.3807 0-2.5-1.1193-2.5-2.5 0-0.6759 0.26824-1.2892 0.7041-1.7391zm1.7959-5.7655c-1.0003 0-1.9709 0.14807-2.8889 0.425l1.237 1.2362c0.5358-0.10587 1.0883-0.16119 1.6519-0.16119 3.9231 0 7.3099 2.6803 8.2471 6.4332 0.1004 0.4018 0.5075 0.6462 0.9094 0.5459 0.4019-0.1004 0.6463-0.5075 0.5459-0.9094-1.103-4.417-5.0869-7.5697-9.7024-7.5697zm0.1947 3.5093 3.8013 3.8007c-0.1018-2.0569-1.7488-3.7024-3.8013-3.8007z
-
+
@@ -99,6 +99,7 @@
+
@@ -132,11 +133,12 @@
Grid.Column="1"
Grid.ColumnSpan="1"
Margin="{TemplateBinding Padding}">
-
+
-
+
-
@@ -217,19 +218,12 @@
-
-
-
-
-
+
-
@@ -203,7 +205,7 @@
diff --git a/src/Avalonia.X11/Glx/GlxGlPlatformSurface.cs b/src/Avalonia.X11/Glx/GlxGlPlatformSurface.cs
index a4d6e27451..e1cd12bece 100644
--- a/src/Avalonia.X11/Glx/GlxGlPlatformSurface.cs
+++ b/src/Avalonia.X11/Glx/GlxGlPlatformSurface.cs
@@ -21,7 +21,7 @@ namespace Avalonia.X11.Glx
return new RenderTarget((GlxContext)context, _info);
}
- private class RenderTarget : IGlPlatformSurfaceRenderTarget2
+ private class RenderTarget : IGlPlatformSurfaceRenderTarget
{
private readonly GlxContext _context;
private readonly EglGlPlatformSurface.IEglWindowGlPlatformSurfaceInfo _info;
@@ -39,9 +39,8 @@ namespace Avalonia.X11.Glx
}
public bool IsCorrupted => false;
- public IGlPlatformSurfaceRenderingSession BeginDraw(PixelSize size) => BeginDrawCore(size);
- public IGlPlatformSurfaceRenderingSession BeginDraw() => BeginDrawCore(null);
- public IGlPlatformSurfaceRenderingSession BeginDrawCore(PixelSize? expectedSize)
+
+ public IGlPlatformSurfaceRenderingSession BeginDraw(PixelSize? expectedSize)
{
var size = expectedSize ?? _info.Size;
if (expectedSize.HasValue)
diff --git a/src/Browser/Avalonia.Browser/Rendering/BrowserWebGlRenderTarget.cs b/src/Browser/Avalonia.Browser/Rendering/BrowserWebGlRenderTarget.cs
index db66c9a0ee..4417dd2301 100644
--- a/src/Browser/Avalonia.Browser/Rendering/BrowserWebGlRenderTarget.cs
+++ b/src/Browser/Avalonia.Browser/Rendering/BrowserWebGlRenderTarget.cs
@@ -65,14 +65,17 @@ partial class BrowserWebGlRenderTarget : BrowserRenderTarget, IGlPlatformSurface
{
_target = target;
}
-
+
+ public bool IsCorrupted => false;
+
public void Dispose()
{
// No-op
}
- public IGlPlatformSurfaceRenderingSession BeginDraw()
+ public IGlPlatformSurfaceRenderingSession BeginDraw(PixelSize? expectedPixelSize)
{
+ // TODO: use expectedPixelSize
var s = _target._sizeGetter();
_target.UpdateSize(s.Size);
var restoreContext = _target.GlContext.EnsureCurrent();
diff --git a/src/Headless/Avalonia.Headless.NUnit/AvaloniaTestMethodCommand.cs b/src/Headless/Avalonia.Headless.NUnit/AvaloniaTestMethodCommand.cs
index 96dfd701e9..515b9651e3 100644
--- a/src/Headless/Avalonia.Headless.NUnit/AvaloniaTestMethodCommand.cs
+++ b/src/Headless/Avalonia.Headless.NUnit/AvaloniaTestMethodCommand.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Reflection;
using System.Threading.Tasks;
using Avalonia.Threading;
using NUnit.Framework.Interfaces;
@@ -13,28 +12,14 @@ internal class AvaloniaTestMethodCommand : TestCommand
{
private readonly HeadlessUnitTestSession _session;
private readonly TestCommand _innerCommand;
- private readonly List _beforeTest;
- private readonly List _afterTest;
-
- // There are multiple problems with NUnit integration at the moment when we wrote this integration.
- // NUnit doesn't have extensibility API for running on custom dispatcher/sync-context.
- // See https://github.com/nunit/nunit/issues/2917 https://github.com/nunit/nunit/issues/2774
- // To workaround that we had to replace inner TestMethodCommand with our own implementation while keeping original hierarchy of commands.
- // Which will respect proper async/await awaiting code that works with our session and can be block-awaited to fit in NUnit.
- // Also, we need to push BeforeTest/AfterTest callbacks to the very same session call.
- // I hope there will be a better solution without reflection, but for now that's it.
- private static FieldInfo s_innerCommand = typeof(DelegatingTestCommand)
- .GetField("innerCommand", BindingFlags.Instance | BindingFlags.NonPublic)!;
- private static FieldInfo s_beforeTest = typeof(BeforeAndAfterTestCommand)
- .GetField("BeforeTest", BindingFlags.Instance | BindingFlags.NonPublic)!;
- private static FieldInfo s_afterTest = typeof(BeforeAndAfterTestCommand)
- .GetField("AfterTest", BindingFlags.Instance | BindingFlags.NonPublic)!;
+ private readonly List> _beforeTest;
+ private readonly List> _afterTest;
private AvaloniaTestMethodCommand(
HeadlessUnitTestSession session,
TestCommand innerCommand,
- List beforeTest,
- List afterTest)
+ List> beforeTest,
+ List> afterTest)
: base(innerCommand.Test)
{
_session = session;
@@ -45,61 +30,65 @@ internal class AvaloniaTestMethodCommand : TestCommand
public static TestCommand ProcessCommand(HeadlessUnitTestSession session, TestCommand command)
{
- return ProcessCommand(session, command, new List(), new List());
+ return ProcessCommand(session, command, [], []);
}
- private static TestCommand ProcessCommand(HeadlessUnitTestSession session, TestCommand command, List before, List after)
+ private static TestCommand ProcessCommand(
+ HeadlessUnitTestSession session,
+ TestCommand command,
+ List> before,
+ List> after)
{
- if (command is BeforeAndAfterTestCommand beforeAndAfterTestCommand)
+ var beforeAndAfterTestCommand = command as BeforeAndAfterTestCommand;
+ if (beforeAndAfterTestCommand is not null)
{
- if (s_beforeTest.GetValue(beforeAndAfterTestCommand) is Action beforeTest)
- {
- Action beforeAction = c => before.Add(() => beforeTest(c));
- s_beforeTest.SetValue(beforeAndAfterTestCommand, beforeAction);
- }
- if (s_afterTest.GetValue(beforeAndAfterTestCommand) is Action afterTest)
+ ref var beforeTest = ref beforeAndAfterTestCommand.BeforeTest();
+ if (beforeTest is not null)
{
- Action afterAction = c => after.Add(() => afterTest(c));
- s_afterTest.SetValue(beforeAndAfterTestCommand, afterAction);
+ AddBeforeOrAfterAction(beforeTest, before);
+ beforeTest = _ => { };
}
}
-
- if (command is DelegatingTestCommand delegatingTestCommand
- && s_innerCommand.GetValue(delegatingTestCommand) is TestCommand inner)
+
+ var delegatingTestCommand = command as DelegatingTestCommand;
+ if (delegatingTestCommand is not null)
{
- s_innerCommand.SetValue(delegatingTestCommand, ProcessCommand(session, inner, before, after));
+ ref var innerCommand = ref delegatingTestCommand.InnerCommand();
+ innerCommand = ProcessCommand(session, innerCommand, before, after);
}
- else if (command is TestMethodCommand methodCommand)
+
+ if (beforeAndAfterTestCommand is not null)
{
- return new AvaloniaTestMethodCommand(session, methodCommand, before, after);
+ ref var afterTest = ref beforeAndAfterTestCommand.AfterTest();
+ if (afterTest is not null)
+ {
+ AddBeforeOrAfterAction(afterTest, after);
+ afterTest = _ => { };
+ }
}
+
+ if (delegatingTestCommand is null && command is TestMethodCommand methodCommand)
+ return new AvaloniaTestMethodCommand(session, methodCommand, before, after);
return command;
}
public override TestResult Execute(TestExecutionContext context)
{
- return _session.DispatchCore(() => ExecuteTestMethod(context), true, default).GetAwaiter().GetResult();
+ return _session.DispatchCore(() => ExecuteTestMethod(context), true, context.CancellationToken).GetAwaiter().GetResult();
}
// Unfortunately, NUnit has issues with custom synchronization contexts, which means we need to add some hacks to make it work.
private async Task ExecuteTestMethod(TestExecutionContext context)
{
- _beforeTest.ForEach(a => a());
+ foreach (var beforeTest in _beforeTest)
+ await beforeTest(context);
var testMethod = _innerCommand.Test.Method;
var methodInfo = testMethod!.MethodInfo;
var result = methodInfo.Invoke(context.TestObject, _innerCommand.Test.Arguments);
- // Only Task, non generic ValueTask are supported in async context. No ValueTask<> nor F# tasks.
- if (result is Task task)
- {
- await task;
- }
- else if (result is ValueTask valueTask)
- {
- await valueTask;
- }
+ await ToTask(result);
context.CurrentResult.SetResult(ResultState.Success);
@@ -108,10 +97,55 @@ internal class AvaloniaTestMethodCommand : TestCommand
if (context.ExecutionStatus != TestExecutionStatus.AbortRequested)
{
- _afterTest.ForEach(a => a());
+ foreach (var afterTest in _afterTest)
+ await afterTest(context);
+
Dispatcher.UIThread.RunJobs();
}
return context.CurrentResult;
}
+
+ private static void AddBeforeOrAfterAction(Action action, List> targets)
+ {
+ // We need to extract the SetUp and TearDown methods to run them asynchronously on Avalonia's synchronization context.
+ if (action.Target is SetUpTearDownItem setUpTearDownItem)
+ {
+ var methods = action.Method.Name switch
+ {
+ nameof(SetUpTearDownItem.RunSetUp) => setUpTearDownItem.SetUpMethods(),
+ nameof(SetUpTearDownItem.RunTearDown) => setUpTearDownItem.TearDownMethods(),
+ _ => null
+ };
+
+ if (methods is not null)
+ {
+ foreach (var method in methods)
+ {
+ targets.Add(context =>
+ {
+ var result = method.Invoke(method.IsStatic ? null : context.TestObject, null);
+ return ToTask(result);
+ });
+ }
+
+ return;
+ }
+ }
+
+ targets.Add(context =>
+ {
+ action(context);
+ return Task.CompletedTask;
+ });
+ }
+
+ private static Task ToTask(object? result)
+ // Only Task, non generic ValueTask are supported in async context. No ValueTask<> nor F# tasks.
+ => result switch
+ {
+ Task task => task,
+ ValueTask valueTask => valueTask.AsTask(),
+ _ => Task.CompletedTask
+ };
}
diff --git a/src/Headless/Avalonia.Headless.NUnit/NUnitReflectionHelper.cs b/src/Headless/Avalonia.Headless.NUnit/NUnitReflectionHelper.cs
new file mode 100644
index 0000000000..cd24f49cfd
--- /dev/null
+++ b/src/Headless/Avalonia.Headless.NUnit/NUnitReflectionHelper.cs
@@ -0,0 +1,86 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+
+namespace Avalonia.Headless.NUnit;
+
+///
+/// 2023-05-10, original comment from Max about NUnit 3:
+/// There are multiple problems with NUnit integration at the moment when we wrote this integration.
+/// NUnit doesn't have extensibility API for running on custom dispatcher/sync-context.
+/// See https://github.com/nunit/nunit/issues/2917 https://github.com/nunit/nunit/issues/2774
+/// To workaround that we had to replace inner TestMethodCommand with our own implementation while keeping original hierarchy of commands.
+/// Which will respect proper async/await awaiting code that works with our session and can be block-awaited to fit in NUnit.
+/// Also, we need to push BeforeTest/AfterTest callbacks to the very same session call.
+/// I hope there will be a better solution without reflection, but for now that's it.
+///
+/// 2026-02-04: the situation hasn't changed at all with NUnit 4.
+///
+internal static class NUnitReflectionHelper
+{
+ [UnsafeAccessor(UnsafeAccessorKind.Field, Name = ReflectionDelegatingTestCommand.InnerCommandFieldName)]
+ private static extern ref TestCommand DelegatingTestCommand_InnerCommand(DelegatingTestCommand instance);
+
+ [UnsafeAccessor(UnsafeAccessorKind.Field, Name = ReflectionBeforeAndAfterTestCommand.BeforeTestFieldName)]
+ private static extern ref Action? BeforeAndAfterTestCommand_BeforeTest(BeforeAndAfterTestCommand instance);
+
+ [UnsafeAccessor(UnsafeAccessorKind.Field, Name = ReflectionBeforeAndAfterTestCommand.AfterTestFieldName)]
+ private static extern ref Action? BeforeAndAfterTestCommand_AfterTest(BeforeAndAfterTestCommand instance);
+
+ [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_setUpMethods")]
+ private static extern ref IList SetUpTearDownItem_SetUpMethods(SetUpTearDownItem instance);
+
+ [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_tearDownMethods")]
+ private static extern ref IList SetUpTearDownItem_TearDownMethods(SetUpTearDownItem instance);
+
+ extension(DelegatingTestCommand instance)
+ {
+ public ref TestCommand InnerCommand()
+ => ref DelegatingTestCommand_InnerCommand(instance);
+ }
+
+ extension(BeforeAndAfterTestCommand instance)
+ {
+ public ref Action? BeforeTest()
+ => ref BeforeAndAfterTestCommand_BeforeTest(instance);
+
+ public ref Action? AfterTest()
+ => ref BeforeAndAfterTestCommand_AfterTest(instance);
+ }
+
+ extension(SetUpTearDownItem instance)
+ {
+ public ref IList SetUpMethods()
+ => ref SetUpTearDownItem_SetUpMethods(instance);
+
+ public ref IList TearDownMethods()
+ => ref SetUpTearDownItem_TearDownMethods(instance);
+ }
+
+ private sealed class ReflectionDelegatingTestCommand : DelegatingTestCommand
+ {
+ public ReflectionDelegatingTestCommand(TestCommand innerCommand)
+ : base(innerCommand)
+ {
+ }
+
+ public const string InnerCommandFieldName = nameof(innerCommand);
+
+ public override TestResult Execute(TestExecutionContext context)
+ => throw new NotSupportedException("Reflection-only type, this method should never be called");
+ }
+
+ private sealed class ReflectionBeforeAndAfterTestCommand : BeforeAndAfterTestCommand
+ {
+ public ReflectionBeforeAndAfterTestCommand(TestCommand innerCommand)
+ : base(innerCommand)
+ {
+ }
+
+ public const string BeforeTestFieldName = nameof(BeforeTest);
+ public const string AfterTestFieldName = nameof(AfterTest);
+ }
+}
diff --git a/src/Headless/Avalonia.Headless/HeadlessPlatformRenderInterface.cs b/src/Headless/Avalonia.Headless/HeadlessPlatformRenderInterface.cs
index 05d835c57c..c2f024cf37 100644
--- a/src/Headless/Avalonia.Headless/HeadlessPlatformRenderInterface.cs
+++ b/src/Headless/Avalonia.Headless/HeadlessPlatformRenderInterface.cs
@@ -56,11 +56,13 @@ namespace Avalonia.Headless
=> new HeadlessGeometryStub(g1.Bounds.Union(g2.Bounds));
public IRenderTarget CreateRenderTarget(IEnumerable surfaces) => new HeadlessRenderTarget();
- public IDrawingContextLayerImpl CreateOffscreenRenderTarget(PixelSize pixelSize, double scaling) =>
- new HeadlessBitmapStub(pixelSize, new Vector(96 * scaling, 96 * scaling));
+ public IDrawingContextLayerImpl CreateOffscreenRenderTarget(PixelSize pixelSize, Vector scaling,
+ bool enableTextAntialiasing) =>
+ new HeadlessBitmapStub(pixelSize, scaling * 96);
public bool IsLost => false;
public IReadOnlyDictionary PublicFeatures { get; } = new Dictionary();
+ public PixelSize? MaxOffscreenRenderTargetPixelSize => null;
public object? TryGetFeature(Type featureType) => null;
public IRenderTargetBitmapImpl CreateRenderTargetBitmap(PixelSize size, Vector dpi)
@@ -398,11 +400,20 @@ namespace Avalonia.Headless
}
- public IDrawingContextImpl CreateDrawingContext(bool _)
+ public IDrawingContextImpl CreateDrawingContext(bool useScaledDrawing)
{
return new HeadlessDrawingContextStub();
}
+ public IDrawingContextImpl CreateDrawingContext(PixelSize expectedPixelSize,
+ out RenderTargetDrawingContextProperties properties)
+ {
+ properties = default;
+ return new HeadlessDrawingContextStub();
+ }
+
+ public RenderTargetProperties Properties => default;
+
public bool IsCorrupted => false;
public void Blit(IDrawingContextImpl context)
@@ -580,13 +591,22 @@ namespace Avalonia.Headless
private class HeadlessRenderTarget : IRenderTarget
{
+ public RenderTargetProperties Properties => default;
+
public void Dispose()
{
}
- public IDrawingContextImpl CreateDrawingContext(bool _)
+ public IDrawingContextImpl CreateDrawingContext(bool useScaledDrawing)
+ {
+ return new HeadlessDrawingContextStub();
+ }
+
+ public IDrawingContextImpl CreateDrawingContext(PixelSize expectedPixelSize,
+ out RenderTargetDrawingContextProperties properties)
{
+ properties = default;
return new HeadlessDrawingContextStub();
}
diff --git a/src/Headless/Avalonia.Headless/HeadlessWindowExtensions.cs b/src/Headless/Avalonia.Headless/HeadlessWindowExtensions.cs
index b17a1150fc..79c0d331cd 100644
--- a/src/Headless/Avalonia.Headless/HeadlessWindowExtensions.cs
+++ b/src/Headless/Avalonia.Headless/HeadlessWindowExtensions.cs
@@ -41,13 +41,6 @@ public static class HeadlessWindowExtensions
return GetImpl(topLevel).GetLastRenderedFrame();
}
- ///
- /// Simulates a keyboard press on the headless window/toplevel.
- ///
- [Obsolete("Use the overload that takes a physical key and key symbol instead, or KeyPressQwerty alternatively.")]
- public static void KeyPress(this TopLevel topLevel, Key key, RawInputModifiers modifiers) =>
- KeyPress(topLevel, key, modifiers, PhysicalKey.None, null);
-
///
/// Simulates keyboard press on the headless window/toplevel.
///
@@ -61,13 +54,6 @@ public static class HeadlessWindowExtensions
public static void KeyPressQwerty(this TopLevel topLevel, PhysicalKey physicalKey, RawInputModifiers modifiers) =>
RunJobsOnImpl(topLevel, w => w.KeyPress(physicalKey.ToQwertyKey(), modifiers, physicalKey, physicalKey.ToQwertyKeySymbol()));
- ///
- /// Simulates a keyboard release on the headless window/toplevel.
- ///
- [Obsolete("Use the overload that takes a physical key and key symbol instead, or KeyReleaseQwerty alternatively.")]
- public static void KeyRelease(this TopLevel topLevel, Key key, RawInputModifiers modifiers) =>
- KeyRelease(topLevel, key, modifiers, PhysicalKey.None, null);
-
///
/// Simulates keyboard release on the headless window/toplevel.
///
@@ -121,14 +107,6 @@ public static class HeadlessWindowExtensions
RawInputModifiers modifiers = RawInputModifiers.None) =>
RunJobsOnImpl(topLevel, w => w.MouseWheel(point, delta, modifiers));
- ///
- /// Simulates a drag and drop target event on the headless window/toplevel. This event simulates a user moving files from another app to the current app.
- ///
- [Obsolete($"Use the overload accepting a {nameof(IDataTransfer)} instance instead.")]
- public static void DragDrop(this TopLevel topLevel, Point point, RawDragEventType type, IDataObject data,
- DragDropEffects effects, RawInputModifiers modifiers = RawInputModifiers.None) =>
- RunJobsOnImpl(topLevel, w => w.DragDrop(point, type, data, effects, modifiers));
-
///
/// Simulates a drag and drop target event on the headless window/toplevel. This event simulates a user moving files from another app to the current app.
///
diff --git a/src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs b/src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs
index 8f80e22138..e3fc75eac4 100644
--- a/src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs
+++ b/src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs
@@ -349,13 +349,6 @@ namespace Avalonia.Headless
point, delta, modifiers));
}
- [Obsolete($"Use the overload accepting a {nameof(IDataTransfer)} instance instead.")]
- void IHeadlessWindow.DragDrop(Point point, RawDragEventType type, IDataObject data, DragDropEffects effects, RawInputModifiers modifiers)
- {
- var device = AvaloniaLocator.Current.GetRequiredService();
- Input?.Invoke(new RawDragEvent(device, type, InputRoot!, point, new DataObjectToDataTransferWrapper(data), effects, modifiers));
- }
-
void IHeadlessWindow.DragDrop(Point point, RawDragEventType type, IDataTransfer data, DragDropEffects effects, RawInputModifiers modifiers)
{
var device = AvaloniaLocator.Current.GetRequiredService();
diff --git a/src/Headless/Avalonia.Headless/IHeadlessWindow.cs b/src/Headless/Avalonia.Headless/IHeadlessWindow.cs
index 2fe11df2ca..30c2390f64 100644
--- a/src/Headless/Avalonia.Headless/IHeadlessWindow.cs
+++ b/src/Headless/Avalonia.Headless/IHeadlessWindow.cs
@@ -15,8 +15,6 @@ namespace Avalonia.Headless
void MouseMove(Point point, RawInputModifiers modifiers = RawInputModifiers.None);
void MouseUp(Point point, MouseButton button, RawInputModifiers modifiers = RawInputModifiers.None);
void MouseWheel(Point point, Vector delta, RawInputModifiers modifiers = RawInputModifiers.None);
- [Obsolete($"Use the overload accepting a {nameof(IDataTransfer)} instance instead.")]
- void DragDrop(Point point, RawDragEventType type, IDataObject data, DragDropEffects effects, RawInputModifiers modifiers = RawInputModifiers.None);
void DragDrop(Point point, RawDragEventType type, IDataTransfer data, DragDropEffects effects, RawInputModifiers modifiers = RawInputModifiers.None);
}
}
diff --git a/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs b/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs
index ddd3b6e49f..59de00f4b3 100644
--- a/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs
+++ b/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs
@@ -377,7 +377,7 @@ namespace Avalonia.LinuxFramebuffer.Output
{
//Go through two cycles of buffer swapping (there are render artifacts otherwise)
for (var c = 0; c < 2; c++)
- using (CreateGlRenderTarget().BeginDraw())
+ using (CreateGlRenderTarget().BeginDraw(PixelSize))
{
_deferredContext.GlInterface.ClearColor(initialBufferSwappingColorR, initialBufferSwappingColorG,
initialBufferSwappingColorB, initialBufferSwappingColorA);
@@ -406,6 +406,9 @@ namespace Avalonia.LinuxFramebuffer.Output
{
_parent = parent;
}
+
+ public bool IsCorrupted => false;
+
public void Dispose()
{
// We are wrapping GBM buffer chain associated with CRTC, and don't free it on a whim
@@ -508,7 +511,7 @@ namespace Avalonia.LinuxFramebuffer.Output
public bool IsYFlipped => false;
}
- public IGlPlatformSurfaceRenderingSession BeginDraw()
+ public IGlPlatformSurfaceRenderingSession BeginDraw(PixelSize? expectedPixelSize)
{
var clearContext = _parent._deferredContext.MakeCurrent(_parent._eglSurface);
var gl = _parent._deferredContext.GlInterface;
diff --git a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlWellKnownTypes.cs b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlWellKnownTypes.cs
index df54e71108..28ea193adf 100644
--- a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlWellKnownTypes.cs
+++ b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlWellKnownTypes.cs
@@ -22,6 +22,7 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers
public IXamlMethod AvaloniaObjectSetStyledPropertyValue { get; }
public IXamlType AvaloniaAttachedPropertyT { get; }
public IXamlType BindingBase { get; }
+ public IXamlType BindingExpressionBase { get; }
public IXamlType MultiBinding { get; }
public IXamlMethod AvaloniaObjectBindMethod { get; }
public IXamlMethod AvaloniaObjectSetValueMethod { get; }
@@ -200,6 +201,7 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers
&& m.Parameters[0].Name == "StyledProperty`1"
&& m.Parameters[2].Equals(BindingPriority));
BindingBase = cfg.TypeSystem.GetType("Avalonia.Data.BindingBase");
+ BindingExpressionBase = cfg.TypeSystem.GetType("Avalonia.Data.BindingExpressionBase");
MultiBinding = cfg.TypeSystem.GetType("Avalonia.Data.MultiBinding");
IDisposable = cfg.TypeSystem.GetType("System.IDisposable");
ICommand = cfg.TypeSystem.GetType("System.Windows.Input.ICommand");
@@ -215,9 +217,7 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers
AvaloniaListAttribute = cfg.TypeSystem.GetType("Avalonia.Metadata.AvaloniaListAttribute");
AvaloniaList = cfg.TypeSystem.GetType("Avalonia.Collections.AvaloniaList`1");
OnExtensionType = cfg.TypeSystem.GetType("Avalonia.Markup.Xaml.MarkupExtensions.On");
- AvaloniaObjectBindMethod = AvaloniaObjectExtensions.GetMethod("Bind", IDisposable, false, AvaloniaObject,
- AvaloniaProperty,
- BindingBase, cfg.WellKnownTypes.Object);
+ AvaloniaObjectBindMethod = AvaloniaObject.GetMethod("Bind", BindingExpressionBase, false, AvaloniaProperty, BindingBase);
UnsetValueType = cfg.TypeSystem.GetType("Avalonia.UnsetValueType");
StyledElement = cfg.TypeSystem.GetType("Avalonia.StyledElement");
INameScope = cfg.TypeSystem.GetType("Avalonia.Controls.INameScope");
diff --git a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlAvaloniaPropertyHelper.cs b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlAvaloniaPropertyHelper.cs
index 442c7dd495..1a72dcd9a5 100644
--- a/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlAvaloniaPropertyHelper.cs
+++ b/src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlAvaloniaPropertyHelper.cs
@@ -297,8 +297,8 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions
emitter
.Stloc(bloc.Local)
.Ldsfld(AvaloniaProperty)
- .Ldloc(bloc.Local);
- EmitAnchorAndBind(emitter);
+ .Ldloc(bloc.Local)
+ .EmitCall(Types.AvaloniaObjectBindMethod, true);
}
public override void EmitWithArguments(
@@ -308,14 +308,7 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions
{
emitter.Ldsfld(AvaloniaProperty);
context.Emit(arguments[0], emitter, Parameters[0]);
- EmitAnchorAndBind(emitter);
- }
-
- private void EmitAnchorAndBind(IXamlILEmitter emitter)
- {
- emitter
- .Ldnull() // TODO: provide anchor?
- .EmitCall(Types.AvaloniaObjectBindMethod, true);
+ emitter.EmitCall(Types.AvaloniaObjectBindMethod, true);
}
}
@@ -336,8 +329,8 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions
.Stloc(bloc.Local)
.Pop() // ignore priority
.Ldsfld(AvaloniaProperty)
- .Ldloc(bloc.Local);
- EmitAnchorAndBind(emitter);
+ .Ldloc(bloc.Local)
+ .EmitCall(Types.AvaloniaObjectBindMethod, true);
}
public override void EmitWithArguments(
@@ -347,14 +340,7 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions
{
emitter.Ldsfld(AvaloniaProperty);
context.Emit(arguments[1], emitter, Parameters[1]);
- EmitAnchorAndBind(emitter);
- }
-
- private void EmitAnchorAndBind(IXamlILEmitter emitter)
- {
- emitter
- .Ldnull() // TODO: provide anchor?
- .EmitCall(Types.AvaloniaObjectBindMethod, true);
+ emitter.EmitCall(Types.AvaloniaObjectBindMethod, true);
}
}
diff --git a/src/Markup/Avalonia.Markup.Xaml/XamlLoadException.cs b/src/Markup/Avalonia.Markup.Xaml/XamlLoadException.cs
index 5861f37e47..74f1e009b1 100644
--- a/src/Markup/Avalonia.Markup.Xaml/XamlLoadException.cs
+++ b/src/Markup/Avalonia.Markup.Xaml/XamlLoadException.cs
@@ -1,5 +1,4 @@
using System;
-using System.Runtime.Serialization;
namespace Avalonia.Markup.Xaml
{
@@ -9,13 +8,6 @@ namespace Avalonia.Markup.Xaml
{
}
-#if NET8_0_OR_GREATER
- [Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051")]
-#endif
- protected XamlLoadException(SerializationInfo info, StreamingContext context): base(info, context)
- {
- }
-
public XamlLoadException(string message): base(message)
{
}
diff --git a/src/Skia/Avalonia.Skia/DrawingContextImpl.cs b/src/Skia/Avalonia.Skia/DrawingContextImpl.cs
index 42448ed631..8051dd7993 100644
--- a/src/Skia/Avalonia.Skia/DrawingContextImpl.cs
+++ b/src/Skia/Avalonia.Skia/DrawingContextImpl.cs
@@ -170,8 +170,7 @@ namespace Avalonia.Skia
public ISkiaSharpPlatformGraphicsApiLease? TryLeasePlatformGraphicsApi()
{
CheckLease();
- if (_context._gpu is ISkiaGpuWithPlatformGraphicsContext gpu &&
- gpu.PlatformGraphicsContext is { } context)
+ if (_context._gpu?.PlatformGraphicsContext is { } context)
return new PlatformApiLease(this, context);
return null;
}
diff --git a/src/Skia/Avalonia.Skia/FramebufferRenderTarget.cs b/src/Skia/Avalonia.Skia/FramebufferRenderTarget.cs
index 7473563d13..0eb11ff404 100644
--- a/src/Skia/Avalonia.Skia/FramebufferRenderTarget.cs
+++ b/src/Skia/Avalonia.Skia/FramebufferRenderTarget.cs
@@ -10,7 +10,7 @@ namespace Avalonia.Skia
///
/// Skia render target that renders to a framebuffer surface. No gpu acceleration available.
///
- internal class FramebufferRenderTarget : IRenderTarget2
+ internal class FramebufferRenderTarget : IRenderTarget
{
private SKImageInfo _currentImageInfo;
private IntPtr _currentFramebufferAddress;
diff --git a/src/Skia/Avalonia.Skia/Gpu/ISkiaGpu.cs b/src/Skia/Avalonia.Skia/Gpu/ISkiaGpu.cs
index 85a2cbdd22..93edea7169 100644
--- a/src/Skia/Avalonia.Skia/Gpu/ISkiaGpu.cs
+++ b/src/Skia/Avalonia.Skia/Gpu/ISkiaGpu.cs
@@ -1,16 +1,22 @@
using System;
using System.Collections.Generic;
-using Avalonia.Metadata;
using Avalonia.Platform;
using SkiaSharp;
namespace Avalonia.Skia
{
+ //TODO12: Make it private
+
///
/// Custom Skia gpu instance.
///
public interface ISkiaGpu : IPlatformGraphicsContext
{
+ ///
+ /// Gets the platform graphics context.
+ ///
+ IPlatformGraphicsContext? PlatformGraphicsContext { get; }
+
///
/// Attempts to create custom render target from given surfaces.
///
@@ -24,13 +30,11 @@ namespace Avalonia.Skia
/// size in pixels.
/// An optional custom render session.
ISkiaSurface? TryCreateSurface(PixelSize size, ISkiaGpuRenderSession? session);
- }
- //TODO12: Merge into ISkiaGpu
- [Unstable]
- public interface ISkiaGpuWithPlatformGraphicsContext : ISkiaGpu
- {
- IPlatformGraphicsContext? PlatformGraphicsContext { get; }
+ ///
+ /// Tries to get a .
+ ///
+ /// A .
IScopedResource? TryGetGrContext();
}
diff --git a/src/Skia/Avalonia.Skia/Gpu/ISkiaGpuRenderTarget.cs b/src/Skia/Avalonia.Skia/Gpu/ISkiaGpuRenderTarget.cs
index f8be7dc66f..eb7399f6a6 100644
--- a/src/Skia/Avalonia.Skia/Gpu/ISkiaGpuRenderTarget.cs
+++ b/src/Skia/Avalonia.Skia/Gpu/ISkiaGpuRenderTarget.cs
@@ -1,6 +1,4 @@
using System;
-using Avalonia.Metadata;
-using SkiaSharp;
namespace Avalonia.Skia
{
@@ -12,16 +10,10 @@ namespace Avalonia.Skia
///
/// Start rendering to this render target.
///
- ///
- ISkiaGpuRenderSession BeginRenderingSession();
+ /// The expected size.
+ /// A render session instance.
+ ISkiaGpuRenderSession BeginRenderingSession(PixelSize? expectedPixelSize);
bool IsCorrupted { get; }
}
-
- [PrivateApi]
- //TODO12: Merge with ISkiaGpuRenderTarget
- public interface ISkiaGpuRenderTarget2 : ISkiaGpuRenderTarget
- {
- ISkiaGpuRenderSession BeginRenderingSession(PixelSize pixelSize);
- }
}
diff --git a/src/Skia/Avalonia.Skia/Gpu/Metal/SkiaMetalGpu.cs b/src/Skia/Avalonia.Skia/Gpu/Metal/SkiaMetalGpu.cs
index ad5f624a03..460a994839 100644
--- a/src/Skia/Avalonia.Skia/Gpu/Metal/SkiaMetalGpu.cs
+++ b/src/Skia/Avalonia.Skia/Gpu/Metal/SkiaMetalGpu.cs
@@ -6,7 +6,7 @@ using SkiaSharp;
namespace Avalonia.Skia.Metal;
-internal class SkiaMetalGpu : ISkiaGpu, ISkiaGpuWithPlatformGraphicsContext
+internal class SkiaMetalGpu : ISkiaGpu
{
private GRContext? _context;
private readonly IMetalDevice _device;
@@ -80,8 +80,9 @@ internal class SkiaMetalGpu : ISkiaGpu, ISkiaGpuWithPlatformGraphicsContext
_target = null;
}
- public ISkiaGpuRenderSession BeginRenderingSession()
+ public ISkiaGpuRenderSession BeginRenderingSession(PixelSize? expectedPixelSize)
{
+ // TODO: use expectedPixelSize
var session = (_target ?? throw new ObjectDisposedException(nameof(SkiaMetalRenderTarget))).BeginRendering();
var backendTarget = new GRBackendRenderTarget(session.Size.Width, session.Size.Height,
new GRMtlTextureInfo(session.Texture));
diff --git a/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlRenderTarget.cs b/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlRenderTarget.cs
index 56ce4a7194..bb43e13b55 100644
--- a/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlRenderTarget.cs
+++ b/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlRenderTarget.cs
@@ -1,15 +1,12 @@
using System;
-using Avalonia.Reactive;
using Avalonia.OpenGL;
using Avalonia.OpenGL.Surfaces;
-using Avalonia.Platform;
-using Avalonia.Rendering;
using SkiaSharp;
using static Avalonia.OpenGL.GlConsts;
namespace Avalonia.Skia
{
- internal class GlRenderTarget : ISkiaGpuRenderTarget2
+ internal class GlRenderTarget : ISkiaGpuRenderTarget
{
private readonly GRContext _grContext;
private IGlPlatformSurfaceRenderTarget _surface;
@@ -23,7 +20,7 @@ namespace Avalonia.Skia
public void Dispose() => _surface.Dispose();
- public bool IsCorrupted => (_surface as IGlPlatformSurfaceRenderTargetWithCorruptionInfo)?.IsCorrupted == true;
+ public bool IsCorrupted => _surface.IsCorrupted;
class GlGpuSession : ISkiaGpuRenderSession
{
@@ -58,16 +55,10 @@ namespace Avalonia.Skia
public SKSurface SkSurface => _surface;
public double ScaleFactor => _glSession.Scaling;
}
-
- public ISkiaGpuRenderSession BeginRenderingSession(PixelSize size) => BeginRenderingSessionCore(size);
- public ISkiaGpuRenderSession BeginRenderingSession() => BeginRenderingSessionCore(null);
- ISkiaGpuRenderSession BeginRenderingSessionCore(PixelSize? expectedSize)
+ public ISkiaGpuRenderSession BeginRenderingSession(PixelSize? expectedPixelSize)
{
- var glSession =
- expectedSize != null && _surface is IGlPlatformSurfaceRenderTarget2 surface2
- ? surface2.BeginDraw(expectedSize.Value)
- : _surface.BeginDraw();
+ var glSession = _surface.BeginDraw(expectedPixelSize);
bool success = false;
try
diff --git a/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs b/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs
index 7336e7672b..a20ceb0fd0 100644
--- a/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs
+++ b/src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaGpu.cs
@@ -10,8 +10,7 @@ using static Avalonia.OpenGL.GlConsts;
namespace Avalonia.Skia
{
- internal class GlSkiaGpu : ISkiaGpu, IOpenGlTextureSharingRenderInterfaceContextFeature,
- ISkiaGpuWithPlatformGraphicsContext
+ internal class GlSkiaGpu : ISkiaGpu, IOpenGlTextureSharingRenderInterfaceContextFeature
{
private readonly GRContext _grContext;
private readonly IGlContext _glContext;
diff --git a/src/Skia/Avalonia.Skia/Gpu/SkiaGpuRenderTarget.cs b/src/Skia/Avalonia.Skia/Gpu/SkiaGpuRenderTarget.cs
index 8d231a5784..488888f50a 100644
--- a/src/Skia/Avalonia.Skia/Gpu/SkiaGpuRenderTarget.cs
+++ b/src/Skia/Avalonia.Skia/Gpu/SkiaGpuRenderTarget.cs
@@ -5,7 +5,7 @@ namespace Avalonia.Skia
///
/// Adapts to be used within our rendering pipeline.
///
- internal class SkiaGpuRenderTarget : IRenderTarget2
+ internal class SkiaGpuRenderTarget : IRenderTarget
{
private readonly ISkiaGpu _skiaGpu;
private readonly ISkiaGpuRenderTarget _renderTarget;
@@ -34,10 +34,7 @@ namespace Avalonia.Skia
out RenderTargetDrawingContextProperties properties)
{
properties = default;
- var session =
- expectedPixelSize.HasValue && _renderTarget is ISkiaGpuRenderTarget2 target2
- ? target2.BeginRenderingSession(expectedPixelSize.Value)
- : _renderTarget.BeginRenderingSession();
+ var session = _renderTarget.BeginRenderingSession(expectedPixelSize);
var nfo = new DrawingContextImpl.CreateInfo
{
diff --git a/src/Skia/Avalonia.Skia/Gpu/Vulkan/VulkanSkiaGpu.cs b/src/Skia/Avalonia.Skia/Gpu/Vulkan/VulkanSkiaGpu.cs
index a862424e51..9d3ca6789b 100644
--- a/src/Skia/Avalonia.Skia/Gpu/Vulkan/VulkanSkiaGpu.cs
+++ b/src/Skia/Avalonia.Skia/Gpu/Vulkan/VulkanSkiaGpu.cs
@@ -2,12 +2,11 @@ using System;
using System.Collections.Generic;
using Avalonia.Vulkan;
using Avalonia.Platform;
-using Avalonia.Rendering;
using SkiaSharp;
namespace Avalonia.Skia.Vulkan;
-internal class VulkanSkiaGpu : ISkiaGpuWithPlatformGraphicsContext
+internal class VulkanSkiaGpu : ISkiaGpu
{
private readonly VulkanSkiaExternalObjectsFeature? _externalObjects;
public IVulkanPlatformGraphicsContext Vulkan { get; private set; }
diff --git a/src/Skia/Avalonia.Skia/Gpu/Vulkan/VulkanSkiaRenderTarget.cs b/src/Skia/Avalonia.Skia/Gpu/Vulkan/VulkanSkiaRenderTarget.cs
index c86a1204f3..3ab1714f6c 100644
--- a/src/Skia/Avalonia.Skia/Gpu/Vulkan/VulkanSkiaRenderTarget.cs
+++ b/src/Skia/Avalonia.Skia/Gpu/Vulkan/VulkanSkiaRenderTarget.cs
@@ -21,8 +21,9 @@ class VulkanSkiaRenderTarget : ISkiaGpuRenderTarget
_target.Dispose();
}
- public ISkiaGpuRenderSession BeginRenderingSession()
+ public ISkiaGpuRenderSession BeginRenderingSession(PixelSize? expectedPixelSize)
{
+ // TODO: use expectedPixelSize
var session = _target.BeginDraw();
bool success = false;
try
diff --git a/src/Skia/Avalonia.Skia/RenderTargetBitmapImpl.cs b/src/Skia/Avalonia.Skia/RenderTargetBitmapImpl.cs
index 32b7340993..2e63f8bfd3 100644
--- a/src/Skia/Avalonia.Skia/RenderTargetBitmapImpl.cs
+++ b/src/Skia/Avalonia.Skia/RenderTargetBitmapImpl.cs
@@ -1,6 +1,4 @@
-using System.IO;
using Avalonia.Controls.Platform.Surfaces;
-using Avalonia.Media.Imaging;
using Avalonia.Platform;
using SkiaSharp;
@@ -19,9 +17,18 @@ internal class RenderTargetBitmapImpl : WriteableBitmapImpl,
_renderTarget = new FramebufferRenderTarget(this);
}
+ public RenderTargetProperties Properties => default;
+
IDrawingContextImpl IRenderTarget.CreateDrawingContext(bool useScaledDrawing) =>
_renderTarget.CreateDrawingContext(useScaledDrawing);
+ IDrawingContextImpl IRenderTarget.CreateDrawingContext(PixelSize expectedPixelSize,
+ out RenderTargetDrawingContextProperties properties)
+ {
+ properties = default;
+ return _renderTarget.CreateDrawingContext(false);
+ }
+
public bool IsCorrupted => false;
public override void Dispose()
@@ -31,4 +38,4 @@ internal class RenderTargetBitmapImpl : WriteableBitmapImpl,
}
public IFramebufferRenderTarget CreateFramebufferRenderTarget() => new FuncFramebufferRenderTarget(Lock);
-}
\ No newline at end of file
+}
diff --git a/src/Skia/Avalonia.Skia/SkiaBackendContext.cs b/src/Skia/Avalonia.Skia/SkiaBackendContext.cs
index db50c1e424..dcaf6b542e 100644
--- a/src/Skia/Avalonia.Skia/SkiaBackendContext.cs
+++ b/src/Skia/Avalonia.Skia/SkiaBackendContext.cs
@@ -5,7 +5,6 @@ using System.Linq;
using Avalonia.Controls.Platform.Surfaces;
using Avalonia.OpenGL;
using Avalonia.Platform;
-using SkiaSharp;
namespace Avalonia.Skia;
@@ -29,6 +28,13 @@ internal class SkiaContext : IPlatformRenderInterfaceContext
// TODO12: extend ISkiaGpu with PublicFeatures instead
TryFeature();
TryFeature();
+ using (var gr = gpu.TryGetGrContext())
+ {
+ var renderTargetSize = gr?.Value.MaxRenderTargetSize;
+ if (renderTargetSize.HasValue)
+ MaxOffscreenRenderTargetPixelSize =
+ new PixelSize(renderTargetSize.Value, renderTargetSize.Value);
+ }
}
PublicFeatures = features;
@@ -61,17 +67,21 @@ internal class SkiaContext : IPlatformRenderInterfaceContext
"Don't know how to create a Skia render target from any of provided surfaces");
}
- public IDrawingContextLayerImpl CreateOffscreenRenderTarget(PixelSize pixelSize, double scaling)
+
+ public PixelSize? MaxOffscreenRenderTargetPixelSize { get; }
+
+ public IDrawingContextLayerImpl CreateOffscreenRenderTarget(PixelSize pixelSize, Vector scaling,
+ bool enableTextAntialiasing)
{
- using (var gr = (_gpu as ISkiaGpuWithPlatformGraphicsContext)?.TryGetGrContext())
+ using (var gr = _gpu?.TryGetGrContext())
{
var createInfo = new SurfaceRenderTarget.CreateInfo
{
Width = pixelSize.Width,
Height = pixelSize.Height,
- Dpi = new Vector(96 * scaling, 96 * scaling),
+ Dpi = scaling * 96,
Format = null,
- DisableTextLcdRendering = false,
+ DisableTextLcdRendering = !enableTextAntialiasing,
GrContext = gr?.Value,
Gpu = _gpu,
DisableManualFbo = true,
diff --git a/src/Skia/Avalonia.Skia/SurfaceRenderTarget.cs b/src/Skia/Avalonia.Skia/SurfaceRenderTarget.cs
index 87aebc2df1..82d0760207 100644
--- a/src/Skia/Avalonia.Skia/SurfaceRenderTarget.cs
+++ b/src/Skia/Avalonia.Skia/SurfaceRenderTarget.cs
@@ -72,6 +72,8 @@ namespace Avalonia.Skia
_canvas = canvas;
}
+ public RenderTargetProperties Properties => default;
+
///
/// Create backing Skia surface.
///
@@ -114,6 +116,13 @@ namespace Avalonia.Skia
return new DrawingContextImpl(createInfo, Disposable.Create(() => Version++));
}
+ public IDrawingContextImpl CreateDrawingContext(PixelSize expectedPixelSize,
+ out RenderTargetDrawingContextProperties properties)
+ {
+ properties = default;
+ return CreateDrawingContext(false);
+ }
+
public bool IsCorrupted => _gpu?.IsLost == true;
///
diff --git a/src/Windows/Avalonia.Win32/DirectX/DxgiRenderTarget.cs b/src/Windows/Avalonia.Win32/DirectX/DxgiRenderTarget.cs
index 6470aa48b8..698e47d27e 100644
--- a/src/Windows/Avalonia.Win32/DirectX/DxgiRenderTarget.cs
+++ b/src/Windows/Avalonia.Win32/DirectX/DxgiRenderTarget.cs
@@ -76,8 +76,9 @@ namespace Avalonia.Win32.DirectX
}
///
- public override IGlPlatformSurfaceRenderingSession BeginDrawCore()
+ public override IGlPlatformSurfaceRenderingSession BeginDrawCore(PixelSize? expectedPixelSize)
{
+ // TODO: use expectedPixelSize
if (_swapChain is null)
{
throw new InvalidOperationException("No chain to draw on");
diff --git a/src/Windows/Avalonia.Win32/DragSource.cs b/src/Windows/Avalonia.Win32/DragSource.cs
index 36d04a644e..f1cdfa440a 100644
--- a/src/Windows/Avalonia.Win32/DragSource.cs
+++ b/src/Windows/Avalonia.Win32/DragSource.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Threading.Tasks;
+using System.Threading.Tasks;
using Avalonia.Input;
using Avalonia.Input.Platform;
using Avalonia.Threading;
@@ -10,13 +9,6 @@ namespace Avalonia.Win32
{
internal sealed class DragSource : IPlatformDragSource
{
- [Obsolete($"Use {nameof(DoDragDropAsync)} instead.")]
- Task IPlatformDragSource.DoDragDrop(
- PointerEventArgs triggerEvent,
- IDataObject data,
- DragDropEffects allowedEffects)
- => DoDragDropAsync(triggerEvent, new DataObjectToDataTransferWrapper(data), allowedEffects);
-
public Task DoDragDropAsync(
PointerEventArgs triggerEvent,
IDataTransfer dataTransfer,
diff --git a/src/Windows/Avalonia.Win32/OpenGl/Angle/AngleD3DTextureFeature.cs b/src/Windows/Avalonia.Win32/OpenGl/Angle/AngleD3DTextureFeature.cs
index ffdd4fdfd6..e4c63bbeba 100644
--- a/src/Windows/Avalonia.Win32/OpenGl/Angle/AngleD3DTextureFeature.cs
+++ b/src/Windows/Avalonia.Win32/OpenGl/Angle/AngleD3DTextureFeature.cs
@@ -27,8 +27,9 @@ internal class AngleD3DTextureFeature : IGlPlatformSurfaceRenderTargetFactory
_target = target;
}
- public override IGlPlatformSurfaceRenderingSession BeginDrawCore()
+ public override IGlPlatformSurfaceRenderingSession BeginDrawCore(PixelSize? expectedPixelSize)
{
+ // TODO: use expectedPixelSize
var success = false;
var contextLock = Context.EnsureCurrent();
IDirect3D11TextureRenderTargetRenderSession? session = null;
diff --git a/src/Windows/Avalonia.Win32/OpenGl/WglGlPlatformSurface.cs b/src/Windows/Avalonia.Win32/OpenGl/WglGlPlatformSurface.cs
index 6d3d2d28c4..40619660eb 100644
--- a/src/Windows/Avalonia.Win32/OpenGl/WglGlPlatformSurface.cs
+++ b/src/Windows/Avalonia.Win32/OpenGl/WglGlPlatformSurface.cs
@@ -28,6 +28,7 @@ namespace Avalonia.Win32.OpenGl
private readonly WglContext _context;
private readonly EglGlPlatformSurface.IEglWindowGlPlatformSurfaceInfo _info;
private IntPtr _hdc;
+
public RenderTarget(WglContext context, EglGlPlatformSurface.IEglWindowGlPlatformSurfaceInfo info)
{
_context = context;
@@ -35,13 +36,16 @@ namespace Avalonia.Win32.OpenGl
_hdc = context.CreateConfiguredDeviceContext(info.Handle);
}
+ public bool IsCorrupted => false;
+
public void Dispose()
{
WglGdiResourceManager.ReleaseDC(_info.Handle, _hdc);
}
- public IGlPlatformSurfaceRenderingSession BeginDraw()
+ public IGlPlatformSurfaceRenderingSession BeginDraw(PixelSize? expectedPixelSize)
{
+ // TODO: use expectedPixelSize
var oldContext = _context.MakeCurrent(_hdc);
// Reset to default FBO first
diff --git a/src/iOS/Avalonia.iOS/Eagl/EaglLayerSurface.cs b/src/iOS/Avalonia.iOS/Eagl/EaglLayerSurface.cs
index cc3ae528a2..fb0015476a 100644
--- a/src/iOS/Avalonia.iOS/Eagl/EaglLayerSurface.cs
+++ b/src/iOS/Avalonia.iOS/Eagl/EaglLayerSurface.cs
@@ -61,6 +61,8 @@ namespace Avalonia.iOS.Eagl
_fbo = fbo;
}
+ public bool IsCorrupted => false;
+
public void Dispose()
{
CheckThread();
@@ -68,8 +70,9 @@ namespace Avalonia.iOS.Eagl
_fbo.Dispose();
}
- public IGlPlatformSurfaceRenderingSession BeginDraw()
+ public IGlPlatformSurfaceRenderingSession BeginDraw(PixelSize? expectedPixelSize)
{
+ // TODO: use expectedPixelSize
CheckThread();
var restoreContext = _ctx.MakeCurrent();
_fbo.Bind();
diff --git a/src/iOS/Avalonia.iOS/InputHandler.cs b/src/iOS/Avalonia.iOS/InputHandler.cs
index 552f003a38..bd66d5a51e 100644
--- a/src/iOS/Avalonia.iOS/InputHandler.cs
+++ b/src/iOS/Avalonia.iOS/InputHandler.cs
@@ -181,7 +181,7 @@ internal sealed class InputHandler
UIPressPhase.Stationary => RawKeyEventType.KeyDown,
UIPressPhase.Ended => RawKeyEventType.KeyUp,
_ => RawKeyEventType.KeyUp
- }, key, modifier, physicalKey, keyDeviceType, characters);
+ }, key, modifier, physicalKey, characters, keyDeviceType);
_tl.Input?.Invoke(ev);
handled |= ev.Handled;
@@ -229,7 +229,7 @@ internal sealed class InputHandler
{
// Don't pass PhysicalKey, as physically it's just a touch gesture.
var ev = new RawKeyEventArgs(KeyboardDevice.Instance!, timestamp, Root,
- RawKeyEventType.KeyDown, key, RawInputModifiers.None, PhysicalKey.None, KeyDeviceType.Remote, null);
+ RawKeyEventType.KeyDown, key, RawInputModifiers.None, PhysicalKey.None, null, KeyDeviceType.Remote);
_tl.Input?.Invoke(ev);
var handled = ev.Handled;
diff --git a/src/tools/DevGenerators/CompositionGenerator/Generator.cs b/src/tools/DevGenerators/CompositionGenerator/Generator.cs
index 2f27a752e2..4210dfc308 100644
--- a/src/tools/DevGenerators/CompositionGenerator/Generator.cs
+++ b/src/tools/DevGenerators/CompositionGenerator/Generator.cs
@@ -228,7 +228,7 @@ namespace Avalonia.SourceGenerator.CompositionGenerator
server = server.AddMembers(DeclareField($"CompositionProperty<{serverPropertyType}>", CompositionPropertyField(prop),
EqualsValueClause(ParseExpression(
$"CompositionProperty.Register<{serverName}, {serverPropertyType}>(\"{prop.Name}\", obj => (({serverName})obj).{fieldName}, (obj, v) => (({serverName})obj).{fieldName} = v, {compositionPropertyVariantGetter})")),
- SyntaxKind.InternalKeyword, SyntaxKind.StaticKeyword));
+ SyntaxKind.InternalKeyword, SyntaxKind.ReadOnlyKeyword, SyntaxKind.StaticKeyword));
if (prop.DefaultValue != null)
{
@@ -323,6 +323,7 @@ namespace Avalonia.SourceGenerator.CompositionGenerator
IdentifierName(fieldName),
IdentifierName("value")),
Block(
+ ParseStatement($"Validate{prop.Name}Change({fieldName}, value);"),
ParseStatement("On" + prop.Name + "Changing();"),
ParseStatement("changed = true;"),
GeneratePropertySetterAssignment(cl, prop, isObject, isNullable))
@@ -332,6 +333,12 @@ namespace Avalonia.SourceGenerator.CompositionGenerator
ParseStatement($"if(changed) On" + prop.Name + "Changed();")
)).WithModifiers(TokenList(prop.InternalSet ? new[]{Token(SyntaxKind.InternalKeyword)} : Array.Empty()))
))
+ .AddMembers(MethodDeclaration(ParseTypeName("void"), "Validate" + prop.Name + "Change")
+ .AddModifiers(SyntaxKind.PartialKeyword).WithSemicolonToken(Semicolon())
+ .WithParameterList(ParameterList(SeparatedList([
+ Parameter(Identifier("oldValue")).WithType(propType),
+ Parameter(Identifier("newValue")).WithType(propType)
+ ]))))
.AddMembers(MethodDeclaration(ParseTypeName("void"), "On" + prop.Name + "Changed")
.AddModifiers(SyntaxKind.PartialKeyword).WithSemicolonToken(Semicolon()))
.AddMembers(MethodDeclaration(ParseTypeName("void"), "On" + prop.Name + "Changing")
diff --git a/tests/Avalonia.Base.UnitTests/Data/CompiledBindingTests_Create.cs b/tests/Avalonia.Base.UnitTests/Data/CompiledBindingTests_Create.cs
new file mode 100644
index 0000000000..0dcce969df
--- /dev/null
+++ b/tests/Avalonia.Base.UnitTests/Data/CompiledBindingTests_Create.cs
@@ -0,0 +1,162 @@
+using System;
+using System.Globalization;
+using Avalonia.Controls;
+using Avalonia.Data;
+using Avalonia.Data.Converters;
+using Avalonia.UnitTests;
+using Xunit;
+
+namespace Avalonia.Base.UnitTests.Data;
+
+public class CompiledBindingTests_Create
+{
+ [Fact]
+ public void Create_Should_Create_Binding_With_Simple_Property()
+ {
+ var binding = CompiledBinding.Create(vm => vm.StringProperty);
+
+ Assert.NotNull(binding);
+ Assert.NotNull(binding.Path);
+ Assert.Equal("StringProperty", binding.Path.ToString());
+ Assert.Equal(AvaloniaProperty.UnsetValue, binding.Source);
+ Assert.Equal(BindingMode.Default, binding.Mode);
+ }
+
+ [Fact]
+ public void Create_Should_Create_Binding_With_Source()
+ {
+ var source = new TestViewModel { StringProperty = "Test" };
+ var binding = CompiledBinding.Create(
+ vm => vm.StringProperty,
+ source: source);
+
+ Assert.NotNull(binding);
+ Assert.NotNull(binding.Path);
+ Assert.Equal("StringProperty", binding.Path.ToString());
+ Assert.Same(source, binding.Source);
+ }
+
+ [Fact]
+ public void Create_Should_Apply_Converter()
+ {
+ var converter = new TestConverter();
+ var binding = CompiledBinding.Create(
+ vm => vm.StringProperty,
+ converter: converter);
+
+ Assert.Same(converter, binding.Converter);
+ }
+
+ [Fact]
+ public void Create_Should_Apply_Mode()
+ {
+ var binding = CompiledBinding.Create(
+ vm => vm.StringProperty,
+ mode: BindingMode.TwoWay);
+
+ Assert.Equal(BindingMode.TwoWay, binding.Mode);
+ }
+
+ [Fact]
+ public void Create_Should_Work_With_Nested_Properties()
+ {
+ var binding = CompiledBinding.Create(
+ vm => vm.Child!.StringProperty);
+
+ Assert.NotNull(binding);
+ Assert.NotNull(binding.Path);
+ Assert.Equal("Child.StringProperty", binding.Path.ToString());
+ }
+
+ [Fact]
+ public void Create_Should_Work_With_Indexer()
+ {
+ var binding = CompiledBinding.Create(
+ vm => vm.Items[0]);
+
+ Assert.NotNull(binding);
+ Assert.NotNull(binding.Path);
+ Assert.Equal("Items[0]", binding.Path.ToString());
+ }
+
+ [Fact]
+ public void Binding_Should_Work_When_Applied_To_Control()
+ {
+ using (UnitTestApplication.Start(TestServices.StyledWindow))
+ {
+ var target = new TextBlock();
+ var viewModel = new TestViewModel { StringProperty = "Hello" };
+ var binding = CompiledBinding.Create(
+ vm => vm.StringProperty,
+ source: viewModel);
+
+ target.Bind(TextBlock.TextProperty, binding);
+
+ Assert.Equal("Hello", target.Text);
+ }
+ }
+
+ [Fact]
+ public void Binding_Should_Update_When_Source_Property_Changes()
+ {
+ using (UnitTestApplication.Start(TestServices.StyledWindow))
+ {
+ var target = new TextBlock();
+ var viewModel = new TestViewModel { StringProperty = "Initial" };
+ var binding = CompiledBinding.Create(
+ vm => vm.StringProperty,
+ source: viewModel);
+
+ target.Bind(TextBlock.TextProperty, binding);
+ Assert.Equal("Initial", target.Text);
+
+ viewModel.StringProperty = "Updated";
+ Assert.Equal("Updated", target.Text);
+ }
+ }
+
+ [Fact]
+ public void Binding_Should_Use_DataContext_When_No_Source_Specified()
+ {
+ using (UnitTestApplication.Start(TestServices.StyledWindow))
+ {
+ var target = new TextBlock();
+ var viewModel = new TestViewModel { StringProperty = "FromDataContext" };
+ var binding = CompiledBinding.Create(vm => vm.StringProperty);
+
+ target.DataContext = viewModel;
+ target.Bind(TextBlock.TextProperty, binding);
+
+ Assert.Equal("FromDataContext", target.Text);
+ }
+ }
+
+ private class TestViewModel : NotifyingBase
+ {
+ private string? _stringProperty;
+ private TestViewModel? _child;
+
+ public string? StringProperty
+ {
+ get => _stringProperty;
+ set { _stringProperty = value; RaisePropertyChanged(); }
+ }
+
+ public TestViewModel? Child
+ {
+ get => _child;
+ set { _child = value; RaisePropertyChanged(); }
+ }
+
+ public string?[] Items { get; set; } = Array.Empty();
+ }
+
+ private class TestConverter : IValueConverter
+ {
+ public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
+ => value?.ToString()?.ToUpper();
+
+ public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
+ => value?.ToString()?.ToLower();
+ }
+}
diff --git a/tests/Avalonia.Base.UnitTests/Data/Core/BindingExpressionTests.cs b/tests/Avalonia.Base.UnitTests/Data/Core/BindingExpressionTests.cs
index 251be3fc27..6302b68b08 100644
--- a/tests/Avalonia.Base.UnitTests/Data/Core/BindingExpressionTests.cs
+++ b/tests/Avalonia.Base.UnitTests/Data/Core/BindingExpressionTests.cs
@@ -95,7 +95,7 @@ public abstract partial class BindingExpressionTests
var target = new TargetClass { DataContext = dataContext };
var nodes = new List();
var fallback = fallbackValue.HasValue ? fallbackValue.Value : AvaloniaProperty.UnsetValue;
- var path = CompiledBindingPathFromExpressionBuilder.Build(expression, enableDataValidation);
+ var path = BindingExpressionVisitor.BuildPath(expression);
if (relativeSource is not null && relativeSource.Mode is not RelativeSourceMode.Self)
throw new NotImplementedException();
diff --git a/tests/Avalonia.Base.UnitTests/Data/Core/CompiledBindingPathFromExpressionBuilder.cs b/tests/Avalonia.Base.UnitTests/Data/Core/CompiledBindingPathFromExpressionBuilder.cs
deleted file mode 100644
index d3623fde80..0000000000
--- a/tests/Avalonia.Base.UnitTests/Data/Core/CompiledBindingPathFromExpressionBuilder.cs
+++ /dev/null
@@ -1,313 +0,0 @@
-using System;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Reflection;
-using System.Threading.Tasks;
-using Avalonia.Data;
-using Avalonia.Data.Core;
-using Avalonia.Markup.Xaml.MarkupExtensions.CompiledBindings;
-
-#nullable enable
-
-namespace Avalonia.Base.UnitTests.Data.Core;
-
-internal class CompiledBindingPathFromExpressionBuilder : ExpressionVisitor
-{
- private static readonly PropertyInfo AvaloniaObjectIndexer;
- private static readonly MethodInfo CreateDelegateMethod;
- private static readonly string IndexerGetterName = "get_Item";
- private const string MultiDimensionalArrayGetterMethodName = "Get";
- private readonly bool _enableDataValidation;
- private readonly LambdaExpression _rootExpression;
- private readonly CompiledBindingPathBuilder _builder = new();
- private Expression? _head;
-
- public CompiledBindingPathFromExpressionBuilder(LambdaExpression expression, bool enableDataValidation)
- {
- _rootExpression = expression;
- _enableDataValidation = enableDataValidation;
- }
-
- static CompiledBindingPathFromExpressionBuilder()
- {
- AvaloniaObjectIndexer = typeof(AvaloniaObject).GetProperty("Item", new[] { typeof(AvaloniaProperty) })!;
- CreateDelegateMethod = typeof(MethodInfo).GetMethod("CreateDelegate", new[] { typeof(Type), typeof(object) })!;
- }
-
- public static CompiledBindingPath Build(Expression> expression, bool enableDataValidation)
- {
- var visitor = new CompiledBindingPathFromExpressionBuilder(expression, enableDataValidation);
- visitor.Visit(expression);
- return visitor._builder.Build();
- }
-
- protected override Expression VisitBinary(BinaryExpression node)
- {
- // Indexers require more work since the compiler doesn't generate IndexExpressions:
- // they weren't in System.Linq.Expressions v1 and so must be generated manually.
- if (node.NodeType == ExpressionType.ArrayIndex)
- return Visit(Expression.MakeIndex(node.Left, null, new[] { node.Right }));
-
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- protected override Expression VisitIndex(IndexExpression node)
- {
- if (node.Indexer == AvaloniaObjectIndexer)
- {
- var property = GetValue(node.Arguments[0]);
- return Add(node.Object, node, x => x.Property(property, PropertyInfoAccessorFactory.CreateAvaloniaPropertyAccessor));
- }
- else if (node.Object?.Type.IsArray == true)
- {
- var indexes = node.Arguments.Select(GetValue).ToArray();
- return Add(node.Object, node, x => x.ArrayElement(indexes, node.Type));
- }
- else if (node.Indexer?.GetMethod is not null &&
- node.Arguments.Count == 1 &&
- node.Arguments[0].Type == typeof(int))
- {
- var getMethod = node.Indexer.GetMethod;
- var setMethod = node.Indexer.SetMethod;
- var index = GetValue(node.Arguments[0]);
- var info = new ClrPropertyInfo(
- CommonPropertyNames.IndexerName,
- x => getMethod.Invoke(x, new object[] { index }),
- setMethod is not null ? (o, v) => setMethod.Invoke(o, new[] { v }) : null,
- getMethod.ReturnType);
- return Add(node.Object, node, x => x.Property(
- info,
- (x, i) => PropertyInfoAccessorFactory.CreateIndexerPropertyAccessor(x, i, index)));
- }
- else if (node.Indexer?.GetMethod is not null)
- {
- var getMethod = node.Indexer.GetMethod;
- var setMethod = node.Indexer?.SetMethod;
- var indexes = node.Arguments.Select(GetValue).ToArray();
- var info = new ClrPropertyInfo(
- CommonPropertyNames.IndexerName,
- x => getMethod.Invoke(x, indexes),
- setMethod is not null ? (o, v) => setMethod.Invoke(o, indexes.Append(v).ToArray()) : null,
- getMethod.ReturnType);
- return Add(node.Object, node, x => x.Property(
- info,
- PropertyInfoAccessorFactory.CreateInpcPropertyAccessor));
- }
-
- throw new ExpressionParseException(0, $"Invalid indexer in binding expression: {node.NodeType}.");
- }
-
- protected override Expression VisitMember(MemberExpression node)
- {
- if (node.Member.MemberType != MemberTypes.Property)
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
-
- if (typeof(AvaloniaObject).IsAssignableFrom(node.Expression?.Type) &&
- AvaloniaPropertyRegistry.Instance.FindRegistered(node.Expression.Type, node.Member.Name) is { } avaloniaProperty)
- {
- return Add(
- node.Expression,
- node,
- x => x.Property(avaloniaProperty, PropertyInfoAccessorFactory.CreateAvaloniaPropertyAccessor));
- }
- else
- {
- var property = (PropertyInfo)node.Member;
- var info = new ClrPropertyInfo(
- property.Name,
- CreateGetter(property),
- CreateSetter(property),
- property.PropertyType);
- return Add(node.Expression, node, x => x.Property(info, PropertyInfoAccessorFactory.CreateInpcPropertyAccessor));
- }
- }
-
- protected override Expression VisitMethodCall(MethodCallExpression node)
- {
- var method = node.Method;
-
- if (method.Name == IndexerGetterName && node.Object is not null)
- {
- var property = TryGetPropertyFromMethod(method);
- return Visit(Expression.MakeIndex(node.Object, property, node.Arguments));
- }
- else if (method.Name == MultiDimensionalArrayGetterMethodName &&
- node.Object is not null)
- {
- var indexes = node.Arguments.Select(GetValue).ToArray();
- return Add(node.Object, node, x => x.ArrayElement(indexes, node.Type));
- }
- else if (method.Name.StartsWith(StreamBindingExtensions.StreamBindingName) &&
- method.DeclaringType == typeof(StreamBindingExtensions) &&
- method.GetGenericArguments() is [Type genericArg])
- {
- var instance = node.Method.IsStatic ? node.Arguments[0] : node.Object;
-
- if (typeof(Task<>).MakeGenericType(genericArg).IsAssignableFrom(instance?.Type))
- {
- var builderMethod = typeof(CompiledBindingPathBuilder)
- .GetMethod(nameof(CompiledBindingPathBuilder.StreamTask))!
- .MakeGenericMethod(genericArg);
- return Add(instance, node, x => builderMethod.Invoke(x, null));
- }
- else if (typeof(IObservable<>).MakeGenericType(genericArg).IsAssignableFrom(instance?.Type))
- {
- var builderMethod = typeof(CompiledBindingPathBuilder)
- .GetMethod(nameof(CompiledBindingPathBuilder.StreamObservable))!
- .MakeGenericMethod(genericArg);
- return Add(instance, node, x => builderMethod.Invoke(x, null));
- }
- }
-
- throw new ExpressionParseException(0, $"Invalid method call in binding expression: '{node.Method.DeclaringType}.{node.Method.Name}'.");
- }
-
- protected override Expression VisitParameter(ParameterExpression node)
- {
- if (node == _rootExpression.Parameters[0] && _head is null)
- _head = node;
- return base.VisitParameter(node);
- }
-
- protected override Expression VisitUnary(UnaryExpression node)
- {
- if (node.NodeType == ExpressionType.Not && node.Type == typeof(bool))
- {
- return Add(node.Operand, node, x => x.Not());
- }
- else if (node.NodeType == ExpressionType.Convert)
- {
- if (node.Operand.Type.IsAssignableFrom(node.Type))
- {
- // Ignore inheritance casts
- return _head = base.VisitUnary(node);
- }
- }
- else if (node.NodeType == ExpressionType.TypeAs)
- {
- // Ignore as operator.
- return _head = base.VisitUnary(node);
- }
-
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- protected override Expression VisitBlock(BlockExpression node)
- {
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- protected override CatchBlock VisitCatchBlock(CatchBlock node)
- {
- throw new ExpressionParseException(0, $"Catch blocks are not allowed in binding expressions.");
- }
-
- protected override Expression VisitConditional(ConditionalExpression node)
- {
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- protected override Expression VisitDynamic(DynamicExpression node)
- {
- throw new ExpressionParseException(0, $"Dynamic expressions are not allowed in binding expressions.");
- }
-
- protected override ElementInit VisitElementInit(ElementInit node)
- {
- throw new ExpressionParseException(0, $"Element init expressions are not valid in a binding expression.");
- }
-
- protected override Expression VisitGoto(GotoExpression node)
- {
- throw new ExpressionParseException(0, $"Goto expressions not supported in binding expressions.");
- }
-
- protected override Expression VisitInvocation(InvocationExpression node)
- {
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- protected override Expression VisitLabel(LabelExpression node)
- {
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- protected override Expression VisitListInit(ListInitExpression node)
- {
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- protected override Expression VisitLoop(LoopExpression node)
- {
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- protected override MemberAssignment VisitMemberAssignment(MemberAssignment node)
- {
- throw new ExpressionParseException(0, $"Member assignments not supported in binding expressions.");
- }
-
- protected override Expression VisitSwitch(SwitchExpression node)
- {
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- protected override Expression VisitTry(TryExpression node)
- {
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- protected override Expression VisitTypeBinary(TypeBinaryExpression node)
- {
- throw new ExpressionParseException(0, $"Invalid expression type in binding expression: {node.NodeType}.");
- }
-
- private Expression Add(Expression? instance, Expression expression, Action build)
- {
- var visited = Visit(instance);
- if (visited != _head)
- throw new ExpressionParseException(
- 0,
- $"Unable to parse '{expression}': expected an instance of '{_head}' but got '{visited}'.");
- build(_builder);
- return _head = expression;
- }
-
- private static Func? CreateGetter(PropertyInfo info)
- {
- if (info.GetMethod == null)
- return null;
- var target = Expression.Parameter(typeof(object), "target");
- return Expression.Lambda>(
- Expression.Convert(Expression.Call(Expression.Convert(target, info.DeclaringType!), info.GetMethod),
- typeof(object)),
- target)
- .Compile();
- }
-
- private static Action? CreateSetter(PropertyInfo info)
- {
- if (info.SetMethod == null)
- return null;
- var target = Expression.Parameter(typeof(object), "target");
- var value = Expression.Parameter(typeof(object), "value");
- return Expression.Lambda>(
- Expression.Call(Expression.Convert(target, info.DeclaringType!), info.SetMethod,
- Expression.Convert(value, info.SetMethod.GetParameters()[0].ParameterType)),
- target, value)
- .Compile();
- }
-
- private static T GetValue(Expression expr)
- {
- if (expr is ConstantExpression constant)
- return (T)constant.Value!;
- return Expression.Lambda>(expr).Compile(preferInterpretation: true)();
- }
-
- private static PropertyInfo? TryGetPropertyFromMethod(MethodInfo method)
- {
- var type = method.DeclaringType;
- return type?.GetRuntimeProperties().FirstOrDefault(prop => prop.GetMethod == method);
- }
-}
diff --git a/tests/Avalonia.Base.UnitTests/Data/Core/Parsers/BindingExpressionVisitorExtensions.cs b/tests/Avalonia.Base.UnitTests/Data/Core/Parsers/BindingExpressionVisitorExtensions.cs
new file mode 100644
index 0000000000..6f3d3474f5
--- /dev/null
+++ b/tests/Avalonia.Base.UnitTests/Data/Core/Parsers/BindingExpressionVisitorExtensions.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using Avalonia.Data.Core.ExpressionNodes;
+using Avalonia.Data.Core.Parsers;
+
+namespace Avalonia.Base.UnitTests.Data.Core.Parsers;
+
+///
+/// Test extensions for BindingExpressionVisitor tests.
+///
+internal static class BindingExpressionVisitorExtensions
+{
+ ///
+ /// Builds a list of binding expression nodes from a lambda expression.
+ /// This is a test helper method - production code should use BuildPath() instead.
+ ///
+ public static List BuildNodes(Expression> expression)
+ {
+ var path = BindingExpressionVisitor.BuildPath(expression);
+ var nodes = new List();
+ path.BuildExpression(nodes, out var _);
+ return nodes;
+ }
+}
diff --git a/tests/Avalonia.Base.UnitTests/Data/Core/Parsers/BindingExpressionVisitorTests.cs b/tests/Avalonia.Base.UnitTests/Data/Core/Parsers/BindingExpressionVisitorTests.cs
new file mode 100644
index 0000000000..ddd0f87c04
--- /dev/null
+++ b/tests/Avalonia.Base.UnitTests/Data/Core/Parsers/BindingExpressionVisitorTests.cs
@@ -0,0 +1,528 @@
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+using Avalonia.Data.Core;
+using Avalonia.Data.Core.ExpressionNodes;
+using Avalonia.Data.Core.Parsers;
+using Xunit;
+
+namespace Avalonia.Base.UnitTests.Data.Core.Parsers
+{
+ public class BindingExpressionVisitorTests
+ {
+ [Fact]
+ public void BuildNodes_Should_Parse_Simple_Property()
+ {
+ Expression> expr = x => x.StringProperty;
+
+ var nodes = BuildNodes(expr);
+
+ var node = Assert.Single(nodes);
+ var propertyNode = Assert.IsType(node);
+ Assert.Equal("StringProperty", propertyNode.PropertyName);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Property_Chain()
+ {
+ Expression> expr = x => x.Child!.StringProperty;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+
+ var firstNode = Assert.IsType(nodes[0]);
+ Assert.Equal("Child", firstNode.PropertyName);
+
+ var secondNode = Assert.IsType(nodes[1]);
+ Assert.Equal("StringProperty", secondNode.PropertyName);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Long_Property_Chain()
+ {
+ Expression> expr = x => x.Child!.Child!.StringProperty;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(3, nodes.Count);
+ Assert.All(nodes, n => Assert.IsType(n));
+ Assert.Equal("Child", ((PropertyAccessorNode)nodes[0]).PropertyName);
+ Assert.Equal("Child", ((PropertyAccessorNode)nodes[1]).PropertyName);
+ Assert.Equal("StringProperty", ((PropertyAccessorNode)nodes[2]).PropertyName);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Indexer()
+ {
+ Expression> expr = x => x.IndexedProperty![0];
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("IndexedProperty", propertyNode.PropertyName);
+
+ Assert.IsType(nodes[1]); // List indexer, not array
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Array_Index()
+ {
+ Expression> expr = x => x.ArrayProperty![0];
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("ArrayProperty", propertyNode.PropertyName);
+
+ Assert.IsType(nodes[1]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Multi_Dimensional_Array()
+ {
+ Expression> expr = x => x.MultiDimensionalArray![0, 1];
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("MultiDimensionalArray", propertyNode.PropertyName);
+
+ Assert.IsType(nodes[1]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_AvaloniaProperty_Access()
+ {
+ Expression> expr = x => x[StyledElement.DataContextProperty];
+
+ var nodes = BuildNodes(expr);
+
+ var node = Assert.Single(nodes);
+ var avaloniaPropertyNode = Assert.IsType(node);
+ Assert.Equal("DataContext", avaloniaPropertyNode.PropertyName); // AvaloniaProperty accessed as property
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_AvaloniaProperty_Access_In_Chain()
+ {
+ Expression> expr = x => x.StyledChild![StyledElement.DataContextProperty];
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("StyledChild", propertyNode.PropertyName);
+
+ var avaloniaPropertyNode = Assert.IsType(nodes[1]);
+ Assert.Equal("DataContext", avaloniaPropertyNode.PropertyName); // AvaloniaProperty accessed as property
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Logical_Not()
+ {
+ Expression> expr = x => !x.BoolProperty;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("BoolProperty", propertyNode.PropertyName);
+
+ Assert.IsType(nodes[1]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Logical_Not_In_Chain()
+ {
+ Expression> expr = x => !x.Child!.BoolProperty;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(3, nodes.Count);
+ Assert.IsType(nodes[0]);
+ Assert.IsType(nodes[1]);
+ Assert.IsType(nodes[2]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Task_StreamBinding()
+ {
+ Expression> expr = x => x.TaskProperty!.StreamBinding();
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("TaskProperty", propertyNode.PropertyName);
+
+ Assert.IsType(nodes[1]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Observable_StreamBinding()
+ {
+ Expression> expr = x => x.ObservableProperty!.StreamBinding();
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("ObservableProperty", propertyNode.PropertyName);
+
+ Assert.IsType(nodes[1]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Void_Task_StreamBinding()
+ {
+ Expression> expr = x => x.VoidTaskProperty!.StreamBinding();
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("VoidTaskProperty", propertyNode.PropertyName);
+
+ Assert.IsType(nodes[1]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Create_Node_For_Upcast()
+ {
+ // Upcasts (derived to base) create a cast node
+ Expression> expr = x => (TestClass)x;
+
+ var nodes = BuildNodes(expr);
+
+ var node = Assert.Single(nodes);
+ Assert.IsType(node);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Create_Node_For_Upcast_In_Property_Chain()
+ {
+ // Cast creates a node, then property access creates another
+ Expression> expr = x => ((TestClass)x).StringProperty;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+ Assert.IsType(nodes[0]);
+ var propertyNode = Assert.IsType(nodes[1]);
+ Assert.Equal("StringProperty", propertyNode.PropertyName);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Create_Node_For_Downcast()
+ {
+ // Downcasts (base to derived) create a cast node - the binding system will handle runtime errors
+ Expression> expr = x => (DerivedTestClass)x;
+
+ var nodes = BuildNodes(expr);
+
+ var node = Assert.Single(nodes);
+ Assert.IsType(node);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Create_Node_For_Downcast_In_Property_Chain()
+ {
+ // Practical example: casting to access derived type properties
+ Expression> expr = x => ((DerivedTestClass)x.Child!).DerivedProperty;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(3, nodes.Count);
+ var childNode = Assert.IsType(nodes[0]);
+ Assert.Equal("Child", childNode.PropertyName);
+ Assert.IsType(nodes[1]);
+ var derivedNode = Assert.IsType(nodes[2]);
+ Assert.Equal("DerivedProperty", derivedNode.PropertyName);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Throw_For_Value_Type_Cast()
+ {
+ // Value type conversions should throw
+ Expression> expr = x => (long)x.IntProperty;
+
+ var ex = Assert.Throws(() =>
+ BuildNodes(expr));
+
+ Assert.Contains("Invalid expression type", ex.Message);
+ Assert.Contains("Convert", ex.Message);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Create_Nodes_For_Casting_Through_Object()
+ {
+ // Casting through object creates cast nodes
+ Expression> expr = x => (string)(object)x.StringProperty!;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(3, nodes.Count);
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("StringProperty", propertyNode.PropertyName);
+ Assert.IsType(nodes[1]); // cast to object
+ Assert.IsType(nodes[2]); // cast to string
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Create_Node_For_TypeAs_Operator()
+ {
+ // TypeAs operator creates a cast node
+ Expression> expr = x => x.Child as object;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("Child", propertyNode.PropertyName);
+ Assert.IsType(nodes[1]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Throw_For_Addition_Operator()
+ {
+ Expression> expr = x => x.IntProperty + 1;
+
+ var ex = Assert.Throws(() =>
+ BuildNodes(expr));
+
+ Assert.Contains("Invalid expression type", ex.Message);
+ Assert.Contains("Add", ex.Message);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Throw_For_Subtraction_Operator()
+ {
+ Expression> expr = x => x.IntProperty - 1;
+
+ var ex = Assert.Throws(() =>
+ BuildNodes(expr));
+
+ Assert.Contains("Invalid expression type", ex.Message);
+ Assert.Contains("Subtract", ex.Message);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Throw_For_Multiplication_Operator()
+ {
+ Expression> expr = x => x.IntProperty * 2;
+
+ var ex = Assert.Throws(() =>
+ BuildNodes(expr));
+
+ Assert.Contains("Invalid expression type", ex.Message);
+ Assert.Contains("Multiply", ex.Message);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Throw_For_Equality_Operator()
+ {
+ Expression> expr = x => x.IntProperty == 42;
+
+ var ex = Assert.Throws(() =>
+ BuildNodes(expr));
+
+ Assert.Contains("Invalid expression type", ex.Message);
+ Assert.Contains("Equal", ex.Message);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Throw_For_Conditional_Expression()
+ {
+ Expression> expr = x => x.BoolProperty ? "true" : "false";
+
+ var ex = Assert.Throws(() =>
+ BuildNodes(expr));
+
+ Assert.Contains("Invalid expression type", ex.Message);
+ Assert.Contains("Conditional", ex.Message);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Throw_For_Method_Call_That_Is_Not_Indexer_Or_StreamBinding()
+ {
+ Expression> expr = x => x.StringProperty!.ToUpper();
+
+ var ex = Assert.Throws(() =>
+ BuildNodes(expr));
+
+ Assert.Contains("Invalid method call", ex.Message);
+ Assert.Contains("ToUpper", ex.Message);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Handle_Unary_Plus_Operator()
+ {
+ // Unary plus is typically optimized away by the C# compiler and doesn't appear in the
+ // expression tree, so it doesn't throw an exception.
+ Expression> expr = x => +x.IntProperty;
+
+ var nodes = BuildNodes(expr);
+
+ var node = Assert.Single(nodes);
+ var propertyNode = Assert.IsType(node);
+ Assert.Equal("IntProperty", propertyNode.PropertyName);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Throw_For_Unary_Minus_Operator()
+ {
+ Expression> expr = x => -x.IntProperty;
+
+ var ex = Assert.Throws(() =>
+ BuildNodes(expr));
+
+ Assert.Contains("Invalid expression type", ex.Message);
+ Assert.Contains("Negate", ex.Message);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Chained_Indexers()
+ {
+ Expression> expr = x => x.NestedIndexedProperty![0]![1];
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(3, nodes.Count);
+
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("NestedIndexedProperty", propertyNode.PropertyName);
+
+ Assert.IsType(nodes[1]); // List indexer
+ Assert.IsType(nodes[2]); // List indexer
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Property_After_Indexer()
+ {
+ Expression> expr = x => x.IndexedProperty![0]!.StringProperty;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(3, nodes.Count);
+ Assert.IsType(nodes[0]);
+ Assert.IsType(nodes[1]); // List indexer
+ Assert.IsType(nodes[2]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Indexer_With_String_Key()
+ {
+ Expression> expr = x => x.DictionaryProperty!["key"];
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+
+ var propertyNode = Assert.IsType(nodes[0]);
+ Assert.Equal("DictionaryProperty", propertyNode.PropertyName);
+
+ Assert.IsType(nodes[1]); // Dictionary indexer
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Indexer_With_Variable_Key()
+ {
+ var key = "test";
+ Expression> expr = x => x.DictionaryProperty![key];
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(2, nodes.Count);
+ Assert.IsType(nodes[0]);
+ Assert.IsType(nodes[1]); // Dictionary indexer
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_StreamBinding_In_Property_Chain()
+ {
+ Expression> expr = x => x.Child!.TaskProperty!.StreamBinding();
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(3, nodes.Count);
+ Assert.IsType(nodes[0]);
+ Assert.IsType(nodes[1]);
+ Assert.IsType(nodes[2]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Logical_Not_After_StreamBinding()
+ {
+ Expression> expr = x => !x.BoolTaskProperty!.StreamBinding();
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(3, nodes.Count);
+ Assert.IsType(nodes[0]);
+ Assert.IsType(nodes[1]);
+ Assert.IsType(nodes[2]);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Handle_Empty_Expression()
+ {
+ Expression> expr = x => x;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Empty(nodes);
+ }
+
+ [Fact]
+ public void BuildNodes_Should_Parse_Multiple_Logical_Not_Operators()
+ {
+ Expression> expr = x => !!x.BoolProperty;
+
+ var nodes = BuildNodes(expr);
+
+ Assert.Equal(3, nodes.Count);
+ Assert.IsType(nodes[0]);
+ Assert.IsType(nodes[1]);
+ Assert.IsType(nodes[2]);
+ }
+
+ public class TestClass
+ {
+ public string? StringProperty { get; set; }
+ public int IntProperty { get; set; }
+ public bool BoolProperty { get; set; }
+ public TestClass? Child { get; set; }
+ public StyledElement? StyledChild { get; set; }
+ public string?[]? ArrayProperty { get; set; }
+ public string?[,]? MultiDimensionalArray { get; set; }
+ public List? IndexedProperty { get; set; }
+ public List>? NestedIndexedProperty { get; set; }
+ public Dictionary? DictionaryProperty { get; set; }
+ public Task? TaskProperty { get; set; }
+ public Task? VoidTaskProperty { get; set; }
+ public Task? BoolTaskProperty { get; set; }
+ public IObservable? ObservableProperty { get; set; }
+ }
+
+ public class DerivedTestClass : TestClass
+ {
+ public string? DerivedProperty { get; set; }
+ }
+
+ private static List BuildNodes(Expression> expression)
+ => BindingExpressionVisitorExtensions.BuildNodes(expression);
+ }
+}
diff --git a/tests/Avalonia.Base.UnitTests/Rendering/CompositorInvalidationClippingTests.cs b/tests/Avalonia.Base.UnitTests/Rendering/CompositorInvalidationClippingTests.cs
index c158ff4e75..78a3d3e5bc 100644
--- a/tests/Avalonia.Base.UnitTests/Rendering/CompositorInvalidationClippingTests.cs
+++ b/tests/Avalonia.Base.UnitTests/Rendering/CompositorInvalidationClippingTests.cs
@@ -8,35 +8,35 @@ namespace Avalonia.Base.UnitTests.Rendering;
///
public class CompositorInvalidationClippingTests : CompositorTestsBase
{
- [Fact]
- // Test case: When the ClipToBounds is false, all visuals should be rendered
- public void Siblings_Should_Be_Rendered_On_Invalidate_Without_ClipToBounds()
+ int CountVisuals(Visual visual)
{
- AssertRenderedVisuals(clipToBounds: false, clipGeometry: false, expectedRenderedVisualsCount: 4);
+ int count = 1; // Count the current visual
+ foreach (var child in visual.VisualChildren) count += CountVisuals(child);
+ return count;
}
-
- [Fact]
- // Test case: When the ClipToBounds is true, only visuals within the clipped boundary should be rendered
- public void Siblings_Should_Not_Be_Rendered_On_Invalidate_With_ClipToBounds()
- {
- AssertRenderedVisuals(clipToBounds: true, clipGeometry: false, expectedRenderedVisualsCount: 3);
- }
-
- [Fact]
- // Test case: When the Clip is used, only visuals within the clip geometry should be rendered
- public void Siblings_Should_Not_Be_Rendered_On_Invalidate_With_Clip()
- {
- AssertRenderedVisuals(clipToBounds: false, clipGeometry: true, expectedRenderedVisualsCount: 3);
- }
-
- private void AssertRenderedVisuals(bool clipToBounds, bool clipGeometry, int expectedRenderedVisualsCount)
+
+ [Theory,
+ // If canvas itself has no background, the second render won't draw any visuals at all, since
+ // root visual's subtree bounds will exactly match the second visual
+ InlineData(false, false, false, 1, 0),
+ InlineData(true, false, false, 1, 0),
+ InlineData(false, true, false, 1, 0),
+ // If canvas has background, the second render will draw only the canvas visual itself
+ InlineData(false, false, true, 5, 4),
+ InlineData(true, false, true,5, 4),
+ InlineData(false, true, true, 5, 4),
+ ]
+ public void Do_Not_Re_Render_Unaffected_Visual_Trees(bool clipToBounds, bool clipGeometry,
+ bool canvasHasContent,
+ int expectedVisitedVisualsCount, int expectedRenderedVisualsCount)
{
using (var s = new CompositorCanvas())
{
- //#1 visual is top level
- //#2 visual is s.Canvas
+ // #1 visual is top level
+ // #2 is ContentPresenter
+ // #3 visual is s.Canvas
- //#3 visual is border1
+ //# 4 visual is border1
s.Canvas.Children.Add(new Border()
{
[Canvas.LeftProperty] = 0, [Canvas.TopProperty] = 0,
@@ -46,7 +46,7 @@ public class CompositorInvalidationClippingTests : CompositorTestsBase
Clip = clipGeometry ? new RectangleGeometry(new Rect(new Size(20, 10))) : null
});
- //#4 visual is border2
+ //# 5 visual is border2
s.Canvas.Children.Add(new Border()
{
[Canvas.LeftProperty] = 30, [Canvas.TopProperty] = 50,
@@ -55,14 +55,18 @@ public class CompositorInvalidationClippingTests : CompositorTestsBase
ClipToBounds = clipToBounds,
Clip = clipGeometry ? new RectangleGeometry(new Rect(new Size(20, 10))) : null
});
+ if (canvasHasContent)
+ s.Canvas.Background = Brushes.Green;
s.RunJobs();
s.Events.Reset();
+ if (CountVisuals(s.TopLevel) != 5)
+ Assert.Fail("Layout part of the test is broken, expected 5 visuals in the tree");
//invalidate border1
s.Canvas.Children[0].IsVisible = false;
s.RunJobs();
- s.AssertRenderedVisuals(expectedRenderedVisualsCount);
+ s.AssertRenderedVisuals(expectedVisitedVisualsCount, expectedRenderedVisualsCount);
}
}
}
diff --git a/tests/Avalonia.Benchmarks/Compositor/CompositionTargetUpdate.cs b/tests/Avalonia.Benchmarks/Compositor/CompositionTargetUpdate.cs
new file mode 100644
index 0000000000..a066b7a4ab
--- /dev/null
+++ b/tests/Avalonia.Benchmarks/Compositor/CompositionTargetUpdate.cs
@@ -0,0 +1,121 @@
+using System;
+using System.Runtime.InteropServices;
+using Avalonia.Controls.Platform.Surfaces;
+using Avalonia.Media;
+using Avalonia.Platform;
+using Avalonia.Rendering;
+using Avalonia.Rendering.Composition;
+using Avalonia.Rendering.Composition.Drawing;
+using Avalonia.Rendering.Composition.Server;
+using Avalonia.Threading;
+using Avalonia.UnitTests;
+using BenchmarkDotNet.Attributes;
+
+namespace Avalonia.Benchmarks;
+
+public class CompositionTargetUpdateOnly : IDisposable
+{
+ private readonly bool _includeRender;
+ private readonly IDisposable _app;
+ private readonly Compositor _compositor;
+ private readonly CompositionTarget _target;
+
+ class Timer : IRenderTimer
+ {
+ event Action IRenderTimer.Tick { add { } remove { } }
+ public bool RunsInBackground => false;
+ }
+
+ class ManualScheduler : ICompositorScheduler
+ {
+ public void CommitRequested(Compositor compositor)
+ {
+
+ }
+ }
+
+ class NullFramebuffer : IFramebufferPlatformSurface
+ {
+ private static readonly IntPtr Buffer = Marshal.AllocHGlobal(4);
+ public IFramebufferRenderTarget CreateFramebufferRenderTarget() =>
+ new FuncFramebufferRenderTarget(() => new LockedFramebuffer(Buffer, new PixelSize(1, 1), 4, new Vector(96, 96), PixelFormat.Rgba8888,
+ AlphaFormat.Premul, null));
+ }
+
+
+ public CompositionTargetUpdateOnly() : this(false)
+ {
+
+ }
+
+ protected CompositionTargetUpdateOnly(bool includeRender)
+ {
+ _includeRender = includeRender;
+ _app = UnitTestApplication.Start(TestServices.StyledWindow);
+ _compositor = new Compositor(new RenderLoop(new Timer()), null, true, new ManualScheduler(), true,
+ Dispatcher.UIThread, null);
+ _target = _compositor.CreateCompositionTarget(() => [new NullFramebuffer()]);
+ _target.PixelSize = new PixelSize(1000, 1000);
+ _target.Scaling = 1;
+ var root = _compositor.CreateContainerVisual();
+ root.Size = new Vector(1000, 1000);
+ _target.Root = root;
+ if (includeRender)
+ _target.IsEnabled = true;
+ CreatePyramid(root, 7);
+ _compositor.Commit();
+ }
+
+ void CreatePyramid(CompositionContainerVisual visual, int depth)
+ {
+ for (var c = 0; c < 4; c++)
+ {
+ var child = new CompositionDrawListVisual(visual.Compositor,
+ new ServerCompositionDrawListVisual(visual.Compositor.Server, null!), null!);
+ double right = c == 1 || c == 3 ? 1 : 0;
+ double bottom = c > 1 ? 1 : 0;
+
+ var rect = new Rect(
+ visual.Size.X / 2 * right,
+ visual.Size.Y / 2 * bottom,
+ visual.Size.X / 2,
+ visual.Size.Y / 2
+ );
+ child.Offset = new(rect.X, rect.Y, 0);
+ child.Size = new Vector(rect.Width, rect.Height);
+
+ var ctx = new RenderDataDrawingContext(child.Compositor);
+ ctx.DrawRectangle(Brushes.Aqua, null, new Rect(rect.Size));
+ child.DrawList = ctx.GetRenderResults();
+ child.Visible = true;
+ visual.Children.Add(child);
+ if (depth > 0)
+ CreatePyramid(child, depth - 1);
+ }
+ }
+
+ [Benchmark]
+ public void TargetUpdate()
+ {
+ _target.Root.Offset = new Vector3D(_target.Root.Offset.X == 0 ? 1 : 0, 0, 0);
+ _compositor.Commit();
+ _compositor.Server.Render();
+ if (!_includeRender)
+ _target.Server.Update();
+
+ }
+
+
+ public void Dispose()
+ {
+ _app.Dispose();
+
+ }
+}
+
+public class CompositionTargetUpdateWithRender : CompositionTargetUpdateOnly
+{
+ public CompositionTargetUpdateWithRender() : base(true)
+ {
+ }
+}
diff --git a/tests/Avalonia.Controls.UnitTests/AutoCompleteBoxTests.cs b/tests/Avalonia.Controls.UnitTests/AutoCompleteBoxTests.cs
index b4e0a055e3..26ece37acf 100644
--- a/tests/Avalonia.Controls.UnitTests/AutoCompleteBoxTests.cs
+++ b/tests/Avalonia.Controls.UnitTests/AutoCompleteBoxTests.cs
@@ -406,7 +406,7 @@ namespace Avalonia.Controls.UnitTests
Assert.Equal(control.Text, control.ItemSelector(input, selectedItem));
});
}
-
+
[Fact]
public void Text_Validation()
{
@@ -421,7 +421,7 @@ namespace Avalonia.Controls.UnitTests
Assert.Equal([exception], DataValidationErrors.GetErrors(control));
});
}
-
+
[Fact]
public void Text_Validation_TextBox_Errors_Binding()
{
@@ -430,20 +430,20 @@ namespace Avalonia.Controls.UnitTests
// simulate the TemplateBinding that would be used within the AutoCompleteBox control theme for the inner PART_TextBox
// DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
textbox.Bind(DataValidationErrors.ErrorsProperty, control.GetBindingObservable(DataValidationErrors.ErrorsProperty));
-
+
var exception = new InvalidCastException("failed validation");
var textObservable = new BehaviorSubject(new BindingNotification(exception, BindingErrorType.DataValidationError));
control.Bind(AutoCompleteBox.TextProperty, textObservable);
Dispatcher.UIThread.RunJobs();
-
+
Assert.True(DataValidationErrors.GetHasErrors(control));
Assert.Equal([exception], DataValidationErrors.GetErrors(control));
-
+
Assert.True(DataValidationErrors.GetHasErrors(textbox));
Assert.Equal([exception], DataValidationErrors.GetErrors(textbox));
});
}
-
+
[Fact]
public void SelectedItem_Validation()
{
@@ -583,7 +583,7 @@ namespace Avalonia.Controls.UnitTests
}
///
- /// Retrieves a defined predicate filter through a new AutoCompleteBox
+ /// Retrieves a defined predicate filter through a new AutoCompleteBox
/// control instance.
///
/// The FilterMode of interest.
@@ -1283,5 +1283,18 @@ namespace Avalonia.Controls.UnitTests
IsOpen = true;
}
}
+
+ [Fact]
+ public void PlaceholderForeground_Can_Be_Set()
+ {
+ using (UnitTestApplication.Start(TestServices.StyledWindow))
+ {
+ var control = CreateControl();
+ control.PlaceholderText = "Search...";
+ control.PlaceholderForeground = Media.Brushes.Green;
+
+ Assert.Equal(Media.Brushes.Green, control.PlaceholderForeground);
+ }
+ }
}
}
diff --git a/tests/Avalonia.Controls.UnitTests/ButtonTests.cs b/tests/Avalonia.Controls.UnitTests/ButtonTests.cs
index 92bf013725..c8b985afda 100644
--- a/tests/Avalonia.Controls.UnitTests/ButtonTests.cs
+++ b/tests/Avalonia.Controls.UnitTests/ButtonTests.cs
@@ -212,7 +212,7 @@ namespace Avalonia.Controls.UnitTests
var pt = new Point(150, 50);
renderer.Setup(r => r.HitTest(It.IsAny(), It.IsAny(), It.IsAny>()))
.Returns>((p, r, f) =>
- r.Bounds.Contains(p.Transform(r.RenderTransform!.Value.Invert())) ?
+ r.Bounds.Contains(p) ?
new Visual[] { r } : new Visual[0]);
using var _ = UnitTestApplication.Start(TestServices.StyledWindow);
@@ -238,6 +238,8 @@ namespace Avalonia.Controls.UnitTests
bool clicked = false;
+ Dispatcher.UIThread.RunJobs(null, TestContext.Current.CancellationToken);
+
target.Click += (s, e) => clicked = true;
RaisePointerEntered(target);
diff --git a/tests/Avalonia.Controls.UnitTests/CalendarDatePickerTests.cs b/tests/Avalonia.Controls.UnitTests/CalendarDatePickerTests.cs
index 9124c317b8..d97a9729fb 100644
--- a/tests/Avalonia.Controls.UnitTests/CalendarDatePickerTests.cs
+++ b/tests/Avalonia.Controls.UnitTests/CalendarDatePickerTests.cs
@@ -117,7 +117,7 @@ namespace Avalonia.Controls.UnitTests
{
return new FuncControlTemplate((control, scope) =>
{
- var textBox =
+ var textBox =
new TextBox
{
Name = "PART_TextBox"
@@ -130,7 +130,7 @@ namespace Avalonia.Controls.UnitTests
var calendar =
new Calendar
{
- Name = "PART_Calendar",
+ Name = "PART_Calendar",
[!Calendar.SelectedDateProperty] = control[!CalendarDatePicker.SelectedDateProperty],
[!Calendar.DisplayDateProperty] = control[!CalendarDatePicker.DisplayDateProperty],
[!Calendar.DisplayDateStartProperty] = control[!CalendarDatePicker.DisplayDateStartProperty],
@@ -179,5 +179,18 @@ namespace Avalonia.Controls.UnitTests
});
}
+ [Fact]
+ public void PlaceholderForeground_Can_Be_Set()
+ {
+ using (UnitTestApplication.Start(Services))
+ {
+ var control = CreateControl();
+ control.PlaceholderText = "Select date";
+ control.PlaceholderForeground = Media.Brushes.Purple;
+
+ Assert.Equal(Media.Brushes.Purple, control.PlaceholderForeground);
+ }
+ }
+
}
}
diff --git a/tests/Avalonia.Controls.UnitTests/NumericUpDownTests.cs b/tests/Avalonia.Controls.UnitTests/NumericUpDownTests.cs
index ab8766e216..868b33d7bd 100644
--- a/tests/Avalonia.Controls.UnitTests/NumericUpDownTests.cs
+++ b/tests/Avalonia.Controls.UnitTests/NumericUpDownTests.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@@ -58,7 +58,7 @@ namespace Avalonia.Controls.UnitTests
var spinner = GetSpinner(control);
spinner.RaiseEvent(new SpinEventArgs(Spinner.SpinEvent, direction));
-
+
Assert.Equal(control.Value, expected);
}
@@ -105,16 +105,16 @@ namespace Avalonia.Controls.UnitTests
// if min and max are not defined and value was null, 0 should be ne new value after spin
yield return [decimal.MinValue, decimal.MaxValue, null, SpinDirection.Decrease, 0m];
yield return [decimal.MinValue, decimal.MaxValue, null, SpinDirection.Increase, 0m];
-
+
// if no value was defined, but Min or Max are defined, use these as the new value
yield return [-400m, -200m, null, SpinDirection.Decrease, -200m];
yield return [200m, 400m, null, SpinDirection.Increase, 200m];
-
+
// Value should be clamped to Min / Max after spinning
yield return [200m, 400m, 5m, SpinDirection.Increase, 200m];
yield return [200m, 400m, 200m, SpinDirection.Decrease, 200m];
}
-
+
private void RunTest(Action test)
{
using (UnitTestApplication.Start(Services))
@@ -148,14 +148,14 @@ namespace Avalonia.Controls.UnitTests
.OfType()
.First();
}
-
+
private static ButtonSpinner GetSpinner(NumericUpDown control)
{
return control.GetTemplateChildren()
.OfType()
.First();
}
-
+
private static IControlTemplate CreateTemplate()
{
return new FuncControlTemplate((control, scope) =>
@@ -180,14 +180,27 @@ namespace Avalonia.Controls.UnitTests
{
// Set TabIndex on NumericUpDown
control.TabIndex = 5;
-
+
// The inner TextBox should inherit the same TabIndex
Assert.Equal(5, textbox.TabIndex);
-
+
// Change TabIndex and verify it gets synchronized
control.TabIndex = 10;
Assert.Equal(10, textbox.TabIndex);
});
}
+
+ [Fact]
+ public void PlaceholderForeground_Can_Be_Set()
+ {
+ using (UnitTestApplication.Start(Services))
+ {
+ var control = CreateControl();
+ control.PlaceholderText = "Enter value";
+ control.PlaceholderForeground = Media.Brushes.Red;
+
+ Assert.Equal(Media.Brushes.Red, control.PlaceholderForeground);
+ }
+ }
}
}
diff --git a/tests/Avalonia.Controls.UnitTests/Primitives/ToggleButtonTests.cs b/tests/Avalonia.Controls.UnitTests/Primitives/ToggleButtonTests.cs
index 9fc14f0b34..ac35c4b33f 100644
--- a/tests/Avalonia.Controls.UnitTests/Primitives/ToggleButtonTests.cs
+++ b/tests/Avalonia.Controls.UnitTests/Primitives/ToggleButtonTests.cs
@@ -2,8 +2,6 @@
using Avalonia.UnitTests;
using Xunit;
-#pragma warning disable CS0618 // Type or member is obsolete -- we're testing these members
-
namespace Avalonia.Controls.Primitives.UnitTests
{
public class ToggleButtonTests : ScopedTestBase
@@ -64,51 +62,47 @@ namespace Avalonia.Controls.Primitives.UnitTests
}
[Fact]
- public void ToggleButton_Events_Are_Raised_On_Is_Checked_Changes()
+ public void ToggleButton_IsCheckedChanged_Is_Raised_On_Is_Checked_Changes()
{
var threeStateButton = new ToggleButton();
+ Assert.False(threeStateButton.IsChecked);
- bool checkedRaised = false;
- threeStateButton.Checked += (_, __) => checkedRaised = true;
+ var changeCount = 0;
+ threeStateButton.IsCheckedChanged += (_, _) => ++changeCount;
threeStateButton.IsChecked = true;
- Assert.True(checkedRaised);
-
- bool uncheckedRaised = false;
- threeStateButton.Unchecked += (_, __) => uncheckedRaised = true;
+ Assert.Equal(1, changeCount);
+ Assert.True(threeStateButton.IsChecked);
threeStateButton.IsChecked = false;
- Assert.True(uncheckedRaised);
-
- bool indeterminateRaised = false;
- threeStateButton.Indeterminate += (_, __) => indeterminateRaised = true;
+ Assert.Equal(2, changeCount);
+ Assert.False(threeStateButton.IsChecked);
threeStateButton.IsChecked = null;
- Assert.True(indeterminateRaised);
+ Assert.Equal(3, changeCount);
+ Assert.Null(threeStateButton.IsChecked);
}
[Fact]
- public void ToggleButton_Events_Are_Raised_When_Toggling()
+ public void ToggleButton_IsCheckedChanged_Is_Raised_When_Toggling()
{
var threeStateButton = new TestToggleButton { IsThreeState = true };
+ Assert.False(threeStateButton.IsChecked);
- bool checkedRaised = false;
- threeStateButton.Checked += (_, __) => checkedRaised = true;
+ var changeCount = 0;
+ threeStateButton.IsCheckedChanged += (_, _) => ++changeCount;
threeStateButton.Toggle();
- Assert.True(checkedRaised);
-
- bool indeterminateRaised = false;
- threeStateButton.Indeterminate += (_, __) => indeterminateRaised = true;
+ Assert.Equal(1, changeCount);
+ Assert.True(threeStateButton.IsChecked);
threeStateButton.Toggle();
- Assert.True(indeterminateRaised);
-
- bool uncheckedRaised = false;
- threeStateButton.Unchecked += (_, __) => uncheckedRaised = true;
+ Assert.Equal(2, changeCount);
+ Assert.Null(threeStateButton.IsChecked);
threeStateButton.Toggle();
- Assert.True(uncheckedRaised);
+ Assert.Equal(3, changeCount);
+ Assert.False(threeStateButton.IsChecked);
}
private class Class1 : NotifyingBase
diff --git a/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs b/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs
index 3e830859a4..31b8fe45e8 100644
--- a/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs
+++ b/tests/Avalonia.Controls.UnitTests/TextBoxTests.cs
@@ -42,25 +42,25 @@ namespace Avalonia.Controls.UnitTests
Template = CreateTemplate(),
Text = "5678"
};
-
+
var sp = new StackPanel();
sp.Children.Add(target1);
sp.Children.Add(target2);
target1.ApplyTemplate();
target2.ApplyTemplate();
-
+
var root = new TestRoot() { Child = sp };
target1.SelectionStart = 0;
target1.SelectionEnd = 3;
-
+
target1.Focus();
Assert.False(target2.IsFocused);
Assert.True(target1.IsFocused);
target2.Focus();
-
+
Assert.Equal("123", target1.SelectedText);
}
}
@@ -106,7 +106,7 @@ namespace Avalonia.Controls.UnitTests
}
}
};
-
+
target1.ApplyTemplate();
@@ -165,16 +165,16 @@ namespace Avalonia.Controls.UnitTests
};
target.ApplyTemplate();
-
+
target.Measure(Size.Infinity);
-
+
target.CaretIndex = 3;
RaiseKeyEvent(target, Key.Right, 0);
Assert.Equal(4, target.CaretIndex);
}
}
-
+
[Fact]
public void Control_Backspace_Should_Set_Caret_Position_To_The_Start_Of_The_Deletion()
{
@@ -194,11 +194,11 @@ namespace Avalonia.Controls.UnitTests
// (First Second |Third)
RaiseKeyEvent(target, Key.Back, KeyModifiers.Control);
// (First |Third)
-
+
Assert.Equal(6, target.CaretIndex);
}
}
-
+
[Fact]
public void Control_Backspace_Should_Remove_The_Double_Whitespace_If_Caret_Index_Was_At_The_End_Of_A_Word()
{
@@ -213,7 +213,7 @@ namespace Avalonia.Controls.UnitTests
};
target.ApplyTemplate();
-
+
// (First Second| Third)
RaiseKeyEvent(target, Key.Back, KeyModifiers.Control);
// (First| Third)
@@ -236,11 +236,11 @@ namespace Avalonia.Controls.UnitTests
};
target.ApplyTemplate();
-
+
// (First Second| Third)
RaiseKeyEvent(target, Key.Back, KeyModifiers.Control);
// (First| Third)
-
+
target.Undo();
// (First Second| Third)
@@ -258,7 +258,7 @@ namespace Avalonia.Controls.UnitTests
Template = CreateTemplate(),
Text = "1234"
};
-
+
target.ApplyTemplate();
RaiseKeyEvent(target, Key.A, KeyModifiers.Control);
@@ -314,7 +314,7 @@ namespace Avalonia.Controls.UnitTests
SelectionStart = 5,
SelectionEnd = 5
};
-
+
textBox.ApplyTemplate();
// (First| Second Third Fourth)
@@ -356,7 +356,7 @@ namespace Avalonia.Controls.UnitTests
Text = "First Second Third Fourth",
CaretIndex = 19,
};
-
+
textBox.ApplyTemplate();
// (First Second Third |Fourth)
@@ -400,7 +400,7 @@ namespace Avalonia.Controls.UnitTests
textBox.SelectionStart = 2;
textBox.SelectionEnd = 2;
-
+
Assert.Equal(2, textBox.CaretIndex);
}
}
@@ -443,7 +443,7 @@ namespace Avalonia.Controls.UnitTests
AcceptsReturn = false,
Text = "1234"
};
-
+
target.ApplyTemplate();
RaiseKeyEvent(target, Key.Enter, 0);
@@ -462,7 +462,7 @@ namespace Avalonia.Controls.UnitTests
Template = CreateTemplate(),
AcceptsReturn = true
};
-
+
target.ApplyTemplate();
RaiseKeyEvent(target, Key.Enter, 0);
@@ -482,7 +482,7 @@ namespace Avalonia.Controls.UnitTests
AcceptsReturn = true,
NewLine = "Test"
};
-
+
target.ApplyTemplate();
RaiseKeyEvent(target, Key.Enter, 0);
@@ -523,7 +523,7 @@ namespace Avalonia.Controls.UnitTests
Template = CreateTemplate(),
Text = "0123456789"
};
-
+
target.ApplyTemplate();
target.SelectionStart = 0;
@@ -547,7 +547,7 @@ namespace Avalonia.Controls.UnitTests
Template = CreateTemplate(),
Text = "0123456789"
};
-
+
target.ApplyTemplate();
target.SelectionStart = 8;
@@ -592,7 +592,7 @@ namespace Avalonia.Controls.UnitTests
Template = CreateTemplate(),
Text = "0123456789"
};
-
+
target.ApplyTemplate();
Assert.True(target.SelectedText == "");
@@ -614,7 +614,7 @@ namespace Avalonia.Controls.UnitTests
Template = CreateTemplate(),
Text = "0123"
};
-
+
target.ApplyTemplate();
target.SelectedText = "AA";
@@ -679,7 +679,7 @@ namespace Avalonia.Controls.UnitTests
Assert.True(true);
}
}
-
+
[Theory]
[InlineData(Key.Up)]
[InlineData(Key.Down)]
@@ -725,7 +725,7 @@ namespace Avalonia.Controls.UnitTests
target1.ApplyTemplate();
target2.ApplyTemplate();
-
+
var root = new TestRoot { Child = sp };
var gfcount = 0;
@@ -746,7 +746,7 @@ namespace Avalonia.Controls.UnitTests
Assert.Equal(1, lfcount);
}
}
-
+
[Fact]
public void TextBox_CaretIndex_Persists_When_Focus_Lost()
{
@@ -768,7 +768,7 @@ namespace Avalonia.Controls.UnitTests
target1.ApplyTemplate();
target2.ApplyTemplate();
-
+
var root = new TestRoot { Child = sp };
target2.Focus();
@@ -777,11 +777,11 @@ namespace Avalonia.Controls.UnitTests
Assert.True(target2.IsFocused);
target1.Focus();
-
+
Assert.Equal(2, target2.CaretIndex);
}
}
-
+
[Fact]
public void TextBox_Reveal_Password_Reset_When_Lost_Focus()
{
@@ -804,14 +804,14 @@ namespace Avalonia.Controls.UnitTests
target1.ApplyTemplate();
target2.ApplyTemplate();
-
+
var root = new TestRoot { Child = sp };
target1.Focus();
target1.RevealPassword = true;
-
+
target2.Focus();
-
+
Assert.False(target1.RevealPassword);
}
}
@@ -833,7 +833,7 @@ namespace Avalonia.Controls.UnitTests
Assert.Null(target.Text);
}
}
-
+
[Theory]
[InlineData("abc", "d", 3, 0, 0, false, "abc")]
[InlineData("abc", "dd", 4, 3, 3, false, "abcd")]
@@ -870,7 +870,7 @@ namespace Avalonia.Controls.UnitTests
topLevel.LayoutManager.ExecuteInitialLayoutPass();
target.Measure(Size.Infinity);
-
+
if (fromClipboard)
{
await topLevel.Clipboard!.SetTextAsync(textInput);
@@ -882,7 +882,7 @@ namespace Avalonia.Controls.UnitTests
{
RaiseTextEvent(target, textInput);
}
-
+
Assert.Equal(expected, target.Text);
}
}
@@ -1246,7 +1246,7 @@ namespace Avalonia.Controls.UnitTests
Assert.Equal((minLines * target.LineHeight) + textPresenterMargin.Top + textPresenterMargin.Bottom, scrollViewer.MinHeight);
}
}
-
+
[Theory]
[InlineData(null, 1)]
[InlineData("", 1)]
@@ -1285,7 +1285,7 @@ namespace Avalonia.Controls.UnitTests
var b = new TextBox();
Assert.Equal(-1, b.GetLineCount());
}
-
+
[Fact]
public void LineCount_Is_Correct_After_Text_Change()
{
@@ -1309,7 +1309,7 @@ namespace Avalonia.Controls.UnitTests
target.ApplyTemplate();
target.Measure(Size.Infinity);
-
+
Assert.Equal(1, target.GetLineCount());
target.Text = "Hello\r\nWorld";
@@ -1505,7 +1505,7 @@ namespace Avalonia.Controls.UnitTests
Assert.Equal("ABCDEF123", tb.Text);
// Undo will take us back one step
- tb.Undo();
+ tb.Undo();
Assert.Equal("ABCDEF", tb.Text);
// Undo again
@@ -2050,7 +2050,7 @@ namespace Avalonia.Controls.UnitTests
Assert.NotNull(client);
Assert.Equal(string.Empty, client.SurroundingText);
}
-
+
[Fact]
public void Backspace_Should_Delete_Last_Character_In_Line_And_Keep_Caret_On_Same_Line()
{
@@ -2122,7 +2122,7 @@ namespace Avalonia.Controls.UnitTests
Assert.True(target1.IsFocused);
- Assert.Equal("1234", target1.SelectedText);
+ Assert.Equal("1234", target1.SelectedText);
target2.Focus();
@@ -2149,6 +2149,61 @@ namespace Avalonia.Controls.UnitTests
Assert.Equal("FirstSecond", target.Text);
}
+ [Fact]
+ public void PlaceholderForeground_Can_Be_Set()
+ {
+ using (UnitTestApplication.Start(Services))
+ {
+ var target = new TextBox
+ {
+ Template = CreateTemplate(),
+ PlaceholderText = "Enter text",
+ PlaceholderForeground = Brushes.Red
+ };
+
+ target.ApplyTemplate();
+
+ Assert.Equal(Brushes.Red, target.PlaceholderForeground);
+ }
+ }
+
+ [Fact]
+ public void PlaceholderForeground_Defaults_To_Null()
+ {
+ using (UnitTestApplication.Start(Services))
+ {
+ var target = new TextBox
+ {
+ Template = CreateTemplate(),
+ PlaceholderText = "Enter text"
+ };
+
+ target.ApplyTemplate();
+
+ Assert.Null(target.PlaceholderForeground);
+ }
+ }
+
+ [Fact]
+ public void PlaceholderForeground_Can_Be_Set_To_Null()
+ {
+ using (UnitTestApplication.Start(Services))
+ {
+ var target = new TextBox
+ {
+ Template = CreateTemplate(),
+ PlaceholderText = "Enter text",
+ PlaceholderForeground = Brushes.Blue
+ };
+
+ target.ApplyTemplate();
+
+ target.PlaceholderForeground = null;
+
+ Assert.Null(target.PlaceholderForeground);
+ }
+ }
+
private static TestServices FocusServices => TestServices.MockThreadingInterface.With(
keyboardDevice: () => new KeyboardDevice(),
keyboardNavigation: () => new KeyboardNavigationHandler(),
@@ -2160,7 +2215,7 @@ namespace Avalonia.Controls.UnitTests
private static TestServices Services => TestServices.MockThreadingInterface.With(
standardCursorFactory: Mock.Of(),
renderInterface: new HeadlessPlatformRenderInterface(),
- textShaperImpl: new HarfBuzzTextShaper(),
+ textShaperImpl: new HarfBuzzTextShaper(),
fontManagerImpl: new TestFontManager(),
assetLoader: new StandardAssetLoader());
diff --git a/tests/Avalonia.Generators.Tests/Views/AttachedProps.xml b/tests/Avalonia.Generators.Tests/Views/AttachedProps.xml
index 209b7ca9f1..ccd199040e 100644
--- a/tests/Avalonia.Generators.Tests/Views/AttachedProps.xml
+++ b/tests/Avalonia.Generators.Tests/Views/AttachedProps.xml
@@ -3,6 +3,6 @@
x:Class="Sample.App.AttachedProps"
Design.Width="300">
+ Placeholder="Username input"
+ UseFloatingPlaceholder="True" />
diff --git a/tests/Avalonia.Generators.Tests/Views/ControlWithoutWindow.xml b/tests/Avalonia.Generators.Tests/Views/ControlWithoutWindow.xml
index 485fe93e4c..54e7f156e1 100644
--- a/tests/Avalonia.Generators.Tests/Views/ControlWithoutWindow.xml
+++ b/tests/Avalonia.Generators.Tests/Views/ControlWithoutWindow.xml
@@ -3,6 +3,6 @@
x:Class="Sample.App.ControlWithoutWindow"
Design.Width="300">
+ Placeholder="Username input"
+ UseFloatingPlaceholder="True" />
diff --git a/tests/Avalonia.Generators.Tests/Views/DataTemplates.xml b/tests/Avalonia.Generators.Tests/Views/DataTemplates.xml
index f7e15644aa..c4d587baf2 100644
--- a/tests/Avalonia.Generators.Tests/Views/DataTemplates.xml
+++ b/tests/Avalonia.Generators.Tests/Views/DataTemplates.xml
@@ -3,14 +3,14 @@
x:Class="Sample.App.DataTemplates">
+ Placeholder="Username input"
+ UseFloatingPlaceholder="True" />
+ Placeholder="Templated input"
+ UseFloatingPlaceholder="True" />
diff --git a/tests/Avalonia.Generators.Tests/Views/FieldModifier.xml b/tests/Avalonia.Generators.Tests/Views/FieldModifier.xml
index 3ee5e51466..65fafb414e 100644
--- a/tests/Avalonia.Generators.Tests/Views/FieldModifier.xml
+++ b/tests/Avalonia.Generators.Tests/Views/FieldModifier.xml
@@ -4,20 +4,20 @@
+ Placeholder="Username input"
+ UseFloatingPlaceholder="True" />
+ Placeholder="Username input"
+ UseFloatingPlaceholder="True" />
+ Placeholder="Password input"
+ UseFloatingPlaceholder="True" />
+ Placeholder="Password input"
+ UseFloatingPlaceholder="True" />
diff --git a/tests/Avalonia.Generators.Tests/Views/NamedControl.xml b/tests/Avalonia.Generators.Tests/Views/NamedControl.xml
index 0a3c3d3111..44aa833f3b 100644
--- a/tests/Avalonia.Generators.Tests/Views/NamedControl.xml
+++ b/tests/Avalonia.Generators.Tests/Views/NamedControl.xml
@@ -3,6 +3,6 @@
x:Class="Sample.App.NamedControl">
+ Placeholder="Username input"
+ UseFloatingPlaceholder="True" />
diff --git a/tests/Avalonia.Generators.Tests/Views/NamedControls.xml b/tests/Avalonia.Generators.Tests/Views/NamedControls.xml
index 6083ec794c..fb8d7c4c95 100644
--- a/tests/Avalonia.Generators.Tests/Views/NamedControls.xml
+++ b/tests/Avalonia.Generators.Tests/Views/NamedControls.xml
@@ -3,11 +3,11 @@
x:Class="Sample.App.NamedControls">
+ Placeholder="Username input"
+ UseFloatingPlaceholder="True" />
+ Placeholder="Password input"
+ UseFloatingPlaceholder="True" />
diff --git a/tests/Avalonia.Generators.Tests/Views/NoNamedControls.xml b/tests/Avalonia.Generators.Tests/Views/NoNamedControls.xml
index 751d1574c8..3e9ba157fb 100644
--- a/tests/Avalonia.Generators.Tests/Views/NoNamedControls.xml
+++ b/tests/Avalonia.Generators.Tests/Views/NoNamedControls.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/tests/Avalonia.Generators.Tests/Views/SignUpView.xml b/tests/Avalonia.Generators.Tests/Views/SignUpView.xml
index a482e1fc5e..128fd0e260 100644
--- a/tests/Avalonia.Generators.Tests/Views/SignUpView.xml
+++ b/tests/Avalonia.Generators.Tests/Views/SignUpView.xml
@@ -5,15 +5,15 @@
+ Placeholder="Please, enter user name..."
+ UseFloatingPlaceholder="True" />
+ Placeholder="Username input"
+ UseFloatingPlaceholder="True" />
diff --git a/tests/Avalonia.Generators.Tests/Views/xNamedControls.xml b/tests/Avalonia.Generators.Tests/Views/xNamedControls.xml
index 00eec9b969..bd9bcccdec 100644
--- a/tests/Avalonia.Generators.Tests/Views/xNamedControls.xml
+++ b/tests/Avalonia.Generators.Tests/Views/xNamedControls.xml
@@ -3,11 +3,11 @@
x:Class="Sample.App.xNamedControls">
+ Placeholder="Username input"
+ UseFloatingPlaceholder="True" />
+ Placeholder="Password input"
+ UseFloatingPlaceholder="True" />
diff --git a/tests/Avalonia.Headless.UnitTests/AsyncSetupTests.cs b/tests/Avalonia.Headless.UnitTests/AsyncSetupTests.cs
new file mode 100644
index 0000000000..3f23d661ed
--- /dev/null
+++ b/tests/Avalonia.Headless.UnitTests/AsyncSetupTests.cs
@@ -0,0 +1,32 @@
+#if NUNIT
+
+using System.Threading.Tasks;
+
+namespace Avalonia.Headless.UnitTests;
+
+public class AsyncSetupTests
+{
+ private static int s_instanceCount;
+
+ [SetUp]
+ public async Task SetUp()
+ {
+ await Task.Delay(100);
+ ++s_instanceCount;
+ }
+
+ [AvaloniaTest, TestCase(1), TestCase(2)]
+ public void Async_Setup_TearDown_Should_Work(int index)
+ {
+ AssertHelper.Equal(1, s_instanceCount);
+ }
+
+ [TearDown]
+ public async Task TearDown()
+ {
+ await Task.Delay(100);
+ --s_instanceCount;
+ }
+}
+
+#endif
diff --git a/tests/Avalonia.Headless.UnitTests/SetupTests.cs b/tests/Avalonia.Headless.UnitTests/SetupTests.cs
new file mode 100644
index 0000000000..77f8d25842
--- /dev/null
+++ b/tests/Avalonia.Headless.UnitTests/SetupTests.cs
@@ -0,0 +1,45 @@
+using System;
+
+namespace Avalonia.Headless.UnitTests;
+
+public class SetupTests
+#if XUNIT
+ : IDisposable
+#endif
+{
+ private static int s_instanceCount;
+
+#if NUNIT
+ [SetUp]
+ public void SetUp()
+#elif XUNIT
+ public SetupTests()
+#endif
+ {
+ ++s_instanceCount;
+ }
+
+#if NUNIT
+ [AvaloniaTest, TestCase(1), TestCase(2)]
+#elif XUNIT
+ [AvaloniaTheory, InlineData(1), InlineData(2)]
+ [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage(
+ "Usage",
+ "xUnit1026:Theory methods should use all of their parameters",
+ Justification = "Used to run the test several times")]
+#endif
+ public void Setup_TearDown_Should_Work(int index)
+ {
+ AssertHelper.Equal(1, s_instanceCount);
+ }
+
+#if NUNIT
+ [TearDown]
+ public void TearDown()
+#elif XUNIT
+ public void Dispose()
+#endif
+ {
+ --s_instanceCount;
+ }
+}
diff --git a/tests/Avalonia.LeakTests/BindingExpressionExtensions.cs b/tests/Avalonia.LeakTests/BindingExpressionExtensions.cs
new file mode 100644
index 0000000000..98ec67e31b
--- /dev/null
+++ b/tests/Avalonia.LeakTests/BindingExpressionExtensions.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Linq.Expressions;
+using Avalonia.Data;
+using Avalonia.Data.Converters;
+using Avalonia.Data.Core;
+using Avalonia.Data.Core.ExpressionNodes;
+using Avalonia.Data.Core.Parsers;
+using Avalonia.Utilities;
+
+namespace Avalonia.LeakTests;
+
+///
+/// Test extensions for creating BindingExpression instances from lambda expressions.
+///
+internal static class BindingExpressionExtensions
+{
+ [RequiresUnreferencedCode(TrimmingMessages.ExpressionNodeRequiresUnreferencedCodeMessage)]
+ [RequiresDynamicCode(TrimmingMessages.ExpressionNodeRequiresDynamicCodeMessage)]
+ public static BindingExpression CreateBindingExpression(
+ TIn source,
+ Expression> expression,
+ IValueConverter? converter = null,
+ CultureInfo? converterCulture = null,
+ object? converterParameter = null,
+ bool enableDataValidation = false,
+ Optional fallbackValue = default,
+ BindingMode mode = BindingMode.OneWay,
+ BindingPriority priority = BindingPriority.LocalValue,
+ object? targetNullValue = null,
+ bool allowReflection = true)
+ where TIn : class?
+ {
+ var path = BindingExpressionVisitor.BuildPath(expression);
+ var nodes = new List();
+ path.BuildExpression(nodes, out var _);
+ var fallback = fallbackValue.HasValue ? fallbackValue.Value : AvaloniaProperty.UnsetValue;
+
+ return new BindingExpression(
+ source,
+ nodes,
+ fallback,
+ converter: converter,
+ converterCulture: converterCulture,
+ converterParameter: converterParameter,
+ enableDataValidation: enableDataValidation,
+ mode: mode,
+ priority: priority,
+ targetNullValue: targetNullValue,
+ targetTypeConverter: allowReflection ?
+ TargetTypeConverter.GetReflectionConverter() :
+ TargetTypeConverter.GetDefaultConverter());
+ }
+}
diff --git a/tests/Avalonia.LeakTests/BindingExpressionTests.cs b/tests/Avalonia.LeakTests/BindingExpressionTests.cs
index 5a6eddc869..c5b38e209f 100644
--- a/tests/Avalonia.LeakTests/BindingExpressionTests.cs
+++ b/tests/Avalonia.LeakTests/BindingExpressionTests.cs
@@ -1,6 +1,10 @@
-using System;
+using System;
using System.Collections.Generic;
+using System.Globalization;
+using System.Linq.Expressions;
using Avalonia.Collections;
+using Avalonia.Data;
+using Avalonia.Data.Converters;
using Avalonia.Data.Core;
using Avalonia.UnitTests;
using Xunit;
@@ -16,7 +20,7 @@ namespace Avalonia.LeakTests
{
var list = new AvaloniaList { "foo", "bar" };
var source = new { Foo = list };
- var target = BindingExpression.Create(source, o => o.Foo);
+ var target = CreateBindingExpression(source, o => o.Foo);
target.ToObservable().Subscribe(_ => { });
return new WeakReference(list);
@@ -37,7 +41,7 @@ namespace Avalonia.LeakTests
{
var list = new AvaloniaList { "foo", "bar" };
var source = new { Foo = list };
- var target = BindingExpression.Create(source, o => o.Foo, enableDataValidation: true);
+ var target = CreateBindingExpression(source, o => o.Foo, enableDataValidation: true);
target.ToObservable().Subscribe(_ => { });
return new WeakReference(list);
@@ -58,7 +62,7 @@ namespace Avalonia.LeakTests
{
var indexer = new NonIntegerIndexer();
var source = new { Foo = indexer };
- var target = BindingExpression.Create(source, o => o.Foo);
+ var target = CreateBindingExpression(source, o => o.Foo);
target.ToObservable().Subscribe(_ => { });
return new WeakReference(indexer);
@@ -79,7 +83,7 @@ namespace Avalonia.LeakTests
{
var methodBound = new MethodBound();
var source = new { Foo = methodBound };
- var target = BindingExpression.Create(source, o => (Action)o.Foo.A);
+ var target = CreateBindingExpression(source, o => (Action)o.Foo.A);
target.ToObservable().Subscribe(_ => { });
return new WeakReference(methodBound);
}
@@ -92,6 +96,34 @@ namespace Avalonia.LeakTests
Assert.False(weakSource.IsAlive);
}
+ private static BindingExpression CreateBindingExpression(
+ TIn source,
+ Expression> expression,
+ IValueConverter? converter = null,
+ CultureInfo? converterCulture = null,
+ object? converterParameter = null,
+ bool enableDataValidation = false,
+ Optional fallbackValue = default,
+ BindingMode mode = BindingMode.OneWay,
+ BindingPriority priority = BindingPriority.LocalValue,
+ object? targetNullValue = null,
+ bool allowReflection = true)
+ where TIn : class?
+ {
+ return BindingExpressionExtensions.CreateBindingExpression(
+ source,
+ expression,
+ converter,
+ converterCulture,
+ converterParameter,
+ enableDataValidation,
+ fallbackValue,
+ mode,
+ priority,
+ targetNullValue,
+ allowReflection);
+ }
+
private class MethodBound
{
public void A() { }
diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs
index 0cb587f849..03871d2c84 100644
--- a/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs
+++ b/tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests.cs
@@ -71,14 +71,14 @@ namespace Avalonia.Markup.Xaml.UnitTests.Data
-
+
-
+
diff --git a/tests/Avalonia.RenderTests/Controls/TextBoxTests.cs b/tests/Avalonia.RenderTests/Controls/TextBoxTests.cs
new file mode 100644
index 0000000000..8047f2d103
--- /dev/null
+++ b/tests/Avalonia.RenderTests/Controls/TextBoxTests.cs
@@ -0,0 +1,135 @@
+using System.Threading.Tasks;
+using Avalonia.Controls;
+using Avalonia.Controls.Presenters;
+using Avalonia.Controls.Templates;
+using Avalonia.Layout;
+using Avalonia.Media;
+using Xunit;
+
+namespace Avalonia.Skia.RenderTests
+{
+ public class TextBoxTests : TestBase
+ {
+ public TextBoxTests()
+ : base(@"Controls\TextBox")
+ {
+ }
+
+ private static IControlTemplate CreateTextBoxTemplate()
+ {
+ return new FuncControlTemplate((textBox, scope) =>
+ {
+ var border = new Border
+ {
+ Background = textBox.Background,
+ BorderBrush = Brushes.Gray,
+ BorderThickness = new Thickness(1),
+ Padding = new Thickness(4),
+ };
+
+ var panel = new Panel();
+
+ // Use Antialias mode
+ TextOptions.SetTextRenderingMode(panel, TextRenderingMode.Antialias);
+
+ var placeholder = new TextBlock
+ {
+ Name = "PART_Placeholder",
+ [!TextBlock.TextProperty] = textBox[!TextBox.PlaceholderTextProperty],
+ [!TextBlock.ForegroundProperty] = textBox[!TextBox.PlaceholderForegroundProperty],
+ FontFamily = textBox.FontFamily,
+ FontSize = textBox.FontSize,
+ VerticalAlignment = VerticalAlignment.Center,
+ Opacity = 0.5,
+ }.RegisterInNameScope(scope);
+
+ var presenter = new TextPresenter
+ {
+ Name = "PART_TextPresenter",
+ [!TextPresenter.TextProperty] = textBox[!TextBox.TextProperty],
+ [!TextPresenter.CaretIndexProperty] = textBox[!TextBox.CaretIndexProperty],
+ FontFamily = textBox.FontFamily,
+ FontSize = textBox.FontSize,
+ }.RegisterInNameScope(scope);
+
+ panel.Children.Add(placeholder);
+ panel.Children.Add(presenter);
+ border.Child = panel;
+
+ return border;
+ });
+ }
+
+ [Fact]
+ public async Task Placeholder_With_Red_Foreground()
+ {
+ var target = new Border
+ {
+ Padding = new Thickness(8),
+ Width = 200,
+ Height = 50,
+ Background = Brushes.White,
+ Child = new TextBox
+ {
+ Template = CreateTextBoxTemplate(),
+ FontFamily = TestFontFamily,
+ FontSize = 12,
+ Background = Brushes.White,
+ PlaceholderText = "Red placeholder",
+ PlaceholderForeground = Brushes.Red,
+ }
+ };
+
+ await RenderToFile(target);
+ CompareImages();
+ }
+
+ [Fact]
+ public async Task Placeholder_With_Blue_Foreground()
+ {
+ var target = new Border
+ {
+ Padding = new Thickness(8),
+ Width = 200,
+ Height = 50,
+ Background = Brushes.White,
+ Child = new TextBox
+ {
+ Template = CreateTextBoxTemplate(),
+ FontFamily = TestFontFamily,
+ FontSize = 12,
+ Background = Brushes.White,
+ PlaceholderText = "Blue placeholder",
+ PlaceholderForeground = Brushes.Blue,
+ }
+ };
+
+ await RenderToFile(target);
+ CompareImages();
+ }
+
+ [Fact]
+ public async Task Placeholder_With_Default_Foreground()
+ {
+ var target = new Border
+ {
+ Padding = new Thickness(8),
+ Width = 200,
+ Height = 50,
+ Background = Brushes.White,
+ Child = new TextBox
+ {
+ Template = CreateTextBoxTemplate(),
+ FontFamily = TestFontFamily,
+ FontSize = 12,
+ Background = Brushes.White,
+ PlaceholderText = "Default placeholder",
+ PlaceholderForeground = Brushes.Gray,
+ }
+ };
+
+ await RenderToFile(target);
+ CompareImages();
+ }
+ }
+}
diff --git a/tests/Avalonia.RenderTests/OpacityMaskTests.cs b/tests/Avalonia.RenderTests/OpacityMaskTests.cs
index a9348e3512..ea639333f9 100644
--- a/tests/Avalonia.RenderTests/OpacityMaskTests.cs
+++ b/tests/Avalonia.RenderTests/OpacityMaskTests.cs
@@ -33,6 +33,7 @@ namespace Avalonia.Skia.RenderTests
},
Width = 76,
Height = 76,
+ Background = Brushes.Transparent,
Children =
{
new Path
@@ -70,6 +71,7 @@ namespace Avalonia.Skia.RenderTests
RenderTransform = new RotateTransform(90),
Width = 76,
Height = 76,
+ Background = Brushes.Transparent,
Children =
{
new Path
diff --git a/tests/Avalonia.UnitTests/CompositorTestServices.cs b/tests/Avalonia.UnitTests/CompositorTestServices.cs
index 96b3248ed1..e227b9622b 100644
--- a/tests/Avalonia.UnitTests/CompositorTestServices.cs
+++ b/tests/Avalonia.UnitTests/CompositorTestServices.cs
@@ -88,10 +88,11 @@ public class CompositorTestServices : IDisposable
Events.Rects.Clear();
}
- public void AssertRenderedVisuals(int renderVisuals)
+ public void AssertRenderedVisuals(int visitedVisuals, int renderVisuals)
{
RunJobs();
- Assert.Equal(Events.RenderedVisuals, renderVisuals);
+ Assert.Equal(visitedVisuals, Events.VisitedVisuals);
+ Assert.Equal(renderVisuals, Events.RenderedVisuals);
Events.Rects.Clear();
}
@@ -116,22 +117,20 @@ public class CompositorTestServices : IDisposable
{
public List Rects = new();
- public int RenderedVisuals { get; private set; }
+ public int RenderedVisuals { get; set; }
+ public int VisitedVisuals { get; set; }
- public void IncrementRenderedVisuals()
- {
- RenderedVisuals++;
- }
- public void RectInvalidated(Rect rc)
+ public void RectInvalidated(LtrbRect rc)
{
- Rects.Add(rc);
+ Rects.Add(rc.ToRect());
}
public void Reset()
{
Rects.Clear();
RenderedVisuals = 0;
+ VisitedVisuals = 0;
}
}
diff --git a/tests/TestFiles/Skia/Composition/DirectFb/Should_Only_Update_Clipped_Rects_When_Retained_Fb_Is_Advertised_advertized-True_updated.expected.png b/tests/TestFiles/Skia/Composition/DirectFb/Should_Only_Update_Clipped_Rects_When_Retained_Fb_Is_Advertised_advertized-True_updated.expected.png
index 96fbb171c9..9f616b4724 100644
Binary files a/tests/TestFiles/Skia/Composition/DirectFb/Should_Only_Update_Clipped_Rects_When_Retained_Fb_Is_Advertised_advertized-True_updated.expected.png and b/tests/TestFiles/Skia/Composition/DirectFb/Should_Only_Update_Clipped_Rects_When_Retained_Fb_Is_Advertised_advertized-True_updated.expected.png differ
diff --git a/tests/TestFiles/Skia/Controls/TextBox/Placeholder_With_Blue_Foreground.expected.png b/tests/TestFiles/Skia/Controls/TextBox/Placeholder_With_Blue_Foreground.expected.png
new file mode 100644
index 0000000000..d2262f7e52
Binary files /dev/null and b/tests/TestFiles/Skia/Controls/TextBox/Placeholder_With_Blue_Foreground.expected.png differ
diff --git a/tests/TestFiles/Skia/Controls/TextBox/Placeholder_With_Default_Foreground.expected.png b/tests/TestFiles/Skia/Controls/TextBox/Placeholder_With_Default_Foreground.expected.png
new file mode 100644
index 0000000000..770ff257b4
Binary files /dev/null and b/tests/TestFiles/Skia/Controls/TextBox/Placeholder_With_Default_Foreground.expected.png differ
diff --git a/tests/TestFiles/Skia/Controls/TextBox/Placeholder_With_Red_Foreground.expected.png b/tests/TestFiles/Skia/Controls/TextBox/Placeholder_With_Red_Foreground.expected.png
new file mode 100644
index 0000000000..4d2bc5d78b
Binary files /dev/null and b/tests/TestFiles/Skia/Controls/TextBox/Placeholder_With_Red_Foreground.expected.png differ