Browse Source

Set Viewbox logical parent.

Fixes `DataContext` binding in `Viewbox.Child`.
pull/9274/head
Steven Kirk 4 years ago
parent
commit
4740955ef4
  1. 1
      src/Avalonia.Controls/Viewbox.cs

1
src/Avalonia.Controls/Viewbox.cs

@ -42,6 +42,7 @@ namespace Avalonia.Controls
// can be applied independently of the Viewbox and Child transforms.
_containerVisual = new ViewboxContainer();
_containerVisual.RenderTransformOrigin = RelativePoint.TopLeft;
((ISetLogicalParent)_containerVisual).SetParent(this);
VisualChildren.Add(_containerVisual);
}

Loading…
Cancel
Save