XAML relative size

How to size components to fit relative to parents in the tree:

Width=”{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}},Path=ActualWidth}”

Height=”{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Grid}},Path=ActualHeight}”

Leave a Reply

Your email address will not be published. Required fields are marked *