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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:05:10+00:00 2026-05-25T12:05:10+00:00

I have a some question about UI Virtualizing in StackPanel. <ScrollViewer> <StackPanel Orientation=Vertical> <!–item1.–>

  • 0

I have a some question about UI Virtualizing in StackPanel.

<ScrollViewer>
    <StackPanel Orientation="Vertical">
        <!--item1.-->
        <StackPanel Orientation="Horizontal" Margin="5">
            <Button/> 
            <TextBlock Text="oh hi."/>
        </StackPanel>        

        <!--item2.-->
        <StackPanel Orientation="Horizontal" Margin="5">
            <Button/> 
            <TextBlock Text="oh hi."/>
        </StackPanel>        

        <!--item3.-->
        <StackPanel Orientation="Horizontal" Margin="5">
            <Button/> 
            <TextBlock Text="oh hi."/>
        </StackPanel>        

        <!--item4.-->
        <StackPanel Orientation="Horizontal" Margin="5">
            <Button/> 
            <TextBlock Text="oh hi."/>
        </StackPanel>        

        ...


        <!--item9999.-->
        <StackPanel Orientation="Horizontal" Margin="5">
            <Button/> 
            <TextBlock Text="oh hi."/>
        </StackPanel>        

    </StackPanel>
</ScrollViewer>

I heared about WPF UI Virtualization.

and then, If I add a lot of controls in StackPanel, A UI Virtualization works automatic at this StackPanel?

I know StackPanel.VirtualizingStackPanel.IsVirtualizing has setted to True by default.

  • 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-25T12:05:11+00:00Added an answer on May 25, 2026 at 12:05 pm

    There’s nothing “virtual” about your example here, though. you’ve explicitly created 9999 items inside your stack panel.

    Virtualization is when some other itemscontrol (like a list, tree, grid) has a virtualizing panel inside of it, and the items control is generating/removing/reusing items as necessary to make it appear that the stack panel has 9999 items in it, when it really has only a few.

    the simplest comparison to your above would be a ListBox control, with an ItemsSource of a list of 9999 items in it, and a DataTemplate:

    <ListBox ItemsSource="{Binding Path=TheListOf9999Items}">
        <ListBox.ItemTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal" Margin="5">  
                    <Button/>   
                    <TextBlock Text="oh hi."/>  
                </StackPanel>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
    

    the listbox internally would have a virtualizing stack panel (its ItemsPanel) which would then generate items as necessary as you scroll up and down.

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

Sidebar

Related Questions

So, i have some question about xml Documents in Java. Can i get all
I have a question about reflection I am trying to have some kind of
I have a question about some functionality I'm trying to add to my jQuery
i have what i hope is a quick question about some code i am
I have a question about laying out some swing components. Say, I have a
I have a question about python mechanize's proxy support. I'm making some web client
I have two examples I have a question about. Let me explain via some
I'm currently developing some things in Python and I have a question about variables
This is a question I have wondered about for quite some time, yet I
I have some question about assembly, is it possible to convert ASCII code of

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.