Avalonia 0.9.3
Xaml:
<Polygon Fill="Red" Points="{Binding DeltaPoints}"/>
<Polyline Stroke="Blue" Points="{Binding DeltaPoints}"/>
C#:
private readonly ReadOnlyObservableCollection<Avalonia.Point> _deltaPoints;
public ReadOnlyObservableCollection<Avalonia.Point> DeltaPoints => _deltaPoints;
private SourceList<Avalonia.Point> _pointsD;
_pointsD = new SourceList<Avalonia.Point>();
_pointsD.Add(new Avalonia.Point(123, 45));
_pointsD.Add(new Avalonia.Point(45, 45));
...
_pointsD.Connect()
.ObserveOn(RxApp.MainThreadScheduler)
.Bind(out _deltaPoints)
.Subscribe();
These bindings work only for the initial points collection. All dynamically added points change neither Polygon nor Polyline image. Binding of the same collection to a ListBox works well.
Avalonia 0.9.3
Xaml:
C#:
These bindings work only for the initial points collection. All dynamically added points change neither Polygon nor Polyline image. Binding of the same collection to a ListBox works well.