diff --git a/readme.md b/readme.md
index 783857a096..42b1e52205 100644
--- a/readme.md
+++ b/readme.md
@@ -10,7 +10,7 @@
**Avalonia** is a WPF/UWP-inspired cross-platform XAML-based UI framework providing a flexible styling system and supporting a wide range of Operating Systems such as Windows (.NET Framework, .NET Core), Linux (via Xorg), macOS and with experimental support for Android and iOS.
-**Avalonia** is ready for **General-Purpose Desktop App Development**. However, there may be some bugs and breaking changes as we continue along into this project's development. To see the status of some of our features, please see our [Roadmap here](https://github.com/AvaloniaUI/Avalonia/issues/2239).
+**Avalonia** is ready for **General-Purpose Desktop App Development**. However, there may be some bugs and [breaking changes](https://github.com/AvaloniaUI/Avalonia/wiki/Breaking-Changes) as we continue along into this project's development. To see the status of some of our features, please see our [Roadmap here](https://github.com/AvaloniaUI/Avalonia/issues/2239).
| Control catalog | Desktop platforms | Mobile platforms |
|---|---|---|
@@ -24,6 +24,8 @@ Avalonia [Visual Studio Extension](https://marketplace.visualstudio.com/items?it
For those without Visual Studio, a starter guide for .NET Core CLI can be found [here](http://avaloniaui.net/docs/quickstart/create-new-project#net-core).
+If you need to develop Avalonia app with JetBrains Rider, go and *vote* on [this issue](https://youtrack.jetbrains.com/issue/RIDER-39247) in their tracker. JetBrains won't do things without their users telling them that they want the feature, so only **YOU** can make it happen.
+
Avalonia is delivered via NuGet package manager. You can find the packages here: [stable(ish)](https://www.nuget.org/packages/Avalonia/)
Use these commands in the Package Manager console to install Avalonia manually:
diff --git a/src/Avalonia.Base/AvaloniaObject.cs b/src/Avalonia.Base/AvaloniaObject.cs
index 6a00feaf79..ddc3d8d081 100644
--- a/src/Avalonia.Base/AvaloniaObject.cs
+++ b/src/Avalonia.Base/AvaloniaObject.cs
@@ -34,7 +34,6 @@ namespace Avalonia
public AvaloniaObject()
{
VerifyAccess();
- AvaloniaPropertyRegistry.Instance.NotifyInitialized(this);
}
///
diff --git a/src/Avalonia.Base/AvaloniaProperty.cs b/src/Avalonia.Base/AvaloniaProperty.cs
index b305a9aaa2..aa7a675764 100644
--- a/src/Avalonia.Base/AvaloniaProperty.cs
+++ b/src/Avalonia.Base/AvaloniaProperty.cs
@@ -20,7 +20,6 @@ namespace Avalonia
public static readonly object UnsetValue = new UnsetValueType();
private static int s_nextId;
- private readonly Subject _initialized;
private readonly Subject _changed;
private readonly PropertyMetadata _defaultMetadata;
private readonly Dictionary _metadata;
@@ -53,7 +52,6 @@ namespace Avalonia
throw new ArgumentException("'name' may not contain periods.");
}
- _initialized = new Subject();
_changed = new Subject();
_metadata = new Dictionary();
@@ -81,7 +79,6 @@ namespace Avalonia
Contract.Requires(source != null);
Contract.Requires(ownerType != null);
- _initialized = source._initialized;
_changed = source._changed;
_metadata = new Dictionary();
@@ -136,22 +133,6 @@ namespace Avalonia
///
public virtual bool IsReadOnly => false;
- ///
- /// Gets an observable that is fired when this property is initialized on a
- /// new instance.
- ///
- ///
- /// This observable is fired each time a new is constructed
- /// for all properties registered on the object's type. The default value of the property
- /// for the object is passed in the args' NewValue (OldValue will always be
- /// .
- ///
- ///
- /// An observable that is fired when this property is initialized on a new
- /// instance.
- ///
- public IObservable Initialized => _initialized;
-
///
/// Gets an observable that is fired when this property changes on any
/// instance.
@@ -488,26 +469,6 @@ namespace Avalonia
return Name;
}
- ///
- /// True if has any observers.
- ///
- internal bool HasNotifyInitializedObservers => _initialized.HasObservers;
-
- ///
- /// Notifies the observable.
- ///
- /// The object being initialized.
- internal abstract void NotifyInitialized(IAvaloniaObject o);
-
- ///
- /// Notifies the observable.
- ///
- /// The observable arguments.
- internal void NotifyInitialized(AvaloniaPropertyChangedEventArgs e)
- {
- _initialized.OnNext(e);
- }
-
///
/// Notifies the observable.
///
diff --git a/src/Avalonia.Base/AvaloniaPropertyRegistry.cs b/src/Avalonia.Base/AvaloniaPropertyRegistry.cs
index 14c8630599..29ab10278b 100644
--- a/src/Avalonia.Base/AvaloniaPropertyRegistry.cs
+++ b/src/Avalonia.Base/AvaloniaPropertyRegistry.cs
@@ -415,51 +415,6 @@ namespace Avalonia
_inheritedCache.Clear();
}
- internal void NotifyInitialized(AvaloniaObject o)
- {
- Contract.Requires(o != null);
-
- var type = o.GetType();
-
- if (!_initializedCache.TryGetValue(type, out var initializationData))
- {
- var visited = new HashSet();
-
- initializationData = new List();
-
- foreach (AvaloniaProperty property in GetRegistered(type))
- {
- if (property.IsDirect)
- {
- initializationData.Add(new PropertyInitializationData(property, (IDirectPropertyAccessor)property));
- }
- else
- {
- initializationData.Add(new PropertyInitializationData(property, (IStyledPropertyAccessor)property, type));
- }
-
- visited.Add(property);
- }
-
- foreach (AvaloniaProperty property in GetRegisteredAttached(type))
- {
- if (!visited.Contains(property))
- {
- initializationData.Add(new PropertyInitializationData(property, (IStyledPropertyAccessor)property, type));
-
- visited.Add(property);
- }
- }
-
- _initializedCache.Add(type, initializationData);
- }
-
- foreach (PropertyInitializationData data in initializationData)
- {
- data.Property.NotifyInitialized(o);
- }
- }
-
private readonly struct PropertyInitializationData
{
public AvaloniaProperty Property { get; }
diff --git a/src/Avalonia.Base/DirectPropertyBase.cs b/src/Avalonia.Base/DirectPropertyBase.cs
index 7a0be065eb..39ed3b084f 100644
--- a/src/Avalonia.Base/DirectPropertyBase.cs
+++ b/src/Avalonia.Base/DirectPropertyBase.cs
@@ -101,21 +101,6 @@ namespace Avalonia
return (DirectPropertyMetadata)base.GetMetadata(type);
}
- ///
- internal override void NotifyInitialized(IAvaloniaObject o)
- {
- if (HasNotifyInitializedObservers)
- {
- var e = new AvaloniaPropertyChangedEventArgs(
- o,
- this,
- default,
- InvokeGetter(o),
- BindingPriority.Unset);
- NotifyInitialized(e);
- }
- }
-
///
internal override void RouteClearValue(IAvaloniaObject o)
{
diff --git a/src/Avalonia.Base/StyledPropertyBase.cs b/src/Avalonia.Base/StyledPropertyBase.cs
index 8c4d683ae0..d1f961a567 100644
--- a/src/Avalonia.Base/StyledPropertyBase.cs
+++ b/src/Avalonia.Base/StyledPropertyBase.cs
@@ -181,21 +181,6 @@ namespace Avalonia
///
object IStyledPropertyAccessor.GetDefaultValue(Type type) => GetDefaultBoxedValue(type);
- ///
- internal override void NotifyInitialized(IAvaloniaObject o)
- {
- if (HasNotifyInitializedObservers)
- {
- var e = new AvaloniaPropertyChangedEventArgs(
- o,
- this,
- default,
- o.GetValue(this),
- BindingPriority.Unset);
- NotifyInitialized(e);
- }
- }
-
///
internal override void RouteClearValue(IAvaloniaObject o)
{
diff --git a/src/Avalonia.Base/Utilities/WeakEventHandlerManager.cs b/src/Avalonia.Base/Utilities/WeakEventHandlerManager.cs
index 37e25d0fac..aca08f5259 100644
--- a/src/Avalonia.Base/Utilities/WeakEventHandlerManager.cs
+++ b/src/Avalonia.Base/Utilities/WeakEventHandlerManager.cs
@@ -183,11 +183,16 @@ namespace Avalonia.Utilities
for (int c = 0; c < _count; c++)
{
var r = _data[c];
+
+ TSubscriber target = null;
+
+ r.Subscriber?.TryGetTarget(out target);
+
//Mark current index as first empty
- if (r.Subscriber == null && empty == -1)
+ if (target == null && empty == -1)
empty = c;
//If current element isn't null and we have an empty one
- if (r.Subscriber != null && empty != -1)
+ if (target != null && empty != -1)
{
_data[c] = default;
_data[empty] = r;
diff --git a/src/Avalonia.Controls.DataGrid/DataGrid.cs b/src/Avalonia.Controls.DataGrid/DataGrid.cs
index e16e11cdd6..0083d57960 100644
--- a/src/Avalonia.Controls.DataGrid/DataGrid.cs
+++ b/src/Avalonia.Controls.DataGrid/DataGrid.cs
@@ -373,7 +373,11 @@ namespace Avalonia.Controls
public bool IsValid
{
get { return _isValid; }
- internal set { SetAndRaise(IsValidProperty, ref _isValid, value); }
+ internal set
+ {
+ SetAndRaise(IsValidProperty, ref _isValid, value);
+ PseudoClasses.Set(":invalid", !value);
+ }
}
public static readonly StyledProperty MaxColumnWidthProperty =
@@ -656,8 +660,6 @@ namespace Avalonia.Controls
HorizontalScrollBarVisibilityProperty,
VerticalScrollBarVisibilityProperty);
- PseudoClass(IsValidProperty, x => !x, ":invalid");
-
ItemsProperty.Changed.AddClassHandler((x, e) => x.OnItemsPropertyChanged(e));
CanUserResizeColumnsProperty.Changed.AddClassHandler((x, e) => x.OnCanUserResizeColumnsChanged(e));
ColumnWidthProperty.Changed.AddClassHandler((x, e) => x.OnColumnWidthChanged(e));
diff --git a/src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs b/src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs
index 062fdeb4d3..bff2b500ae 100644
--- a/src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs
+++ b/src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs
@@ -326,7 +326,7 @@ namespace Avalonia.Controls
if (OwningGrid != null && OwningGrid.ColumnHeaders != null)
{
- args.Device.Capture(this);
+ args.Pointer.Capture(this);
_dragMode = DragMode.MouseDown;
_frozenColumnsWidth = OwningGrid.ColumnsInternal.GetVisibleFrozenEdgedColumnsWidth();
@@ -391,7 +391,7 @@ namespace Avalonia.Controls
SetDragCursor(mousePosition);
// Variables that track drag mode states get reset in DataGridColumnHeader_LostMouseCapture
- args.Device.Capture(null);
+ args.Pointer.Capture(null);
OnLostMouseCapture();
_dragMode = DragMode.None;
handled = true;
diff --git a/src/Avalonia.Controls.DataGrid/Themes/Default.xaml b/src/Avalonia.Controls.DataGrid/Themes/Default.xaml
index 7a399349f6..0e039f01cb 100644
--- a/src/Avalonia.Controls.DataGrid/Themes/Default.xaml
+++ b/src/Avalonia.Controls.DataGrid/Themes/Default.xaml
@@ -45,7 +45,7 @@
-
+
+
+