Hello, I have problem with filling control.
In first column I have stackpanel and it has 4 controls. Every ScrollViewer as DataContext has TreeView, which has Height set as Auto. When I expand nodes in my treviews it expands out of window. How can I fix it ?
<Grid x:Name="MainGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width=".30*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width=".69*"/>
</Grid.ColumnDefinitions>
<Border CornerRadius="0" BorderBrush="#58290A"
BorderThickness="5" Grid.Column="0" >
<StackPanel MaxHeight="{Binding Height, ElementName=MainGrid}">
<ScrollViewer x:Name="ScrollViewerForOperationTree">
</ScrollViewer>
<Button Content="Dodaj brakujący hotel" Click="AddHotel_Click" x:Name="btnAddHotel">
</Button>
<Button Content="Dodaj brakujące miasto" Click="AddCity_Click" x:Name="AddCity"></Button>
<ScrollViewer x:Name="ScrollViewerForSimpleTree"></ScrollViewer>
</StackPanel>
</Border>
<GridSplitter HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Grid.Column="1" ResizeBehavior="PreviousAndNext"
Width="5" Background="#FFBCBCBC"/>
<Grid Grid.Column="2" Background="#B5CBEF" x:Name="GridObjectOperation">
</Grid>
</Grid>