Bind RelativeSource's AncestorType's Path
<StackPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
TextBlock.FontSize="12" >
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type StackPanel}, AncestorLevel=2},Path=Orientation}" />
</StackPanel>
</StackPanel>
Related examples in the same category