CoreTextServicesManager not working #3226
-
I want to create a custom textbox for the WindowsAppSdk, and came across the CoreTextServicesManager. I tried it, but it did not work, what am I doing wrong?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is expected. Anything that uses GetForCurrentView is basically getting an instance of this class attached to a CoreWindow. The issue is that CoreWindow isn't available at all in a desktop environment, which is what WinUI/Windows App SDK runs in. What this means is these runtime classes need some method to get an instance of the class attached to a HWND instead. There is documentation stating which of these runtime classes can currently be used in desktop applications and what you need to do to get an instance, but as you can imagine, it isn't that easy. According to this documentation, CoreTextServiceManager isn't supported in any release version of Windows and is only currently supported in the preview version of Windows. What's more, the documentation that lists the API mapping states that this is only available on Windows 11. So my thought is that currently there is no support for what you want to do and it will only become available in the next update for Windows 11. |
Beta Was this translation helpful? Give feedback.
This is expected. Anything that uses GetForCurrentView is basically getting an instance of this class attached to a CoreWindow. The issue is that CoreWindow isn't available at all in a desktop environment, which is what WinUI/Windows App SDK runs in.
What this means is these runtime classes need some method to get an instance of the class attached to a HWND instead. There is documentation stating which of these runtime classes can currently be used in desktop applications and what you need to do to get an instance, but as you can imagine, it isn't that easy.
According to this documentation, CoreTextServiceManager isn't supported in any release version of Windows and is only currently supp…