This project is read-only.

Top Toolbar in Document Viewer

Oct 1, 2010 at 11:59 AM
Edited Oct 1, 2010 at 12:04 PM


I'm using the "FixedPageViewer" from document toolkit controls for silverlight to display the xps document. I am using a Evaluation Version.  It is working fine and also displaying the document in the viewer.  But it is showing a toolbar at the top with the options like "Save A Copy", "Permissions", and a text search box. I don't want to display this toolbar. How can I remove this toolbar ?

My xaml code is:

<Grid x:Name="LayoutRoot" Style="{StaticResource PageGridStyle}" Width="700" Height="250.0" Canvas.Left="18.00" Canvas.Top="212.185">
                <RowDefinition />
                <RowDefinition Height="Auto" />

            <Grid x:Name="panel" Margin="8" Visibility="Collapsed" SizeChanged="panel_SizeChanged">
                <Border x:Name="border" Background="White" BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <DropShadowEffect Opacity=".5"/>
                    <controls:FixedPageViewer x:Name="pageViewer"
            <Grid x:Name="loading">
                <TextBlock x:Name="status" Style="{StaticResource StatusLoadingStyle}"  />

            <!-- controller -->
            <Border Grid.Row="1" Style="{StaticResource BorderStyle}">
                <controls:ControllerToolbar x:Name="controls"
                        <ControlTemplate TargetType="controls:ControllerToolbar">
                            <StackPanel x:Name="LayoutRoot" Orientation="Horizontal">
                                <TextBox x:Name="PageNumber" Width="36" TextAlignment="Right" Background="Transparent" BorderBrush="Transparent" />
                                <TextBlock Text="/" VerticalAlignment="Center" Margin="0,0,2,0" />
                                <TextBlock x:Name="PageCount" Width="44" VerticalAlignment="Center" Margin="0,2,0,2" />
                                <Button x:Name="PreviousPage" Padding="8" ToolTipService.ToolTip="Previous page">
                                        <Path Width="8" Height="8" Stretch="Uniform" Data="F1 M -1,0 L 1,-1 L 1,1 Z " Fill="Black" />
                                <Button x:Name="NextPage" Padding="8" ToolTipService.ToolTip="Next page">
                                        <Path Width="8" Height="8" Stretch="Uniform" Data="F1 M 1,0 L -1,-1 L -1,1 Z " Fill="Black" />
                                <Button x:Name="FullScreen" Margin="4,0,4,0" Padding="6" ToolTipService.ToolTip="Toggle full screen">
                                        <Path Width="12" Height="12" Stretch="Uniform" Data="F1 M .5,-1 L -1,-1 L -1,.5 L .5,.5 Z M 1,-.5 L -.5,-.5 L-.5,1 L1,1 Z " Stroke="Black" />

Thank you


Oct 1, 2010 at 5:38 PM

Hi Sujay,

Two things:

  1. The template you provided is from Document Toolkit v1. I highly recommend you to move to Document Toolkit v2, for it contains a much more flexible, performing and easier to understand model.
  2. The provided template does not contain 'save a copy', 'permissions' and search elements. Those elements are probably defined elsewhere.

Hope this helps,

- Koen

Oct 4, 2010 at 12:03 PM

Hi Koen,

I will download the Document Toolkit V2.0 and try to resolve my problem. I will update you on it ASAP. Just for a help can you give me link of document toolkit V2.0 setup file, the one which I downloaded only have a binaries and dosen't have the msi or setup file. Also if possible, Please help me by providing a links where I can get a sample for Fixed Page viewer for V2.0.

Thank you for your help.


Oct 4, 2010 at 12:50 PM

There is no msi, the download package is the one with the binaries. For a v2 sample of the FixedPageViewer see the FixedPageViewerSample in 2.0/FirstFloor.DocumentToolkit.Extensions\Sample Browser\SampleBrowser\Views\SampleSinglePage.xaml. 

- Koen