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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:41:07+00:00 2026-05-27T05:41:07+00:00

I´m filling a listbox with a specific data, the code works fine, but I

  • 0

I´m filling a listbox with a specific data, the code works fine, but I need to add a scrollviewer to the listbox because there are many elements inside, I tried to use a ScrolViewer and put inside the listbox, but doesn’t work, here is the code

<StackPanel x:Name="Sites" Grid.Row="1"  Orientation="Vertical">
    <ListBox x:Name="ListSites" >
       <ListBox.ItemTemplate>
          <DataTemplate>
            <Button Width="460" Height="120" Click="click" Name="btn">
             <Button.Content>
              <StackPanel Orientation="Vertical" Height="100" Width="460">
                <TextBlock Width="460" Name="txtname" FontSize="22" Text="{Binding name}" Height="40" Foreground="CadetBlue" />
                <TextBlock Width="460" Name="txtUrl" FontSize="22" Text="{Binding Url}" Height="60"/>
               </StackPanel>
              </Button.Content>
              </Button>
             </DataTemplate>
         </ListBox.ItemTemplate>
      </ListBox>
  </StackPanel>
  • 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-27T05:41:08+00:00Added an answer on May 27, 2026 at 5:41 am

    If the ListBox is not given infinite space for height then it should automatically scroll when items overflow its boundaries. For instance, if the second Grid row outside your stackpanel has explicit or ‘star’ height set, the scrollbar in the listbox will show up automatically.

    See also: Silverlight: Difficulty with ScrollViewer

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

Sidebar

Related Questions

I'am filling tables in .net DataSet with data. There is a nested relation between
I'm filling an XML document manually using C# and I need to have <data>
I am filling a GridView with the data table but on each row I
Often I find myself filling ASP.NET repeaters with items that need the CSS class
When filling in the info for the itunes connect for paid apps there are
How exactly filling bugs for the iPhone SDK with Apple works? I've always seen
I have a list box control which I am filling from the page's code
I have a listbox in my silverlight usercontrol and I am filling it with
I'm filling an NSOutlineView with data that I format using NSAttributedString. So far I
I have a division filling it with panels. But inside the division the panels

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.