Jump to content

User:Krantips/VirtualizingPanel

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Cydebot (talk | contribs) at 23:47, 13 January 2019 (Robot - Removing category Articles created via the Article Wizard per CFD at Wikipedia:Categories for discussion/Log/2019 January 6.). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

VirtualizingPanel


References

[edit]
[edit]

In this context, "virtualize" refers to a technique by which a subset of user interface (UI) elements are generated from a larger number of data items based on which items are visible on the screen. It is intensive, both in terms of memory and processor, to generate a large number of UI elements when only a few may be on the screen at a given time. Through functionality that is provided by VirtualizingPanel, VirtualizingStackPanel calculates visible items and works with the ItemContainerGenerator from an ItemsControl (such as ListBox or ListView) to only create UI elements for visible items.

Examples The following example demonstrates how to use the derived VirtualizingStackPanel class in Extensible Application Markup Language (XAML).

<StackPanel DataContext="{Binding Source={StaticResource Leagues}}">

   <TextBlock Text="{Binding XPath=@name}" FontFamily="Arial" FontSize="18" Foreground="Black"/>
       <ListBox VirtualizingStackPanel.IsVirtualizing="True" 
                ItemsSource="{Binding XPath=Team}" 
                ItemTemplate="{DynamicResource NameDataStyle}"/>      

</StackPanel>