We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b17153f commit 492cbe5Copy full SHA for 492cbe5
src/Avalonia.Base/AvaloniaObjectExtensions.cs
@@ -18,7 +18,10 @@ public static class AvaloniaObjectExtensions
18
/// <returns>An <see cref="IBinding"/>.</returns>
19
public static IBinding ToBinding<T>(this IObservable<T> source)
20
{
21
- return new BindingAdaptor(source.Select(x => (object?)x));
+ return new BindingAdaptor(
22
+ typeof(T).IsValueType
23
+ ? source.Select(x => (object?)x)
24
+ : (IObservable<object?>)source);
25
}
26
27
/// <summary>
0 commit comments