Browse Source

Fix lazybitmaps bindings

Equbuxu 2 years ago
parent
commit
6141478001

+ 1 - 1
src/PixiEditor/Views/UserControls/FixedViewport.xaml.cs

@@ -51,7 +51,7 @@ internal partial class FixedViewport : UserControl, INotifyPropertyChanged
     public FixedViewport()
     public FixedViewport()
     {
     {
         InitializeComponent();
         InitializeComponent();
-        Binding binding = new Binding { Source = this, Path = new PropertyPath("Document.Bitmaps") };
+        Binding binding = new Binding { Source = this, Path = new PropertyPath($"{nameof(Document)}.{nameof(Document.LazyBitmaps)}") };
         SetBinding(BitmapsProperty, binding);
         SetBinding(BitmapsProperty, binding);
 
 
         Loaded += OnLoad;
         Loaded += OnLoad;

+ 1 - 1
src/PixiEditor/Views/UserControls/Viewport.xaml.cs

@@ -286,7 +286,7 @@ internal partial class Viewport : UserControl, INotifyPropertyChanged
     {
     {
         InitializeComponent();
         InitializeComponent();
 
 
-        Binding binding = new Binding { Source = this, Path = new PropertyPath("Document.Bitmaps") };
+        Binding binding = new Binding { Source = this, Path = new PropertyPath($"{nameof(Document)}.{nameof(Document.LazyBitmaps)}") };
         SetBinding(BitmapsProperty, binding);
         SetBinding(BitmapsProperty, binding);
 
 
         MainImage!.Loaded += OnImageLoaded;
         MainImage!.Loaded += OnImageLoaded;