diff --git a/samples/ControlCatalog.NetCore/Program.cs b/samples/ControlCatalog.NetCore/Program.cs index d98a068d84..b1bacc6483 100644 --- a/samples/ControlCatalog.NetCore/Program.cs +++ b/samples/ControlCatalog.NetCore/Program.cs @@ -115,10 +115,6 @@ namespace ControlCatalog.NetCore UseDBusMenu = true, EnableIme = true }) - .With(new Win32PlatformOptions - { - EnableMultitouch = true - }) .UseSkia() .AfterSetup(builder => { diff --git a/src/Android/Avalonia.Android/Platform/SkiaPlatform/InvalidationAwareSurfaceView.cs b/src/Android/Avalonia.Android/Platform/SkiaPlatform/InvalidationAwareSurfaceView.cs index 5343b57251..33501ece06 100644 --- a/src/Android/Avalonia.Android/Platform/SkiaPlatform/InvalidationAwareSurfaceView.cs +++ b/src/Android/Avalonia.Android/Platform/SkiaPlatform/InvalidationAwareSurfaceView.cs @@ -47,18 +47,6 @@ namespace Avalonia.Android } } - [Obsolete("deprecated")] - public override void Invalidate(global::Android.Graphics.Rect dirty) - { - Invalidate(); - } - - [Obsolete("deprecated")] - public override void Invalidate(int l, int t, int r, int b) - { - Invalidate(); - } - public void SurfaceChanged(ISurfaceHolder holder, Format format, int width, int height) { Log.Info("AVALONIA", "Surface Changed"); diff --git a/src/Avalonia.Controls.DataGrid/Collections/DataGridSortDescription.cs b/src/Avalonia.Controls.DataGrid/Collections/DataGridSortDescription.cs index ff222658db..ab73ed73c7 100644 --- a/src/Avalonia.Controls.DataGrid/Collections/DataGridSortDescription.cs +++ b/src/Avalonia.Controls.DataGrid/Collections/DataGridSortDescription.cs @@ -12,9 +12,6 @@ namespace Avalonia.Collections { public virtual string PropertyPath => null; - [Obsolete("Use Direction property to read or override sorting direction.")] - public virtual bool Descending => Direction == ListSortDirection.Descending; - public virtual ListSortDirection Direction => ListSortDirection.Ascending; public bool HasPropertyPath => !String.IsNullOrEmpty(PropertyPath); public abstract IComparer Comparer { get; } @@ -254,13 +251,6 @@ namespace Avalonia.Collections return new DataGridPathSortDescription(propertyPath, direction, null, culture); } - - [Obsolete("Use overload taking a ListSortDirection.")] - public static DataGridSortDescription FromPath(string propertyPath, bool descending, CultureInfo culture = null) - { - return new DataGridPathSortDescription(propertyPath, descending ? ListSortDirection.Descending : ListSortDirection.Ascending, null, culture); - } - public static DataGridSortDescription FromPath(string propertyPath, ListSortDirection direction, IComparer comparer) { return new DataGridPathSortDescription(propertyPath, direction, comparer, null); diff --git a/src/Avalonia.Dialogs/ManagedFileChooser.cs b/src/Avalonia.Dialogs/ManagedFileChooser.cs index 199a4d6620..ee2ab42d6f 100644 --- a/src/Avalonia.Dialogs/ManagedFileChooser.cs +++ b/src/Avalonia.Dialogs/ManagedFileChooser.cs @@ -36,9 +36,8 @@ namespace Avalonia.Dialogs if (_quickLinksRoot != null) { var isQuickLink = _quickLinksRoot.IsLogicalAncestorOf(e.Source as Control); -#pragma warning disable CS0618 // Type or member is obsolete + if (e.ClickCount == 2 || isQuickLink) -#pragma warning restore CS0618 // Type or member is obsolete { if (model.ItemType == ManagedFileChooserItemType.File) { diff --git a/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs b/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs index a0e7fd7dcf..168b9835dd 100644 --- a/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs +++ b/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs @@ -158,9 +158,6 @@ namespace Avalonia.Markup.Xaml.XamlIl.Runtime string.Join(",", lst.Select(e => $"`{e.ClrAssemblyName}:{e.ClrNamespace}.{name}`"))); } } - - [Obsolete("Don't use", true)] - public static readonly IServiceProvider RootServiceProviderV1 = new RootServiceProvider(null); // Don't emit debug symbols for this code so debugger will be forced to step into XAML instead #line hidden diff --git a/src/Skia/Avalonia.Skia/Helpers/DrawingContextHelper.cs b/src/Skia/Avalonia.Skia/Helpers/DrawingContextHelper.cs index a078c364a2..ec33770356 100644 --- a/src/Skia/Avalonia.Skia/Helpers/DrawingContextHelper.cs +++ b/src/Skia/Avalonia.Skia/Helpers/DrawingContextHelper.cs @@ -1,5 +1,4 @@ -using System; -using Avalonia.Platform; +using Avalonia.Platform; using Avalonia.Rendering; using SkiaSharp; @@ -29,72 +28,5 @@ namespace Avalonia.Skia.Helpers return new DrawingContextImpl(createInfo); } - /// - /// Unsupported - Wraps a GPU Backed SkiaSurface in an Avalonia DrawingContext. - /// - [Obsolete] - public static IDrawingContextImpl WrapSkiaSurface(this SKSurface surface, GRContext grContext, Vector dpi, params IDisposable[] disposables) - { - var createInfo = new DrawingContextImpl.CreateInfo - { - GrContext = grContext, - Surface = surface, - Dpi = dpi, - DisableTextLcdRendering = false, - }; - - return new DrawingContextImpl(createInfo, disposables); - } - - /// - /// Unsupported - Wraps a non-GPU Backed SkiaSurface in an Avalonia DrawingContext. - /// - [Obsolete] - public static IDrawingContextImpl WrapSkiaSurface(this SKSurface surface, Vector dpi, params IDisposable[] disposables) - { - var createInfo = new DrawingContextImpl.CreateInfo - { - Surface = surface, - Dpi = dpi, - DisableTextLcdRendering = false, - }; - - return new DrawingContextImpl(createInfo, disposables); - } - - [Obsolete] - public static IDrawingContextImpl CreateDrawingContext(Size size, Vector dpi, GRContext grContext = null) - { - if (grContext is null) - { - var surface = SKSurface.Create( - new SKImageInfo( - (int)Math.Ceiling(size.Width), - (int)Math.Ceiling(size.Height), - SKImageInfo.PlatformColorType, - SKAlphaType.Premul)); - - return WrapSkiaSurface(surface, dpi, surface); - } - else - { - var surface = SKSurface.Create(grContext, false, - new SKImageInfo( - (int)Math.Ceiling(size.Width), - (int)Math.Ceiling(size.Height), - SKImageInfo.PlatformColorType, - SKAlphaType.Premul)); - - return WrapSkiaSurface(surface, grContext, dpi, surface); - } - } - - [Obsolete] - public static void DrawTo(this IDrawingContextImpl source, IDrawingContextImpl destination, SKPaint paint = null) - { - var src = (DrawingContextImpl)source; - var dst = (DrawingContextImpl)destination; - dst.Canvas.DrawSurface(src.Surface, new SKPoint(0, 0), paint); - } } } diff --git a/src/Windows/Avalonia.Win32/Win32Platform.cs b/src/Windows/Avalonia.Win32/Win32Platform.cs index 2b8070fb04..29b4baeeb0 100644 --- a/src/Windows/Avalonia.Win32/Win32Platform.cs +++ b/src/Windows/Avalonia.Win32/Win32Platform.cs @@ -65,15 +65,6 @@ namespace Avalonia "Microsoft Basic Render" }; - /// - /// Enables multitouch support. The default value is true. - /// - /// - /// Multitouch allows a surface (a touchpad or touchscreen) to recognize the presence of more than one point of contact with the surface at the same time. - /// - [Obsolete("Multitouch is always enabled on supported Windows versions")] - public bool? EnableMultitouch { get; set; } = true; - /// /// Embeds popups to the window when set to true. The default value is false. ///