Tuesday, June 25, 2013

Sync to ancestors properties


<Canvas>

  <DockPanel
      Width="{Binding RelativeSource=
                {RelativeSource FindAncestor,
                AncestorType={x:Type Canvas}},
                Path=ActualWidth}"
      Height="{Binding RelativeSource=
                {RelativeSource FindAncestor,
                AncestorType={x:Type Canvas}},
                Path=ActualHeight}">
  </DockPanel>
</Canvas>

No comments:

Post a Comment