Windows 8 Metro style listbox

≡放荡痞女 提交于 2019-12-07 02:11:38

问题


I'm building a wpf metro style application, but for the start, page I needed to create Windows 8 start screen like listbox in windows 7 and .NetFramework 4.0.

I used Listbox and Wrappanel now, but as you see it's not clear!!!

Please help me to fill the blank cell.

EDIT change place of buttons


回答1:


look at : http://www.codeproject.com/Articles/370650/Simple-Metro-Style-Panorama-Control-for-WPF by Sacha Barber




回答2:


this is not trivial at all... even microsoft guys told me that on a recent training I had..

I recommend following the following article which has something very close to what you need!

http://tozon.info/blog/post/2012/09/01/Variable-sized-grid-items-in-Windows-8-apps.aspx

Hope it helps!




回答3:


VariableSizeWrapGrid does the trick :

<GridView>
  <GridView.ItemsPanel>
    <ItemsPanelTemplate>
      <VariableSizeWrapGrid ItemHeight="100" ItemWidth="150"/>
    </ItemsPanelTemplate>
  </GridView.ItemsPanel>   
</GridView>

Example of result :




回答4:


Use a WrapPanel for layout and you're done:

<ListBox>
  ...
  <ListBox.ItemsPanel>
    <ItemsPanelTemplate>
      <WrapPanel />
    </ItemsPanelTemplate>
  </ListBox.ItemsPanel>
</ListBox>


来源:https://stackoverflow.com/questions/11815235/windows-8-metro-style-listbox

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!