How can I identify unsupported part of XAML specification
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.
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.
Re: How can I identify unsupported part of XAML specification
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.
Re: How can I identify unsupported part of XAML specification
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.
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.
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.
Code: Select all
<GroupBox.Header>
<TextBlock Cursor="Hand" ForceCursor="true" Text="Sign in" FontSize="32" Margin="10"/>
</GroupBox.Header>
If I load PasswordBox.xaml to Noesis XamlPlayer, then the cursor is correctly changed to Hand cursor when hovering the "Sign in" textbox.
Re: How can I identify unsupported part of XAML specification
Ah, I think I understand what you mean.
I need to implement this callback myself.
I need to implement this callback myself.
Code: Select all
/// 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);
Re: How can I identify unsupported part of XAML specification
Yes, exactly. I was going to answer you right now:
Code: Select all
// register callback to update cursor image
GUI::SetCursorCallback(0, &ChangeCursor);
Who is online
Users browsing this forum: Bing [Bot] and 1 guest