WP7如何制作带有磁贴的菜单?
我是 Silverlight 的新手,我相信我的问题很简单,但在任何地方都没有找到答案。所以,我有一个应用程序,我想让我的菜单看起来像 WP7 中的图块。我决定对每个图块使用按钮控件,但我有一种感觉,这不是最好的决定。当用户单击按钮时,该按钮会更改其设计(背景颜色、前景色等)以指示它已被单击。在我的 WP7 上,图块的设计有所不同。当用户单击它时,它会下降(下沉)以表明它已被单击。所以,我的问题是:是否有一种简单的方法来模拟自然的 Tiles 行为,当它们被单击时或者我必须在按钮控件上构建自己的行为?
提前致谢。干杯。
I am new to Silverlight and I believe my question is very simple, but haven't found an answer anywhere. So, I have an application and I want to make my menu to look like the tiles in WP7. I have decided to use a button control for every tile, but I have the feeling, that this isn't the best decision. When user clicks on a button, the button changes its design(background color, forecolor, etc.) to indicate, that it has been clicked. On my WP7 the tiles are designed differently. When user clicks on it, it kind of go downs(sinks) to indicate, that it has been clicked. So, my question is: Is there an easy way to simulate the natural Tiles behaviour, when they are clicked or I have to build my own behaviours on the button control?
Thanks in advance. Cheers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看 TileSlider。
TileSlider 是 Windows Phone 7 的一个控件,可让开发人员在其应用程序中呈现一个磁贴,其行为类似于将联系人固定到开始菜单时的磁贴。
Checkout TileSlider.
TileSlider is a control for Windows Phone 7 that lets the developer present a tile in their app that behaves like the tiles when you pin a contact to the start menu.
这种效应称为“倾斜效应”:
以下是链接,概述了效果和此处一些示例代码。
如果您不希望按钮在单击时更改颜色,可以创建
Button
默认模板的副本并对其进行编辑。This effect is called the "Tilt effect":
Here is a link for an overview of the effect and here some sample code.
If you don't want your buttons to change colors when clicked, you can create a copy of the
Button
default template and edit it.