Skip to content

IncrementalUpdateBehavior

Jon W Chu edited this page Nov 16, 2015 · 4 revisions

IncrementalUpdateBehavior attaches to the DataTemplate inside ListViewBase controls (i.e. ListView and GridView). It enables deferred rendering for specified elements in the ItemTemplate used by the view.

By specifying the Phase property in markup, the rendering order of elements can be controlled.

Sample Code

XAML

<DataTemplate x:Key="GridViewItem">
    <StackPanel>
        <Rectangle>
            <Interactivity:Interaction.Behaviors>
                <Interactions:IncrementalUpdateBehavior Phase="2"/>
            </Interactivity:Interaction.Behaviors>
        </Rectangle>
        <TextBlock Text="{Binding Count}">
            <Interactivity:Interaction.Behaviors>
                <Interactions:IncrementalUpdateBehavior Phase="1"/>
            </Interactivity:Interaction.Behaviors>
        </TextBlock>
    </StackPanel>
</DataTemplate>