06. Layout

Windows Store App Layout的準則

“content before chrome”





•創建視覺對齊的效果,每個結構和Windows 8的剪影都要清晰、對準


Layout 管理器是ViewGroup 的擴展,被設計用來控制子控件在屏幕上的位置。
Layouts 能相互嵌套,通過Layout 管理器的結合,使妳可以創建任意複雜的界面。
Content Layout Containers
  • Group Container

           Provides a header for content.


  • Expand Container

           Expands and collapses content via an expand button.


Item Layout Containers

  •  Tabbed Container

            Allows you to select a single page at a time.


  • Pivot Container

           Provides cyclical page navigation (supports content sliding using touch).    

Layout Items

  • Layout Items include the following productivity features:
  • Header for content.  
  • Adaptive padding/spacing for items and groups allowing you to build Windows 8 applications consistent with Microsoft’s UI guidelines.
  • Pixel-perfect layout of an individual control.
  • Visual highlighting of focused items.
  • Accenting of required editors.
  • Headers can be positioned at the left or above the editor.
  • Keyboard focus can be automatically propagated to the editor when item is tapped.

 Layout Groups

  • Layout Groups include the following productivity features:
           Vertical and horizontal orientation of items.


  • Automatic alignment of item headers.


  • Auto-sizing and proportional stretching of items.


  • Expansion and collapse.