nikobarli
Topic Author
Posts: 178
Joined: 26 Apr 2017, 06:23

How can I identify unsupported part of XAML specification

07 Jun 2017, 10:35

Hi,

For example, when I read the document of FrameworkElement here: https://www.noesisengine.com/docs/Gui.C ... ement.html,
is it OK to assume that all methods/properties described there are supported ? If no, how can I identify the ones that are unsupported.

For example, it seems that the Cursor and ForceCursor are not implemented yet. But I couldn't be sure about that.

Thanks.
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: How can I identify unsupported part of XAML specification

07 Jun 2017, 19:09

Everything you see in class documentation is supported and implemented. That documentation is automatically generated from the source code and updated with each new version, so it is quite synchronized with the implementation. Of course, there could be bugs. The Cursor property is implemented, in fact it is already being used in our default themes. You need to subscribe to the mouse callback in IntegrationAPI.h header to get notified when the cursor changes. Client code is in charge of updating window cursor.
 
nikobarli
Topic Author
Posts: 178
Joined: 26 Apr 2017, 06:23

Re: How can I identify unsupported part of XAML specification

08 Jun 2017, 08:44

I tried to set the cursor from XAML but it doesn't work.

Using C++ SDK Src\Samples\D3D11\Tutorial05 as a start point, I modified a line inside PasswordBox.xaml to change the cursor when the mouse hovering the "Sign in" text.
        <GroupBox.Header>
            <TextBlock Cursor="Hand" ForceCursor="true" Text="Sign in" FontSize="32" Margin="10"/>
        </GroupBox.Header>
However, the cursor doesn't change when I run the Tutorial05.exe.

If I load PasswordBox.xaml to Noesis XamlPlayer, then the cursor is correctly changed to Hand cursor when hovering the "Sign in" textbox.
 
nikobarli
Topic Author
Posts: 178
Joined: 26 Apr 2017, 06:23

Re: How can I identify unsupported part of XAML specification

08 Jun 2017, 10:28

Ah, I think I understand what you mean.

I need to implement this callback myself.

    /// Sets the callback used for updating the mouse cursor icon
    typedef void (*UpdateCursorCallbackFn)(void* user, Cursor cursor);
    NS_GUI_CORE_API void SetCursorCallback(void* user, UpdateCursorCallbackFn updateCursorCallback);
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: How can I identify unsupported part of XAML specification

08 Jun 2017, 10:48

Yes, exactly. I was going to answer you right now:
// register callback to update cursor image
GUI::SetCursorCallback(0, &ChangeCursor);

Who is online

Users browsing this forum: ivan.fuertes and 2 guests