locked
How can I design snap view (fill view) with XAML RRS feed

  • Question

  • When I develop win8 metro APP with javascript & html5 , I can design snap view in stylesheet ,like:

    @media screen and (-ms-view-state: snapped) {

    xxxxx

    }

    but I did not find any documents about this with xaml.

    can anyone help me?

    Tuesday, June 26, 2012 1:19 AM

Answers

  • In Xaml you generally do this by setting up a "snapped" state in your VisualStateManager and then going to that state when the window is snapped. See the Snap sample for an example.

    Tuesday, June 26, 2012 1:31 AM
    Moderator

All replies

  • In Xaml you generally do this by setting up a "snapped" state in your VisualStateManager and then going to that state when the window is snapped. See the Snap sample for an example.

    Tuesday, June 26, 2012 1:31 AM
    Moderator
  • Also see the default VS templates (i.e. Grid/Split) for some more verbose examples of this.

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    Tuesday, June 26, 2012 6:53 AM
  • there is a discussion going on here as well...

    Can Bilgin
    Blog CompuSight

    Tuesday, June 26, 2012 7:13 AM
  • Hi,

    I'd like to suggest you to create your project with a GridApplication or SplitApplication template.

    There's a LayoutAwarePage class that could help to process the state changes of your page and the basic visualstates are already be added into the pages which created by the templates.

    By the way, you could also design your snap view with Blend for Visual Studio easily.


    Ouch Liu
    Welcome to visit by blog: Ouch@點部落
    Welcome to join the Designer x Developer group on Facebook: Facebook 設計x程式 社團

    Tuesday, June 26, 2012 7:18 AM