I have a GridView in a ListView contained in a ScrollViewer element.
I understand WPF draws only the visible data at runtime, for example on scrolling grids only th
The first thing I need to point out is that WPF renders using DirectX. If DirectX is not available, then the system automatically defaults to a software renderer (which is much slower).
Now, if DirectX is available (which is true in all full-blown computers, but not so on 'portable devices') the next problem you have is your graphics card's (or chip's) power.
I bring this up because you mentioned that your code uses styles on a portable device (that I'm assuming is not a laptop). If so, operations that are a piece of cake on a desktop computer might be extremely slow on your portable device.
Now, are your styles complex? or do they have a lot of render work? (i.e: complex gradients). If so, perhaps you could consider reducing (or eliminating) them from the application when it is being executed on your portable device.
WPF provides a nice way to determine if the hardware in which the software is being executed is capable of handling the load.
The code would be:
int RenderTier = (RenderCapability.Tier >> 16);
Now, if RenderTier == 0 then you have a video card (or chip) that cannot provide any kind of hardware acceleration, so all rendering wil be done using the WPF software renderer (on the CPU).
If RenderTier == 1, then you have partial acceleration. Some operations will be done on the graphics card, other on the CPU
if RenderTier == 2, you have full hardware acceleration, all rendering will be executed on the graphics card.