未触发 Tizen Net 边框旋转事件

Tizen Net bezel rotate event not triggered

正在尝试开始为 Galaxy Watch 开发 widget。在 Visual Studio 2017 年完成。使用 NET 扩展(基于 Xamarin).... 使用 Tizen 仿真器(可穿戴 5.0)进行调试。 我正在尝试处理 bezel rotate 事件。这是最简单的代码:

    [XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MainPage : CirclePage,IRotaryEventReceiver
{
    public MainPage()
    {
        InitializeComponent();
    }

    public void Rotate(RotaryEventArgs args)
    {
        throw new NotImplementedException();
    }
}

但是我在 Rotate 函数中的 breakPoint 从未被触发... 如果我在 construktor 中放置断点 - 它是触发的 - 所以看起来环境很好(编译+部署+运行+附加...) 有什么想法吗?

您似乎还没有为 IRotaryEventReceiver 设置 RotaryFocusObject 属性。除非设置了 RotaryFocusObject,否则不会调用 IRotaryEventReceiver 的 RotaryEvent。

有关详细信息,请阅读 API 指南并考虑将以下行添加到您的 Xaml 文件中。 https://samsung.github.io/Tizen.CircularUI/guide/IRotaryEventReceiver.html

<w:CirclePage
  ...

  x:Name="MyCirclePage"
  RotaryFocusObject="{x:Reference MyCirclePage}">

如果您在 VisualStudio 上使用 Wea​​rable 5.0 模拟器进行调试,行断点也应该有效。以下是 Tizen 5.0 调试器当前支持的功能列表。 https://github.com/Samsung/netcoredbg/wiki/Features