Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF Headered Content Control
    primarykey
    data
    text
    <p>Good Day,</p> <p>I have a Wizard Type application that uses a HeaderedControlControl on the top row of a grid and the Forward, Next, Cancel buttons on the bottom row of the grid.</p> <pre><code>&lt;Grid&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="*" /&gt; &lt;!-- HeaderedContentControl --&gt; &lt;RowDefinition Height="40" /&gt; &lt;!-- Navigation Buttwon Row --&gt; &lt;/Grid.RowDefinitions&gt; &lt;Border Grid.Row="0" Grid.Column="0" BorderThickness="1" BorderBrush="#FFF30A0A"&gt; &lt;HeaderedContentControl Content="{Binding Path=CurrentPage}" ClipToBounds="True" Header="{Binding Path=CurrentPage.Name}" ScrollViewer.CanContentScroll="True" /&gt; &lt;/Border&gt; &lt;/Grid&gt; </code></pre> <p>There are a total of 7 pages in the Wizard and everything is working fine so far except the layout of one of the pages. The following is the XAML markup for that page.</p> <pre><code> &lt;Grid Name="GridMain"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="0.5*" /&gt; &lt;RowDefinition Height="*" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;StackPanel Name="StackPanelRow0" Grid.Row="0"&gt; &lt;TextBlock Padding="5,1,2,3" Style="{StaticResource textblockBoldFont}" Text="{Binding DisplayName}" /&gt; &lt;TextBlock Padding="5,0,0,0" Text="Execute the Data Import and monitor its progress. Large files will take longer depending upon network connection." /&gt; &lt;/StackPanel&gt; &lt;Grid Name="GridSub" Grid.Row="1" ShowGridLines="True"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="0.5*" /&gt; &lt;RowDefinition Height="0.5*" /&gt; &lt;RowDefinition Height="0.5*" /&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Button Grid.Row="0" Command="{Binding BeginImport}" Content="Import" Style="{StaticResource BeginImport}" /&gt; &lt;TextBlock Grid.Row="2" Margin="5" Text="Review Information:" /&gt; &lt;TextBlock x:Name="ImportStatusMesage" Grid.Row="3" Margin="5,0,5,10" FontSize="18" Foreground="#FF00FF00" Style="{StaticResource DataImportCompletedStyle}" Visibility="Collapsed" /&gt; &lt;!-- PROBLEM OCCURS HERE --&gt; &lt;StackPanel Grid.Row="3" Background="#FF92B00E" Orientation="Horizontal"&gt; &lt;ListBox VerticalAlignment="Stretch" DisplayMemberPath="DisplayPath" ItemsSource="{Binding ImportGroupSelectedFiles}" /&gt; &lt;TextBlock Margin="10,0,0,0" Text="{Binding FileImportData}" /&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/Grid&gt; </code></pre> <p>The ListBox can have a total of up to 150 files. The problem I'm having is that when the application is initially launched, the size of the window is 500 x 400. When the listbox has that many files, I want to see the listbox with vertical scrollbars. Once I resize the window, the vertical scrollbars should go away. </p> <p>So far, I've tried setting the ListBox height (which I don't want to do as the user can resize the window), I've also tried changing the Grid Row to Auto, but that's not working either. Here is what I want the application to look like:</p> <p><img src="https://i.stack.imgur.com/SvAbT.png" alt="enter image description here"></p> <p>But this is how it appears right now:</p> <p><img src="https://i.stack.imgur.com/dm005.png" alt="enter image description here"></p> <p>This is when I use Snoop to examine the layout of the ListBox</p> <p><img src="https://i.stack.imgur.com/QwWu4.png" alt="enter image description here"></p> <p>Does anyone have any suggestions?</p> <p>TIA,</p> <p>coson</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload