visual-studio - 是否可以在 Windows Phone 8 应用程序中创建自定义路由事件?

标签 visual-studio user-controls windows-phone-8 routed-events

我有一个用户控件,我目前正在尝试根据本教程在其中实现自定义路由事件:http://msdn.microsoft.com/en-us/library/ms752288.aspx

我收到一条错误消息,指出“当前上下文中不存在名称‘EventManager’”。
我试图通过写 using System.Windows.EventManager 来添加它但没有这样的命名空间。
问题是是否有可能在 Windows Phone 8 应用程序中创建自定义路由事件?

最佳答案

您无法在 WP8 中创建任何自定义路由事件。相反,您可以将依赖属性与 I 命令一起使用。因此,您可以根据自己的意愿安排事件。尝试这个:
handling event of user control in its holding page's code behind .

关于visual-studio - 是否可以在 Windows Phone 8 应用程序中创建自定义路由事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13845034/

相关文章:

c# - ReSharper 在 "else"上自动插入大括号

c# - 带有浏览按钮作为用户控件的 WPF 路径文本框

c# - Windows 手机 : RemoveBackEntry after navigate failing

c# - 从 Tap 事件获取绑定(bind)对象

c# - 尝试更改 AppBar 项的 IsEnabled 属性时出现 NullReferenceException 错误

visual-studio - 如何在 windows 和 mac 中运行 Visual Studio 预构建事件?

c++ - Qt 5.6 测试版 Visual Studio 2015

.net - 需要 AAP 建议 : (Linq or SqlDataSource? ) + (Response.Write 或用户控件或中继器?

c# - 纯粹用于设置断点的微小的伪造代码 stub (不会产生编译器警告)

c# - UserControl 属性绑定(bind)不更新 DataContext