diff --git a/src/Avalonia.Base/AttachedProperty.cs b/src/Avalonia.Base/AttachedProperty.cs
index 27844023ae..6269df2a26 100644
--- a/src/Avalonia.Base/AttachedProperty.cs
+++ b/src/Avalonia.Base/AttachedProperty.cs
@@ -17,7 +17,7 @@ namespace Avalonia
/// The property metadata.
/// Whether the property inherits its value.
/// A value validation callback.
- public AttachedProperty(
+ internal AttachedProperty(
string name,
Type ownerType,
Type hostType,
diff --git a/src/Avalonia.Base/AvaloniaProperty.cs b/src/Avalonia.Base/AvaloniaProperty.cs
index 332ca1802c..95f8eea852 100644
--- a/src/Avalonia.Base/AvaloniaProperty.cs
+++ b/src/Avalonia.Base/AvaloniaProperty.cs
@@ -42,7 +42,7 @@ namespace Avalonia
/// The class that the property being is registered on.
/// The property metadata.
/// A callback.
- protected AvaloniaProperty(
+ private protected AvaloniaProperty(
string name,
Type valueType,
Type ownerType,
@@ -76,7 +76,7 @@ namespace Avalonia
/// The direct property to copy.
/// The new owner type.
/// Optional overridden metadata.
- protected AvaloniaProperty(
+ private protected AvaloniaProperty(
AvaloniaProperty source,
Type ownerType,
AvaloniaPropertyMetadata? metadata)
@@ -153,7 +153,7 @@ namespace Avalonia
/// will be true before the property change notifications are sent and false afterwards. This
/// callback is intended to support Control.IsDataContextChanging.
///
- public Action? Notifying { get; }
+ internal Action? Notifying { get; }
///
/// Gets the integer ID that represents this property.
@@ -558,7 +558,7 @@ namespace Avalonia
///
/// The type.
/// The metadata.
- protected void OverrideMetadata(Type type, AvaloniaPropertyMetadata metadata)
+ private protected void OverrideMetadata(Type type, AvaloniaPropertyMetadata metadata)
{
_ = type ?? throw new ArgumentNullException(nameof(type));
_ = metadata ?? throw new ArgumentNullException(nameof(metadata));
@@ -577,7 +577,7 @@ namespace Avalonia
_singleMetadata = null;
}
- protected abstract IObservable GetChanged();
+ private protected abstract IObservable GetChanged();
private AvaloniaPropertyMetadata GetMetadataWithOverrides(Type type)
{
diff --git a/src/Avalonia.Base/AvaloniaProperty`1.cs b/src/Avalonia.Base/AvaloniaProperty`1.cs
index f08c0e0a02..ea2f3577e5 100644
--- a/src/Avalonia.Base/AvaloniaProperty`1.cs
+++ b/src/Avalonia.Base/AvaloniaProperty`1.cs
@@ -22,7 +22,7 @@ namespace Avalonia
/// The class that the property being is registered on.
/// The property metadata.
/// A callback.
- protected AvaloniaProperty(
+ private protected AvaloniaProperty(
string name,
Type ownerType,
Type hostType,
@@ -39,7 +39,7 @@ namespace Avalonia
/// The property to copy.
/// The new owner type.
/// Optional overridden metadata.
- protected AvaloniaProperty(
+ private protected AvaloniaProperty(
AvaloniaProperty source,
Type ownerType,
AvaloniaPropertyMetadata? metadata)
@@ -68,10 +68,10 @@ namespace Avalonia
_changed.OnNext(e);
}
- protected override IObservable GetChanged() => Changed;
+ private protected override IObservable GetChanged() => Changed;
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = TrimmingMessages.ImplicitTypeConvertionSupressWarningMessage)]
- protected BindingValue