Windows Phone 7 弹出窗口
我使用过一个使用弹出窗口类型的应用程序。 当您单击某些特定内容时,“弹出窗口”会从屏幕底部向上滚动并填充整个窗口。如果我没记错的话它是半透明的。它有几个文本部分和一系列按钮。这是什么样的控制?
Ive used an app which uses a type of popup window.
When you click on some specific, a 'popup' scrolls up from the bottom of the screen and fills the whole window. If i remember correctly its semi transparent. It has several text sections and a range of buttons on it. What sort of control is this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
coding4fun Windows Phone 工具包包含一个正确运行弹出窗口(用于“关于”框)的示例。我发现它非常有用。
http://coding4fun.codeplex.com/
The coding4fun Windows Phone Toolkit includes an example of doing a popup window (for an about box) that works correctly. I've found it very useful.
http://coding4fun.codeplex.com/
您应该避免 Popup 类。在最近的 PDC 上,他们说这不是硬件加速之类的。我会在页面底部放置一个 Canvas 或 Grid 或两者的组合(因此它位于顶部,但您也可以设置 Z 顺序)并将其翻译到屏幕之外。然后将其动画化。如果您在更改布局或使用资源时遇到问题,请查看不使用时折叠控件。
我自己,因为我已经有几年的经验了,我会编写一个新的控件并使用部件和状态模型来打开和关闭它等。但是如果您是 Silverlight 的新手,那么这可能是一个头 -罐。
如果您希望全面学习 Silverlight,请查看 Karen Corby 的关于控件创作的 MIX08 课程。事实上,请查看 http://videos.visitmix.com/
http://videos.visitmix.com/MIX08/T20
卢克
You should avoid the Popup class. At the recent PDC they said it wasn't hardware accelerated or something. I'd place a Canvas or Grid or combo of both at the bottom of the page (so its on top, but you can also set Z order) and translate it off the screen. Then animate it on. Look at Collapsing the control when not used if you're having problems with it altering layout or using resources.
Myself, as I've a few years under my belt, I'd write a new control and use the parts and states model to transition it on and off etc. but if you're new to Silverlight then this is maybe a head-jar.
If you expect to be learning Silverlight fully, check out Karen Corby's MIX08 session on control authoring. In fact, check out all the sessions at http://videos.visitmix.com/
http://videos.visitmix.com/MIX08/T20
Luke
这可能是 popup class 用于实际弹出窗口以及使用的其他支持控件(按钮、文本块等)。
It was probably the popup class for the actual popup window with other supporting controls (buttons, textblock, etc) being used.