WP7如何制作带有磁贴的菜单?

发布于 2024-10-09 20:25:48 字数 294 浏览 0 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

水晶透心 2024-10-16 20:25:49

查看 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.

冰葑 2024-10-16 20:25:48

这种效应称为“倾斜效应”:

Windows Phone 的倾斜效果
控件为您提供了以下能力
添加额外的视觉反馈
控制交互。而不是有
标准按下或未按下状态,
具有倾斜效果的控件提供
操纵过程中的运动。结果

触摸了控件。

以下是链接,概述了效果和此处一些示例代码。

如果您不希望按钮在单击时更改颜色,可以创建 Button 默认模板的副本并对其进行编辑。

This effect is called the "Tilt effect":

The tilt effect for Windows Phone
controls provides you with the ability
to add additional visual feedback for
control interaction. Instead of having
standard pressed or un-pressed states,
controls with the tilt effect provide
motion during manipulation. The result
is a “tilt” like response when the
control is touched.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文