質問

I am currently implementing a few snapped views, and I've ran into a problem I couldn't find an answer to. Perhaps you beautiful minds can help me out.

When I drag my app from a filled state to a snapped state, there is a period of about 1 - 1.5 secs where the old "filled" view is still displayed in the snapped viewspace. Doesn't look good! I would imagine there would be a standard behavior that should be applied here. Do I show the splash screen? Do I animate in items (and if so, what event should I listen for)?

Thanks for all help!

Edit: Here is a bit of simplified code from one of my views who experiences this lag - a search results page:

<Grid x:Name="LayoutRoot">
  <Grid x:Name="FullViewGrid">
    <!-- Two GridViews containing up to 27 items each (not very advanced) -->
  </Grid>
  <Grid x:Name="SnappedViewGrid">
    <!-- Two ListViews doing the same thing, with different item templates -->
  </Grid>
</Grid>

Basically I'm implementing my own spin of the standard Search Contract template given in VS2012. I have a feeling the CPU is being stressed a bit too much while rendering these changes in the UI - and that's why things aren't going too smoothly.

役に立ちましたか?

解決

Yeah, so this is something you are doing wrong. SnapView doesn't have a delay like that. If you are interested you can review my SnapView walkthrough: http://blog.jerrynixon.com/2012/12/walkthrough-implementing-snapview-in.html

Without a code sample from your app, this is the best I can offer right now. But hopefully this will be all you need to get on the right path for SnapView. Best of luck!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top