Note that there are some explanatory texts on larger screens.

plurals
  1. POUse all browser space in Silverlight application
    text
    copied!<p>I am currently writing a Silverlight application that will view documents. The main panel is a WrapPanel with controls on the left and bottom of the page. Currently, the WrapPanel width is getting set to whatever it needs to be able to display all document pages on one line and I would like to change it so that it will fill up the rest of the browser window, with no horizontal scroll bar</p> <p>Here is my current xaml, where <code>&lt;doc:DocumentViewer x:Name="Viewer"..</code> is the wrap panel in question. </p> <pre><code>&lt;UserControl x:Class="SilverlightXPSViewer.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:doc="http://schemas.firstfloorsoftware.com/documenttoolkit" mc:Ignorable="d"&gt; &lt;Grid x:Name="LayoutRoot" Background="White" &gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="*"/&gt; &lt;RowDefinition Height="40" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="150" /&gt; &lt;ColumnDefinition Width="*" /&gt; &lt;ColumnDefinition Width="*" /&gt; &lt;ColumnDefinition Width="140" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;doc:ThumbnailListBox x:Name="Thumbnails" Grid.Row="0" Grid.Column="0" DocumentDataSource="{Binding ElementName=DataSource}" PageIndex="{Binding PageIndex, Mode=TwoWay, ElementName=PageNavigator}"/&gt; &lt;doc:DocumentViewer x:Name="Viewer" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" DocumentDataSource="{Binding ElementName=DataSource}" Width="{Binding ElementName=MainWidth}"/&gt; &lt;doc:DocumentDataSource x:Name="DataSource" Grid.Row="0" LoadError="DataSource_LoadError" /&gt; &lt;StackPanel Grid.Column="3" Grid.Row="1" Orientation="Horizontal"&gt; &lt;doc:PageNavigator x:Name="PageNavigator" Margin="0" PageCount="{Binding PageCount, ElementName=Viewer}" PageIndex="{Binding PageIndex, ElementName=Viewer, Mode=TwoWay}"/&gt; &lt;doc:PageNavigator /&gt; &lt;/StackPanel&gt; &lt;doc:ViewModePicker Grid.Row="1" Grid.Column="0" x:Name="Collection"/&gt; &lt;Button Width="200" Name="btnZoomIn" Grid.Row="1" Grid.Column="1" Cursor="Hand" Click="btnZoomIn_Click"&gt;Zoom In&lt;/Button&gt; &lt;Button Width="200" Name="btnZoomOut" Grid.Row="1" Grid.Column="2" Cursor="Hand" Click="btnZoomOut_Click"&gt;Zoom Out&lt;/Button&gt; &lt;/Grid&gt; &lt;/UserControl&gt; </code></pre>
 

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