xamarin.forms - Xamarin 形成未在用户控件上触发的未聚焦事件
问题描述
我基于 ContentView 创建了一个简单的 Xamarin Forms 用户控件。由于 ContentView (最终)是一个 VisualElement,我假设内置的 Unfocused 事件会按预期工作。但是,虽然我可以订阅我的用户控件的 Unfocused 事件,但该事件永远不会触发。(与 FocusChangeRequested 事件相同,事实证明。) Xamarin.Forms.VisualElement.Unfocused 事件的 Xamarin 文档是神秘的:
This event is not bubbled through the Forms stack and is received directly from the native control.
如何在 Xamarin Forms 用户控件中实现 Unfocused 事件?当用户控件失去焦点时,或者当另一个控件接收到允许我触发 Unfocused 事件的焦点时,我可以在 Xamarin Forms 环境中拦截某些东西吗?
解决方案
推荐阅读
- ssl - 如何获取对 Weblogic 域定义的身份和信任存储的引用?
- python - 是否可以将 NumPy 函数映射到 tf.data.dataset?
- javascript - 存在数据时出现错误“无法读取未定义的属性 'url'”
- mysql - 比较同一表中的两个元素并返回差异/缺失数据
- css - 在输入标签内添加按钮
- python - 如何结合日期和时间?
- jquery - 我为闪烁效果和不透明度创建了按钮。当我单击按钮时,不透明度正在工作,但闪烁效果不起作用
- javascript - 如何在 ReactJS 中将数据传递给表单?
- ios - 我想从另一个示例 iOS 应用程序调用我的 iOS 应用程序单元测试
- python-3.x - 一个=“蟒蛇”。我想要输出:python。任何可能的循环