diff --git a/build/SharedVersion.props b/build/SharedVersion.props
index 2849262591..3239ca830a 100644
--- a/build/SharedVersion.props
+++ b/build/SharedVersion.props
@@ -4,7 +4,7 @@
Avalonia
11.0.999
Avalonia Team
- Copyright 2022 © The AvaloniaUI Project
+ Copyright 2013-$([System.DateTime]::Now.ToString(`yyyy`)) © The AvaloniaUI Project
https://avaloniaui.net
https://github.com/AvaloniaUI/Avalonia/
true
diff --git a/nukebuild/RefAssemblyGenerator.cs b/nukebuild/RefAssemblyGenerator.cs
index e1c19c69a3..dc96849fe7 100644
--- a/nukebuild/RefAssemblyGenerator.cs
+++ b/nukebuild/RefAssemblyGenerator.cs
@@ -71,10 +71,10 @@ public class RefAssemblyGenerator
foreach (var nested in type.NestedTypes)
ProcessType(nested, obsoleteCtor);
- var hideMethods = (type.IsInterface && type.Name.EndsWith("Impl"))
+ var hideMembers = (type.IsInterface && type.Name.EndsWith("Impl"))
|| HasPrivateApi(type.CustomAttributes);
- var injectMethod = hideMethods
+ var injectMethod = hideMembers
|| type.CustomAttributes.Any(a =>
a.AttributeType.FullName == "Avalonia.Metadata.NotClientImplementableAttribute");
@@ -95,21 +95,47 @@ public class RefAssemblyGenerator
foreach (var m in type.Methods)
{
- if (hideMethods || HasPrivateApi(m.CustomAttributes))
+ if (hideMembers || HasPrivateApi(m.CustomAttributes))
{
- var dflags = MethodAttributes.Public | MethodAttributes.Family | MethodAttributes.FamORAssem |
- MethodAttributes.FamANDAssem | MethodAttributes.Assembly;
- m.Attributes = ((m.Attributes | dflags) ^ dflags) | MethodAttributes.Assembly;
+ HideMethod(m);
}
MarkAsUnstable(m, obsoleteCtor, forceUnstable);
}
+ foreach (var p in type.Properties)
+ {
+ if (HasPrivateApi(p.CustomAttributes))
+ {
+ if (p.SetMethod != null)
+ HideMethod(p.SetMethod);
+ if (p.GetMethod != null)
+ HideMethod(p.GetMethod);
+ }
+ }
+
+ foreach (var f in type.Fields)
+ {
+ if (hideMembers || HasPrivateApi(f.CustomAttributes))
+ {
+ var dflags = FieldAttributes.Public | FieldAttributes.Family | FieldAttributes.FamORAssem |
+ FieldAttributes.FamANDAssem | FieldAttributes.Assembly;
+ f.Attributes = ((f.Attributes | dflags) ^ dflags) | FieldAttributes.Assembly;
+ }
+ }
+
foreach (var m in type.Properties)
MarkAsUnstable(m, obsoleteCtor, forceUnstable);
foreach (var m in type.Events)
MarkAsUnstable(m, obsoleteCtor, forceUnstable);
}
+ static void HideMethod(MethodDefinition m)
+ {
+ var dflags = MethodAttributes.Public | MethodAttributes.Family | MethodAttributes.FamORAssem |
+ MethodAttributes.FamANDAssem | MethodAttributes.Assembly;
+ m.Attributes = ((m.Attributes | dflags) ^ dflags) | MethodAttributes.Assembly;
+ }
+
static void MarkAsUnstable(IMemberDefinition def, MethodReference obsoleteCtor, ICustomAttribute unstableAttribute)
{
if (def.CustomAttributes.Any(a => a.AttributeType.FullName == "System.ObsoleteAttribute"))
diff --git a/samples/ControlCatalog/Pages/ContextMenuPage.xaml.cs b/samples/ControlCatalog/Pages/ContextMenuPage.xaml.cs
index 96fcb54650..664264956f 100644
--- a/samples/ControlCatalog/Pages/ContextMenuPage.xaml.cs
+++ b/samples/ControlCatalog/Pages/ContextMenuPage.xaml.cs
@@ -19,8 +19,8 @@ namespace ControlCatalog.Pages
customContextRequestedBorder.AddHandler(ContextRequestedEvent, CustomContextRequested, RoutingStrategies.Tunnel);
var cancellableContextBorder = this.Get("CancellableContextBorder");
- cancellableContextBorder.ContextMenu!.ContextMenuClosing += ContextFlyoutPage_Closing;
- cancellableContextBorder.ContextMenu!.ContextMenuOpening += ContextFlyoutPage_Opening;
+ cancellableContextBorder.ContextMenu!.Closing += ContextFlyoutPage_Closing;
+ cancellableContextBorder.ContextMenu!.Opening += ContextFlyoutPage_Opening;
}
private ContextPageViewModel? _model;
diff --git a/samples/ControlCatalog/Pages/DialogsPage.xaml.cs b/samples/ControlCatalog/Pages/DialogsPage.xaml.cs
index 971a6a6718..4d617fd313 100644
--- a/samples/ControlCatalog/Pages/DialogsPage.xaml.cs
+++ b/samples/ControlCatalog/Pages/DialogsPage.xaml.cs
@@ -307,7 +307,7 @@ namespace ControlCatalog.Pages
Content:
";
- resultText += await ReadTextFromFile(file, 10000);
+ resultText += await ReadTextFromFile(file, 500);
}
openedFileContent.Text = resultText;
diff --git a/samples/ControlCatalog/Pages/ItemsRepeaterPage.xaml.cs b/samples/ControlCatalog/Pages/ItemsRepeaterPage.xaml.cs
index 70ce6107ad..2219966daa 100644
--- a/samples/ControlCatalog/Pages/ItemsRepeaterPage.xaml.cs
+++ b/samples/ControlCatalog/Pages/ItemsRepeaterPage.xaml.cs
@@ -117,9 +117,8 @@ namespace ControlCatalog.Pages
private void ScrollTo(int index)
{
System.Diagnostics.Debug.WriteLine("Scroll to " + index);
- var layoutManager = ((TopLevel)VisualRoot!).LayoutManager;
var element = _repeater.GetOrCreateElement(index);
- layoutManager.ExecuteLayoutPass();
+ ((TopLevel)VisualRoot!).UpdateLayout();
element.BringIntoView();
}
diff --git a/samples/GpuInterop/MainWindow.axaml.cs b/samples/GpuInterop/MainWindow.axaml.cs
index 7cf0bc00e2..8d359fe7ef 100644
--- a/samples/GpuInterop/MainWindow.axaml.cs
+++ b/samples/GpuInterop/MainWindow.axaml.cs
@@ -11,7 +11,7 @@ namespace GpuInterop
{
InitializeComponent();
this.AttachDevTools();
- Renderer.Diagnostics.DebugOverlays = RendererDebugOverlays.Fps;
+ RendererDiagnostics.DebugOverlays = RendererDebugOverlays.Fps;
}
private void InitializeComponent()
diff --git a/samples/RenderDemo/MainWindow.xaml.cs b/samples/RenderDemo/MainWindow.xaml.cs
index d85f3b6051..be47ffd6e9 100644
--- a/samples/RenderDemo/MainWindow.xaml.cs
+++ b/samples/RenderDemo/MainWindow.xaml.cs
@@ -21,7 +21,7 @@ namespace RenderDemo
void BindOverlay(Expression> expr, RendererDebugOverlays overlay)
=> vm.WhenAnyValue(expr).Subscribe(x =>
{
- var diagnostics = Renderer.Diagnostics;
+ var diagnostics = RendererDiagnostics;
diagnostics.DebugOverlays = x ?
diagnostics.DebugOverlays | overlay :
diagnostics.DebugOverlays & ~overlay;
diff --git a/samples/RenderDemo/Pages/AnimationsPage.xaml b/samples/RenderDemo/Pages/AnimationsPage.xaml
index d764af8978..f80389c832 100644
--- a/samples/RenderDemo/Pages/AnimationsPage.xaml
+++ b/samples/RenderDemo/Pages/AnimationsPage.xaml
@@ -347,12 +347,8 @@
-
-
-
Hover to activate Keyframe Animations.
-
diff --git a/samples/RenderDemo/Pages/AnimationsPage.xaml.cs b/samples/RenderDemo/Pages/AnimationsPage.xaml.cs
index 2195b3d494..fc28f64021 100644
--- a/samples/RenderDemo/Pages/AnimationsPage.xaml.cs
+++ b/samples/RenderDemo/Pages/AnimationsPage.xaml.cs
@@ -24,20 +24,5 @@ namespace RenderDemo.Pages
{
AvaloniaXamlLoader.Load(this);
}
-
- private void ToggleClock(object sender, RoutedEventArgs args)
- {
- var button = sender as Button;
- var clock = button.Clock;
-
- if (clock.PlayState == PlayState.Run)
- {
- clock.PlayState = PlayState.Pause;
- }
- else if (clock.PlayState == PlayState.Pause)
- {
- clock.PlayState = PlayState.Run;
- }
- }
}
}
diff --git a/samples/RenderDemo/Pages/CustomAnimatorPage.xaml b/samples/RenderDemo/Pages/CustomAnimatorPage.xaml
index 0c625b6a77..25379ba13a 100644
--- a/samples/RenderDemo/Pages/CustomAnimatorPage.xaml
+++ b/samples/RenderDemo/Pages/CustomAnimatorPage.xaml
@@ -11,10 +11,18 @@
-
+
+
+
+
+
-
+
+
+
+
+
diff --git a/samples/RenderDemo/Pages/CustomStringAnimator.cs b/samples/RenderDemo/Pages/CustomStringAnimator.cs
index 851a2d0187..398319726e 100644
--- a/samples/RenderDemo/Pages/CustomStringAnimator.cs
+++ b/samples/RenderDemo/Pages/CustomStringAnimator.cs
@@ -1,8 +1,9 @@
-using Avalonia.Animation.Animators;
+using Avalonia.Animation;
+using Avalonia.Animation.Animators;
namespace RenderDemo.Pages
{
- public class CustomStringAnimator : Animator
+ public class CustomStringAnimator : CustomAnimatorBase
{
public override string Interpolate(double progress, string oldValue, string newValue)
{
diff --git a/samples/RenderDemo/Pages/Transform3DPage.axaml b/samples/RenderDemo/Pages/Transform3DPage.axaml
index 7f3636648c..36e0be3114 100644
--- a/samples/RenderDemo/Pages/Transform3DPage.axaml
+++ b/samples/RenderDemo/Pages/Transform3DPage.axaml
@@ -134,9 +134,6 @@
-
-
-
-
-
-
Hover to activate Transitions.
-
diff --git a/samples/RenderDemo/Pages/TransitionsPage.xaml.cs b/samples/RenderDemo/Pages/TransitionsPage.xaml.cs
index 5f446c9e99..65b33d5ae8 100644
--- a/samples/RenderDemo/Pages/TransitionsPage.xaml.cs
+++ b/samples/RenderDemo/Pages/TransitionsPage.xaml.cs
@@ -18,20 +18,5 @@ namespace RenderDemo.Pages
{
AvaloniaXamlLoader.Load(this);
}
-
- private void ToggleClock(object sender, RoutedEventArgs args)
- {
- var button = sender as Button;
- var clock = button.Clock;
-
- if (clock.PlayState == PlayState.Run)
- {
- clock.PlayState = PlayState.Pause;
- }
- else if (clock.PlayState == PlayState.Pause)
- {
- clock.PlayState = PlayState.Run;
- }
- }
}
}
diff --git a/samples/Sandbox/Sandbox.csproj b/samples/Sandbox/Sandbox.csproj
index d2e66988e0..7a57a13529 100644
--- a/samples/Sandbox/Sandbox.csproj
+++ b/samples/Sandbox/Sandbox.csproj
@@ -5,6 +5,7 @@
net6.0
true
true
+
diff --git a/src/Android/Avalonia.Android/AndroidPlatform.cs b/src/Android/Avalonia.Android/AndroidPlatform.cs
index 984d3ed5fc..d5d5f211e9 100644
--- a/src/Android/Avalonia.Android/AndroidPlatform.cs
+++ b/src/Android/Avalonia.Android/AndroidPlatform.cs
@@ -45,7 +45,6 @@ namespace Avalonia.Android
.Bind().ToConstant(new AndroidThreadingInterface())
.Bind().ToSingleton()
.Bind().ToConstant(new ChoreographerTimer())
- .Bind().ToConstant(new RenderLoop())
.Bind().ToSingleton();
if (Options.UseGpu)
@@ -53,11 +52,7 @@ namespace Avalonia.Android
EglPlatformGraphics.TryInitialize();
}
- Compositor = new Compositor(
- AvaloniaLocator.Current.GetRequiredService(),
- AvaloniaLocator.Current.GetService());
-
-
+ Compositor = new Compositor(AvaloniaLocator.Current.GetService());
}
}
diff --git a/src/Android/Avalonia.Android/AvaloniaView.cs b/src/Android/Avalonia.Android/AvaloniaView.cs
index 27481a598e..05ec1795f4 100644
--- a/src/Android/Avalonia.Android/AvaloniaView.cs
+++ b/src/Android/Avalonia.Android/AvaloniaView.cs
@@ -67,7 +67,7 @@ namespace Avalonia.Android
_timerSubscription = timer.SubscribeView(this);
}
- _root.Renderer.Start();
+ _root.StartRendering();
if (_view.TryGetFeature(out var insetsManager) == true)
{
@@ -76,7 +76,7 @@ namespace Avalonia.Android
}
else
{
- _root.Renderer.Stop();
+ _root.StopRendering();
_timerSubscription?.Dispose();
}
}
diff --git a/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs b/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs
index 6f9fdf3569..a29f06a106 100644
--- a/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs
+++ b/src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs
@@ -106,9 +106,8 @@ namespace Avalonia.Android.Platform.SkiaPlatform
public IEnumerable