当前位置: 动力学知识库 > 问答 > 编程问答 >

windows 8 - How to create a nice add button to list view like in the Weather app?

问题描述:

Following these steps:

Open the Weather app.

Right click

Click on places

See that little item with the + symbol? I want to do something exactly like that, the looks and behaviour.

网友答案:

Assuming you are just trying to get some basic ideas about metro-ui controls and you are on Release Preview.

When you do right click, the control that's being triggered is called App Bar. The "place" button is a App Bar Command. Clicking on the button will take you to another page (HTML or XAML). This page contains a ListView control with GridLayout. You can dynamically change the ListView Template and assign different actions to the itemInvoke event.

Here is a quick tutorial for App Bar and commands: http://msdn.microsoft.com/en-us/library/windows/apps/hh465309.aspx

Here is a quick tutorial for List View control: http://msdn.microsoft.com/en-us/library/windows/apps/hh465496.aspx

分享给朋友:
您可能感兴趣的文章:
随机阅读: