locked
Changing the Backgroundcolor of GridViewItems while fast scrolling

    Question

  • Hello,

    if I scroll very fast in our App in a GridView or use the method "scrollViewer.ChangeView(...)" to restore the last scrollposition of the GridView after navigation back, the Tiles are shortly in a dark color until their ItemTemplate is applied. How can I change this Tile Backgroundcolor bevor the Tile is finally rendered? Now the color is very dark and the final Tile is light gray - this results in a kind of flicker. If I can set a lighter color then this effect should be not so drastically. But how?

    Thanks

    René

    Tuesday, January 20, 2015 2:38 PM

All replies

  • I tried to do something with it, but it might be the framework issue that will be fixed...
    Tuesday, January 20, 2015 3:00 PM
  • try to add this

    <GridView.ItemContainerStyle>
                    <Style TargetType="GridViewItem">
                        <Setter Property="Background" Value="Red" />
                    </Style>
                </GridView.ItemContainerStyle>


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Tuesday, January 20, 2015 3:11 PM
  • Hi,

    setting the ItemContainerStyle-Background to a color doesn't help. The Tile-Background while rendering remaind in a dark color:

    Here a screenshot to illustrate. The black Tiles remain under a second until the tile is rendered:

    Tuesday, January 20, 2015 4:35 PM
  • Hi Novan,

    Your post is off-topic in this forum.

    Can you please let us know which language and UI framework you are talking about so we can help you find the correct forum?

    --Rob

    Tuesday, January 20, 2015 4:48 PM
    Owner
  • Hello Novan,

    i think it is not possible to change the color, but you can use a workaround.

    You said it needs up to one second to load all the tiles correctly, right? Then you can create a smooth animation between the two Pages so you can animate the navigation.

    For example, you can bring the whole GridView to the left of the Page (out of the screen) an create an transition to load the Page to the center of the screen.

    And if this animation needs one second, the user won't see that you have a little bug :)


    © 2015 Thomas Roskop

    Germany // Deutschland

    Tuesday, January 20, 2015 4:52 PM
  • Hi Novan,

    Your post is off-topic in this forum.

    Can you please let us know which language and UI framework you are talking about so we can help you find the correct forum?

    --Rob

    Hi,

    it's a WinRT C# App with Xaml as UI (Universal App). I think it's the right forum for it.

    Tuesday, January 20, 2015 5:01 PM
  • While restoring the old scrollposition I use already scrollViewer.ChangeView(...) to smooth scroll. This does help a bit instead of jump direct to the scrollposition. But the animation of ChangeView(...) is a bit to fast. I can look at the Extended Toolkit. There is also a animated Extension for that. Maybe this is a bit slower.

    BUT:
    The user can manually scroll very fast through the list. Then he see this effect also. It is therefore not limitated to the scrollposition restore after navigation back.

    I will look tomorow at you linked page with Entry-Animation. Thanks.

    Tuesday, January 20, 2015 5:08 PM
  • it's a WinRT C# App with Xaml as UI (Universal App). I think it's the right forum for it.

    Thanks. I've moved it to the correct forum. You had posted in a design forum, not a development forum.
    Tuesday, January 20, 2015 5:28 PM
    Owner
  • Hi,

    we have on all Pages already an

    <Grid.ChildrenTransitions>
        <TransitionCollection>
            <EntranceThemeTransition/>
        </TransitionCollection>
    </Grid.ChildrenTransitions>

    I have read you linked article about it and experimented a bit with the FromHorizontalOffset

    Property of the EntranceThemeTransition to look if the default of 40 is too low. But: whatever I set as Value there (200, 400, 1000) nothing changes in the behaviour. The dark tiles remind while fast scrolling.

    Mybe the CPU-Power of the DELL Venue11 Pro is too low for it.

    @jinek: You mentioned it could be a framework but of WinRT? Should I report it (where?)?

    If someone has further ideas, please let me know them.

    Thanks
    Novan


    Wednesday, January 21, 2015 9:51 AM