-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement ApiInformation checks #14090
Conversation
/// Any WinRT API might not be available even if Windows version is supposed to support them (Win PE, Xbox...). | ||
/// Using ApiInformation is a typical solution in UWP/WinUI apps, so we should do as well. | ||
/// </summary> | ||
internal static unsafe class WinRTApiInformation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API could also be used in our WinRT Compositor classes to check where it is supported. But compositor APIs are a bit more complicated, as they are available pretty early for UWP, but Win32 handles support was introduced pretty late.
You can test this PR using the following package version. |
* Create wrapper for IApiInformationStatics * Use ApiInformation APIs to get if WinRT types are supported * Add some docs #Conflicts: # src/Windows/Avalonia.Win32/Input/WindowsInputPane.cs # src/Windows/Avalonia.Win32/WinRT/winrt.idl # src/Windows/Avalonia.Win32/WindowImpl.cs
What does the pull request do?
Any WinRT API might not be available even if Windows version is supposed to support them (Win PE, Xbox...).
Using ApiInformation is a typical solution in UWP/WinUI apps, so we should do as well.
Fixed issues
Fixes #14058
Fixes #14040