diff --git a/NOTICE.md b/NOTICE.md
index bd26b65d70..7083706c3e 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -81,14 +81,14 @@ A "contributor" is any person that distributes its contribution under this licen
https://github.com/wayland-project/wayland-protocols
-Copyright © 2008-2013 Kristian Høgsberg
-Copyright © 2010-2013 Intel Corporation
-Copyright © 2013 Rafael Antognolli
-Copyright © 2013 Jasper St. Pierre
-Copyright © 2014 Jonas Ådahl
-Copyright © 2014 Jason Ekstrand
-Copyright © 2014-2015 Collabora, Ltd.
-Copyright © 2015 Red Hat Inc.
+Copyright © 2008-2013 Kristian Høgsberg
+Copyright © 2010-2013 Intel Corporation
+Copyright © 2013 Rafael Antognolli
+Copyright © 2013 Jasper St. Pierre
+Copyright © 2014 Jonas Ådahl
+Copyright © 2014 Jason Ekstrand
+Copyright © 2014-2015 Collabora, Ltd.
+Copyright © 2015 Red Hat Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -140,7 +140,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
https://github.com/toptensoftware/RichTextKit
-Copyright © 2019 Topten Software. All Rights Reserved.
+Copyright © 2019 Topten Software. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this product except in compliance with the License. You may obtain
@@ -334,3 +334,31 @@ https://github.com/flutter/flutter
//ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Reactive Extensions
+
+https://github.com/dotnet/reactive
+
+The MIT License (MIT)
+
+Copyright (c) .NET Foundation and Contributors
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/build/Base.props b/build/Base.props
index 9ec1c3c2d3..26f19e3abc 100644
--- a/build/Base.props
+++ b/build/Base.props
@@ -1,6 +1,7 @@

+
diff --git a/samples/ControlCatalog/Pages/MenuPage.xaml.cs b/samples/ControlCatalog/Pages/MenuPage.xaml.cs
index 52c122f2bc..32cfa9b22b 100644
--- a/samples/ControlCatalog/Pages/MenuPage.xaml.cs
+++ b/samples/ControlCatalog/Pages/MenuPage.xaml.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Reactive;
using System.Threading.Tasks;
using System.Windows.Input;
using Avalonia.Controls;
diff --git a/samples/ControlCatalog/Pages/PointerContactsTab.cs b/samples/ControlCatalog/Pages/PointerContactsTab.cs
index b6aabebf99..1751b046c0 100644
--- a/samples/ControlCatalog/Pages/PointerContactsTab.cs
+++ b/samples/ControlCatalog/Pages/PointerContactsTab.cs
@@ -2,7 +2,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Reactive.Linq;
using Avalonia;
using Avalonia.Controls;
diff --git a/samples/ControlCatalog/ViewModels/ComboBoxPageViewModel.cs b/samples/ControlCatalog/ViewModels/ComboBoxPageViewModel.cs
index bbe970afd6..d3e4ea7c31 100644
--- a/samples/ControlCatalog/ViewModels/ComboBoxPageViewModel.cs
+++ b/samples/ControlCatalog/ViewModels/ComboBoxPageViewModel.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.ObjectModel;
using System.Linq;
-using System.Reactive;
using Avalonia.Controls;
using Avalonia.Controls.Selection;
using MiniMvvm;
diff --git a/samples/ControlCatalog/ViewModels/ContextPageViewModel.cs b/samples/ControlCatalog/ViewModels/ContextPageViewModel.cs
index 4a5462a58b..f041f32b10 100644
--- a/samples/ControlCatalog/ViewModels/ContextPageViewModel.cs
+++ b/samples/ControlCatalog/ViewModels/ContextPageViewModel.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Reactive;
using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.VisualTree;
diff --git a/samples/ControlCatalog/ViewModels/ListBoxPageViewModel.cs b/samples/ControlCatalog/ViewModels/ListBoxPageViewModel.cs
index f89d9d1e20..7f32536b11 100644
--- a/samples/ControlCatalog/ViewModels/ListBoxPageViewModel.cs
+++ b/samples/ControlCatalog/ViewModels/ListBoxPageViewModel.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.ObjectModel;
using System.Linq;
-using System.Reactive;
using Avalonia.Controls;
using Avalonia.Controls.Selection;
using ControlCatalog.Pages;
diff --git a/samples/ControlCatalog/ViewModels/MainWindowViewModel.cs b/samples/ControlCatalog/ViewModels/MainWindowViewModel.cs
index 47c6f70714..3628a9b8a7 100644
--- a/samples/ControlCatalog/ViewModels/MainWindowViewModel.cs
+++ b/samples/ControlCatalog/ViewModels/MainWindowViewModel.cs
@@ -1,9 +1,9 @@
-using System.Reactive;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Controls.Notifications;
using Avalonia.Dialogs;
using Avalonia.Platform;
+using Avalonia.Reactive;
using System;
using System.ComponentModel.DataAnnotations;
using MiniMvvm;
diff --git a/samples/ControlCatalog/ViewModels/MenuPageViewModel.cs b/samples/ControlCatalog/ViewModels/MenuPageViewModel.cs
index 16051c3c05..df62ba04cb 100644
--- a/samples/ControlCatalog/ViewModels/MenuPageViewModel.cs
+++ b/samples/ControlCatalog/ViewModels/MenuPageViewModel.cs
@@ -1,6 +1,4 @@
using System.Collections.Generic;
-using System.Reactive;
-using System.Reactive.Linq;
using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.VisualTree;
diff --git a/samples/ControlCatalog/ViewModels/NotificationViewModel.cs b/samples/ControlCatalog/ViewModels/NotificationViewModel.cs
index a31f164a2a..bcbcb345ef 100644
--- a/samples/ControlCatalog/ViewModels/NotificationViewModel.cs
+++ b/samples/ControlCatalog/ViewModels/NotificationViewModel.cs
@@ -1,5 +1,4 @@
-using System.Reactive;
-using Avalonia.Controls.Notifications;
+using Avalonia.Controls.Notifications;
using MiniMvvm;
namespace ControlCatalog.ViewModels
diff --git a/samples/ControlCatalog/ViewModels/RefreshContainerViewModel.cs b/samples/ControlCatalog/ViewModels/RefreshContainerViewModel.cs
index d4b43043be..aa15d7758b 100644
--- a/samples/ControlCatalog/ViewModels/RefreshContainerViewModel.cs
+++ b/samples/ControlCatalog/ViewModels/RefreshContainerViewModel.cs
@@ -1,6 +1,5 @@
using System.Collections.ObjectModel;
using System.Linq;
-using System.Reactive;
using System.Threading.Tasks;
using Avalonia.Controls.Notifications;
using ControlCatalog.Pages;
diff --git a/samples/ControlCatalog/ViewModels/TreeViewPageViewModel.cs b/samples/ControlCatalog/ViewModels/TreeViewPageViewModel.cs
index 80d4844f7a..7c0855e0af 100644
--- a/samples/ControlCatalog/ViewModels/TreeViewPageViewModel.cs
+++ b/samples/ControlCatalog/ViewModels/TreeViewPageViewModel.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.ObjectModel;
using System.Linq;
-using System.Reactive;
using Avalonia.Controls;
using MiniMvvm;
diff --git a/samples/MiniMvvm/MiniMvvm.csproj b/samples/MiniMvvm/MiniMvvm.csproj
index 6535b2bdbd..2a9164624a 100644
--- a/samples/MiniMvvm/MiniMvvm.csproj
+++ b/samples/MiniMvvm/MiniMvvm.csproj
@@ -2,5 +2,7 @@
netstandard2.0
-
+
+
+
diff --git a/samples/MiniMvvm/PropertyChangedExtensions.cs b/samples/MiniMvvm/PropertyChangedExtensions.cs
index f1065c7530..f51773810d 100644
--- a/samples/MiniMvvm/PropertyChangedExtensions.cs
+++ b/samples/MiniMvvm/PropertyChangedExtensions.cs
@@ -1,8 +1,8 @@
using System;
using System.ComponentModel;
using System.Linq.Expressions;
-using System.Reactive.Linq;
using System.Reflection;
+using Avalonia.Reactive;
namespace MiniMvvm
{
@@ -92,11 +92,13 @@ namespace MiniMvvm
Expression> v3,
Func cb
) where TModel : INotifyPropertyChanged =>
- Observable.CombineLatest(
- model.WhenAnyValue(v1),
- model.WhenAnyValue(v2),
- model.WhenAnyValue(v3),
- cb);
+ model.WhenAnyValue(v1)
+ .CombineLatest(
+ model.WhenAnyValue(v2),
+ (l, r) => (l, r))
+ .CombineLatest(
+ model.WhenAnyValue(v3),
+ (t, r) => cb(t.l, t.r, r));
public static IObservable> WhenAnyValue(this TModel model,
Expression> v1,
diff --git a/samples/MiniMvvm/ViewModelBase.cs b/samples/MiniMvvm/ViewModelBase.cs
index 7256b05cef..8bc398607f 100644
--- a/samples/MiniMvvm/ViewModelBase.cs
+++ b/samples/MiniMvvm/ViewModelBase.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.ComponentModel;
-using System.Reactive.Joins;
using System.Runtime.CompilerServices;
namespace MiniMvvm
diff --git a/samples/PlatformSanityChecks/PlatformSanityChecks.csproj b/samples/PlatformSanityChecks/PlatformSanityChecks.csproj
index 5c743aabdb..5f61a08f3c 100644
--- a/samples/PlatformSanityChecks/PlatformSanityChecks.csproj
+++ b/samples/PlatformSanityChecks/PlatformSanityChecks.csproj
@@ -11,4 +11,5 @@
+
diff --git a/samples/Previewer/Previewer.csproj b/samples/Previewer/Previewer.csproj
index 2cc84168dc..76c1ba7b69 100644
--- a/samples/Previewer/Previewer.csproj
+++ b/samples/Previewer/Previewer.csproj
@@ -12,7 +12,8 @@
-
+
+
diff --git a/samples/ReactiveUIDemo/ReactiveUIDemo.csproj b/samples/ReactiveUIDemo/ReactiveUIDemo.csproj
index 94ca4ee809..9650068434 100644
--- a/samples/ReactiveUIDemo/ReactiveUIDemo.csproj
+++ b/samples/ReactiveUIDemo/ReactiveUIDemo.csproj
@@ -23,6 +23,5 @@
-
diff --git a/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj b/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj
index 223a53d8c5..1643ca3ee2 100644
--- a/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj
+++ b/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj
@@ -15,6 +15,4 @@
ControlCatalog
-
-
diff --git a/src/Android/Avalonia.Android/AndroidThreadingInterface.cs b/src/Android/Avalonia.Android/AndroidThreadingInterface.cs
index de9149e9a1..152076013f 100644
--- a/src/Android/Avalonia.Android/AndroidThreadingInterface.cs
+++ b/src/Android/Avalonia.Android/AndroidThreadingInterface.cs
@@ -1,10 +1,10 @@
using System;
-using System.Reactive.Disposables;
using System.Threading;
using Android.OS;
using Avalonia.Platform;
+using Avalonia.Reactive;
using Avalonia.Threading;
using App = Android.App.Application;
diff --git a/src/Android/Avalonia.Android/ChoreographerTimer.cs b/src/Android/Avalonia.Android/ChoreographerTimer.cs
index 19dc7b4ab6..3545ae8fe1 100644
--- a/src/Android/Avalonia.Android/ChoreographerTimer.cs
+++ b/src/Android/Avalonia.Android/ChoreographerTimer.cs
@@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
-using System.Reactive.Disposables;
using System.Threading.Tasks;
using Android.OS;
using Android.Views;
+using Avalonia.Reactive;
using Avalonia.Rendering;
using Java.Lang;
diff --git a/src/Avalonia.Base/Animation/Animation.cs b/src/Avalonia.Base/Animation/Animation.cs
index 06087cdd6a..d62acc0d52 100644
--- a/src/Avalonia.Base/Animation/Animation.cs
+++ b/src/Avalonia.Base/Animation/Animation.cs
@@ -2,8 +2,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Reactive.Disposables;
-using System.Reactive.Linq;
+using Avalonia.Reactive;
using System.Threading;
using System.Threading.Tasks;
diff --git a/src/Avalonia.Base/Animation/AnimationInstance`1.cs b/src/Avalonia.Base/Animation/AnimationInstance`1.cs
index 6a6e69894b..682629c801 100644
--- a/src/Avalonia.Base/Animation/AnimationInstance`1.cs
+++ b/src/Avalonia.Base/Animation/AnimationInstance`1.cs
@@ -1,10 +1,8 @@
using System;
using System.Linq;
-using System.Reactive.Linq;
+using Avalonia.Reactive;
using Avalonia.Animation.Animators;
-using Avalonia.Animation.Utils;
using Avalonia.Data;
-using Avalonia.Reactive;
namespace Avalonia.Animation
{
diff --git a/src/Avalonia.Base/Animation/AnimatorKeyFrame.cs b/src/Avalonia.Base/Animation/AnimatorKeyFrame.cs
index 3168a67d79..dcce75b31c 100644
--- a/src/Avalonia.Base/Animation/AnimatorKeyFrame.cs
+++ b/src/Avalonia.Base/Animation/AnimatorKeyFrame.cs
@@ -63,7 +63,7 @@ namespace Avalonia.Animation
}
else
{
- return this.Bind(ValueProperty, ObservableEx.SingleValue(value).ToBinding(), targetControl);
+ return this.Bind(ValueProperty, Observable.SingleValue(value).ToBinding(), targetControl);
}
}
diff --git a/src/Avalonia.Base/Animation/Animators/Animator`1.cs b/src/Avalonia.Base/Animation/Animators/Animator`1.cs
index b5d1feb4a7..2db890bd0a 100644
--- a/src/Avalonia.Base/Animation/Animators/Animator`1.cs
+++ b/src/Avalonia.Base/Animation/Animators/Animator`1.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Reactive.Disposables;
-using System.Reactive.Linq;
using Avalonia.Animation.Utils;
using Avalonia.Collections;
using Avalonia.Data;
diff --git a/src/Avalonia.Base/Animation/Animators/ColorAnimator.cs b/src/Avalonia.Base/Animation/Animators/ColorAnimator.cs
index 72add21d69..7be974b9e5 100644
--- a/src/Avalonia.Base/Animation/Animators/ColorAnimator.cs
+++ b/src/Avalonia.Base/Animation/Animators/ColorAnimator.cs
@@ -2,7 +2,7 @@
// and adopted from LottieSharp Project (https://github.com/ascora/LottieSharp).
using System;
-using System.Reactive.Disposables;
+using Avalonia.Reactive;
using Avalonia.Logging;
using Avalonia.Media;
diff --git a/src/Avalonia.Base/Animation/Animators/TransformAnimator.cs b/src/Avalonia.Base/Animation/Animators/TransformAnimator.cs
index e12ca722f9..8040fb595b 100644
--- a/src/Avalonia.Base/Animation/Animators/TransformAnimator.cs
+++ b/src/Avalonia.Base/Animation/Animators/TransformAnimator.cs
@@ -1,5 +1,5 @@
using System;
-using System.Reactive.Disposables;
+using Avalonia.Reactive;
using Avalonia.Logging;
using Avalonia.Media;
using Avalonia.Media.Transformation;
diff --git a/src/Avalonia.Base/Animation/Clock.cs b/src/Avalonia.Base/Animation/Clock.cs
index 5afd2ae705..f2bce9d3a5 100644
--- a/src/Avalonia.Base/Animation/Clock.cs
+++ b/src/Avalonia.Base/Animation/Clock.cs
@@ -1,4 +1,5 @@
using System;
+using Avalonia.Reactive;
namespace Avalonia.Animation
{
diff --git a/src/Avalonia.Base/Animation/CrossFade.cs b/src/Avalonia.Base/Animation/CrossFade.cs
index a229bc7ce6..640d6456a3 100644
--- a/src/Avalonia.Base/Animation/CrossFade.cs
+++ b/src/Avalonia.Base/Animation/CrossFade.cs
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
-using System.Reactive.Disposables;
+using Avalonia.Reactive;
using System.Threading;
using System.Threading.Tasks;
using Avalonia.Animation.Easings;
@@ -108,7 +108,7 @@ namespace Avalonia.Animation
}
var tasks = new List();
- using (var disposables = new CompositeDisposable())
+ using (var disposables = new CompositeDisposable(1))
{
if (to != null)
{
diff --git a/src/Avalonia.Base/Avalonia.Base.csproj b/src/Avalonia.Base/Avalonia.Base.csproj
index d6f1542687..cd122a8b67 100644
--- a/src/Avalonia.Base/Avalonia.Base.csproj
+++ b/src/Avalonia.Base/Avalonia.Base.csproj
@@ -14,7 +14,6 @@
-
@@ -37,6 +36,13 @@
+
+
+
+
+
+
+
@@ -48,8 +54,12 @@
+
+
+
+
diff --git a/src/Avalonia.Base/AvaloniaObjectExtensions.cs b/src/Avalonia.Base/AvaloniaObjectExtensions.cs
index 867d6215a5..7b17b9152d 100644
--- a/src/Avalonia.Base/AvaloniaObjectExtensions.cs
+++ b/src/Avalonia.Base/AvaloniaObjectExtensions.cs
@@ -1,10 +1,6 @@
using System;
-using System.Reactive;
-using System.Reactive.Disposables;
-using System.Reactive.Linq;
-using System.Reactive.Subjects;
-using Avalonia.Data;
using Avalonia.Reactive;
+using Avalonia.Data;
namespace Avalonia
{
@@ -127,108 +123,6 @@ namespace Avalonia
property ?? throw new ArgumentNullException(nameof(property)));
}
- ///
- /// Gets a subject for an .
- ///
- /// The object.
- /// The property.
- ///
- /// The priority with which binding values are written to the object.
- ///
- ///
- /// An which can be used for two-way binding to/from the
- /// property.
- ///
- public static ISubject