2

I am currently working on a project where I have an ItemsControl binded to a list of players to display a scoreboard. When the list is updated and the playerscores changed I want the players to slide to their new position.

This works already using the TranslateTransform Property on each element, but only with about 15-20 FPS (~50-70ms per Frame) so you see its not fluid. This is due to the circumstance that to repaint the ItemsControl, I have to call the NotifyOfPropertyChange method so it repaints itselft, but it repaints all the elements.

Since it is just a display board, I cant work with user interactions but have to base all on pure code.

So my question would be, is there a way to repaint only specific elements of an ItemsControl or is there another way to display a list where I can access the members one by one?

<Grid Width="500" Height="120">
        <Grid.RenderTransform>
            <TranslateTransform X="{Binding TransformHorizontal}" Y="{Binding TransformVertical}" />
        </Grid.RenderTransform>
</Grid>

That is the surrounding grid I use for each element binding to the element-properties TransformHorizontal and TransformVertical I can set individually for each element.

Boden_Units
  • 83
  • 2
  • 7
  • If the TransformHorizontal and TransformVertical properties are raising a PropertyChanged event, the TranslateTransform would automatically update the item position, without any need to "repaint" the entire ItemsControl. That said, a common approach to draw items at absolute positions is to use a Canvas as ItemsPanel as e.g. shown [here](http://stackoverflow.com/a/22325266/1136211). – Clemens Feb 16 '16 at 15:19

0 Answers0