Search code examples
.netemulationtizentizen-wearable-sdk

Tizen Net bezel rotate event not triggered


Trying to begin development of widget for Galaxy Watch. Doing it in Visual Studio 2017. Using NET extension(based on Xamarin).... for debug using Tizen Emulator (Wearable 5.0). I'm trying to handle bezel rotate event. Here is the simplest code :

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

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

but my breakPoint inside of Rotate function is never triggered... If i put break point in construktor - it is yes triggered - so looks like environment is fine (compiled+deployed+running+attached...) any Ideas whats wrong ?


Solution

  • It seems you haven't set a RotaryFocusObject property for the IRotaryEventReceiver. The RotaryEvent of IRotaryEventReceiver will not be called unless a RotaryFocusObject is set.

    For more information, please read the API guide and consider adding the following lines to your Xaml file. https://samsung.github.io/Tizen.CircularUI/guide/IRotaryEventReceiver.html

    <w:CirclePage
      ...
    
      x:Name="MyCirclePage"
      RotaryFocusObject="{x:Reference MyCirclePage}">
    

    Also the line breakpoints should work if you are debugging with Wearable 5.0 emulator on the VisualStudio. Here's a list of features currently supported by the debugger for Tizen 5.0. https://github.com/Samsung/netcoredbg/wiki/Features