Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7186753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:41:59+00:00 2026-05-28T18:41:59+00:00

I am currently writing a Silverlight application that will view documents. The main panel

  • 0

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

Here is my current xaml, where <doc:DocumentViewer x:Name="Viewer".. is the wrap panel in question.

<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">
    <Grid x:Name="LayoutRoot" Background="White" >
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="40" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="140" />
        </Grid.ColumnDefinitions>     
        <doc:ThumbnailListBox x:Name="Thumbnails"  Grid.Row="0" Grid.Column="0"      DocumentDataSource="{Binding ElementName=DataSource}" PageIndex="{Binding PageIndex,     Mode=TwoWay, ElementName=PageNavigator}"/>
        <doc:DocumentViewer x:Name="Viewer"  Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3"         DocumentDataSource="{Binding ElementName=DataSource}" Width="{Binding ElementName=MainWidth}"/>
        <doc:DocumentDataSource x:Name="DataSource"  Grid.Row="0"    LoadError="DataSource_LoadError" />
        <StackPanel Grid.Column="3" Grid.Row="1" Orientation="Horizontal">
            <doc:PageNavigator x:Name="PageNavigator" Margin="0"
                           PageCount="{Binding PageCount, ElementName=Viewer}"
                           PageIndex="{Binding PageIndex, ElementName=Viewer, Mode=TwoWay}"/>
            <doc:PageNavigator />
        </StackPanel>

        <doc:ViewModePicker Grid.Row="1"  Grid.Column="0" x:Name="Collection"/>
        <Button Width="200" Name="btnZoomIn" Grid.Row="1" Grid.Column="1" Cursor="Hand" Click="btnZoomIn_Click">Zoom In</Button>
        <Button Width="200" Name="btnZoomOut" Grid.Row="1" Grid.Column="2" Cursor="Hand" Click="btnZoomOut_Click">Zoom Out</Button>
    </Grid>
</UserControl>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:42:00+00:00Added an answer on May 28, 2026 at 6:42 pm

    Use the System.Windows.Browser.HtmlPage object to get the available screen size from the HTML DOM (thus letting the browser to tell you how much space there is) and set the control size from that.

    here’s an example:

    http://www.jeff.wilcox.name/2008/06/browserscreeninformation/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing an application that allows one to store images, and then tag
I'm writing a Silverlight application that is showing a pie chart of completed items
I'm currently writing an application that works with modules. The module part is all
I am writing a Large Scale Silverlight Application. I am currently writing the data
I am currently writing a simple, timer-based mini app in C# that performs an
I am currently writing a little bootstrap code for a service that can be
I'm working on a silverlight application that allows users to fill out common forms.
The application I'm currently writing is using MVVM with the ViewModel-first pattern. I have
I am currently writing a genre classification application as my final year project in
I'm currently writing some general purpose .net libraries that contain usual helper classes. For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.