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 6085947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:41:47+00:00 2026-05-23T11:41:47+00:00

I’ve got a scroll viewer within a grid view and the scroll viewer takes

  • 0

I’ve got a scroll viewer within a grid view and the scroll viewer takes up a percentage of the screen.

Within the scroll viewer I have a listbox, which I add items to in code.

The problem is that I can’t get the listbox to take up all of the space available within the parent scrollviewer.

Just wondering if this is even possible.

Thanks,

Matt

EDIT:

<Grid x:Name="LayoutRoot" Background="White" Margin="0,8,0,0"     Loaded="LayoutRoot_Loaded">
    <Grid.RowDefinitions>
        <RowDefinition Height="0.06*"/>
        <RowDefinition Height="0.06*" />
        <RowDefinition Height="0.88*"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="0.155*"/>
        <ColumnDefinition Width="0.845*"/>
    </Grid.ColumnDefinitions>
  ...
   <ListBox x:Name="lstReportTypes" BorderBrush="Black" Margin="0" BorderThickness="0" Foreground="#FF737FE0" FontSize="10.667" Background="{x:Null}" SelectionChanged="lstReportTypes_SelectionChanged" Grid.Row="2" Grid.Column="1">
    <ListBoxItem Content="Item 1" Foreground="#FF737FE0" Background="Transparent" Cursor="Hand"/>
    <ListBoxItem Content="Item 2" Foreground="#FF737FE0" Background="Transparent" Cursor="Hand"/>
    <ListBoxItem Content="item 3dafasdfasdfasdfsdfasdfasdfasdf" Foreground="#FF737FE0" Background="Transparent" Cursor="Hand"/>
   </ListBox>

The code above is a small snippet of the code, the listbox appears in the correct position and with the correct width.
The items do not seem to take all of the parents width though, they all clip. If I select one of the items the selected outline is the correct width however.

Hope this extra information helps

  • 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-23T11:41:47+00:00Added an answer on May 23, 2026 at 11:41 am

    You don’t need a ScrollViewer if you intend to have only a ListBox inside, taking the whole space. A ListBox already displays scroll bars when its content exceeds the available space.

    You can separately control which scrollbar appears with ScrollViewer.HorizontalScrollBarVisibility="Hidden".

    If you have more elements in you ScrollViewer please give more details.

    EDIT:
    The XAML you provided gave me this result (with a pink backgound to show the listbox boundaries):

    Silverlight sample capture

    The whole listbox is scrolled and the items are clipped. Isn’t that the desired effect? If you want each listbox item to scroll separately you need to specify a custom ItemTemplate.

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

Sidebar

Related Questions

I have a text area in my form which accepts all possible characters from
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
this is what i have right now Drawing an RSS feed into the php,

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.