Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 2.12 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Use all browser space in Silverlight application
  2. <UserControl x:Class="SilverlightXPSViewer.MainPage"
  3.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5.     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6.     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7.     xmlns:doc="http://schemas.firstfloorsoftware.com/documenttoolkit"
  8.     mc:Ignorable="d">
  9.     <Grid x:Name="LayoutRoot" Background="White" >
  10.         <Grid.RowDefinitions>
  11.             <RowDefinition Height="*"/>
  12.             <RowDefinition Height="40" />
  13.         </Grid.RowDefinitions>
  14.         <Grid.ColumnDefinitions>
  15.             <ColumnDefinition Width="150" />
  16.             <ColumnDefinition Width="*" />
  17.             <ColumnDefinition Width="*" />
  18.             <ColumnDefinition Width="140" />
  19.         </Grid.ColumnDefinitions>    
  20.         <doc:ThumbnailListBox x:Name="Thumbnails"  Grid.Row="0" Grid.Column="0"      DocumentDataSource="{Binding ElementName=DataSource}" PageIndex="{Binding PageIndex,     Mode=TwoWay, ElementName=PageNavigator}"/>
  21.         <doc:DocumentViewer x:Name="Viewer"  Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3"         DocumentDataSource="{Binding ElementName=DataSource}" Width="{Binding ElementName=MainWidth}"/>
  22.         <doc:DocumentDataSource x:Name="DataSource"  Grid.Row="0"    LoadError="DataSource_LoadError" />
  23.         <StackPanel Grid.Column="3" Grid.Row="1" Orientation="Horizontal">
  24.             <doc:PageNavigator x:Name="PageNavigator" Margin="0"
  25.                            PageCount="{Binding PageCount, ElementName=Viewer}"
  26.                            PageIndex="{Binding PageIndex, ElementName=Viewer, Mode=TwoWay}"/>
  27.             <doc:PageNavigator />
  28.         </StackPanel>
  29.  
  30.         <doc:ViewModePicker Grid.Row="1"  Grid.Column="0" x:Name="Collection"/>
  31.         <Button Width="200" Name="btnZoomIn" Grid.Row="1" Grid.Column="1" Cursor="Hand" Click="btnZoomIn_Click">Zoom In</Button>
  32.         <Button Width="200" Name="btnZoomOut" Grid.Row="1" Grid.Column="2" Cursor="Hand" Click="btnZoomOut_Click">Zoom Out</Button>
  33.     </Grid>
  34. </UserControl>