diff --git a/Avalonia.Desktop.slnf b/Avalonia.Desktop.slnf
index 92c924f107..5e770a0170 100644
--- a/Avalonia.Desktop.slnf
+++ b/Avalonia.Desktop.slnf
@@ -39,14 +39,13 @@
"src\\Markup\\Avalonia.Markup.Xaml\\Avalonia.Markup.Xaml.csproj",
"src\\Markup\\Avalonia.Markup\\Avalonia.Markup.csproj",
"src\\Skia\\Avalonia.Skia\\Avalonia.Skia.csproj",
- "src\\tools\\Avalonia.Generators\\Avalonia.Generators.csproj",
- "src\\tools\\Avalonia.Generators\\Avalonia.Generators.csproj",
- "src\\tools\\DevAnalyzers\\DevAnalyzers.csproj",
- "src\\tools\\DevGenerators\\DevGenerators.csproj",
- "src\\tools\\PublicAnalyzers\\Avalonia.Analyzers.csproj",
"src\\Windows\\Avalonia.Direct2D1\\Avalonia.Direct2D1.csproj",
"src\\Windows\\Avalonia.Win32.Interop\\Avalonia.Win32.Interop.csproj",
"src\\Windows\\Avalonia.Win32\\Avalonia.Win32.csproj",
+ "src\\tools\\Avalonia.Analyzers\\Avalonia.Analyzers.csproj",
+ "src\\tools\\Avalonia.Generators\\Avalonia.Generators.csproj",
+ "src\\tools\\DevAnalyzers\\DevAnalyzers.csproj",
+ "src\\tools\\DevGenerators\\DevGenerators.csproj",
"tests\\Avalonia.Base.UnitTests\\Avalonia.Base.UnitTests.csproj",
"tests\\Avalonia.Benchmarks\\Avalonia.Benchmarks.csproj",
"tests\\Avalonia.Controls.DataGrid.UnitTests\\Avalonia.Controls.DataGrid.UnitTests.csproj",
@@ -66,4 +65,4 @@
"tests\\Avalonia.UnitTests\\Avalonia.UnitTests.csproj"
]
}
-}
+}
\ No newline at end of file
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/Build.cs b/nukebuild/Build.cs
index 87e1e86bf9..524c9fa4e4 100644
--- a/nukebuild/Build.cs
+++ b/nukebuild/Build.cs
@@ -312,7 +312,7 @@ partial class Build : NukeBuild
public static int Main() =>
RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
- ? Execute(x => x.RunToolsTests)
+ ? Execute(x => x.Package)
: Execute(x => x.RunTests);
}
diff --git a/nukebuild/RefAssemblyGenerator.cs b/nukebuild/RefAssemblyGenerator.cs
index e1c19c69a3..54e428c442 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,57 @@ 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 cl in type.NestedTypes)
+ {
+ ProcessType(cl, obsoleteCtor);
+ if (hideMembers)
+ {
+ var dflags = TypeAttributes.Public;
+ cl.Attributes = ((cl.Attributes | dflags) ^ dflags) | TypeAttributes.NotPublic;
+ }
+ }
+
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.NetCore/ControlCatalog.NetCore.csproj b/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj
index 877d475fb6..37719b77d8 100644
--- a/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj
+++ b/samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj
@@ -16,6 +16,7 @@
+
diff --git a/samples/ControlCatalog/MainView.xaml.cs b/samples/ControlCatalog/MainView.xaml.cs
index 9c511f9eb0..801844a43c 100644
--- a/samples/ControlCatalog/MainView.xaml.cs
+++ b/samples/ControlCatalog/MainView.xaml.cs
@@ -83,9 +83,10 @@ namespace ControlCatalog
if (transparencyLevels.SelectedItem is WindowTransparencyLevel selected)
{
var topLevel = (TopLevel)this.GetVisualRoot()!;
- topLevel.TransparencyLevelHint = selected;
+ topLevel.TransparencyLevelHint = new[] { selected };
- if (selected != WindowTransparencyLevel.None)
+ if (topLevel.ActualTransparencyLevel != WindowTransparencyLevel.None &&
+ topLevel.ActualTransparencyLevel == selected)
{
var transparentBrush = new ImmutableSolidColorBrush(Colors.White, 0);
var semiTransparentBrush = new ImmutableSolidColorBrush(Colors.Gray, 0.2);
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/ControlCatalog/Pages/TabControlPage.xaml b/samples/ControlCatalog/Pages/TabControlPage.xaml
index 3a2464e9fd..1faa74c1ce 100644
--- a/samples/ControlCatalog/Pages/TabControlPage.xaml
+++ b/samples/ControlCatalog/Pages/TabControlPage.xaml
@@ -4,7 +4,27 @@
xmlns="https://github.com/avaloniaui"
xmlns:viewModels="using:ControlCatalog.ViewModels"
x:DataType="viewModels:TabControlPageViewModel">
-
+
+
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
@@ -239,16 +239,17 @@
+
-
-
-
-
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent/Controls/Menu.xaml b/src/Avalonia.Themes.Fluent/Controls/Menu.xaml
index e6bbbde632..c1640efa8c 100644
--- a/src/Avalonia.Themes.Fluent/Controls/Menu.xaml
+++ b/src/Avalonia.Themes.Fluent/Controls/Menu.xaml
@@ -1,5 +1,6 @@
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:ClassModifier="internal">