Getting an ancestor property value can be done by binding to its element name. Here's an example
<Grid Width="{Binding Width}" Margin="{Binding Margin}">
<Border BorderBrush=" #FF17447E" BorderThickness="5">
<StackPanel Name="MainStackPanel" Orientation="Vertical">
<ScrollViewer Height="{Binding ElementName=MainStackPanel, Path=ActualHeight}">
<ItemsControl ItemsSource="{Binding Rows, FallbackValue=Rows}" Background="Transparent">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<ContentPresenter Content="{Binding}" Height="30"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</StackPanel>
</Border>
</Grid>
As always, feel free to comment, or ask