Check whether graphing API is supported

This commit is contained in:
Han Zhang 2022-08-15 10:57:13 +08:00
commit 123de14d43

View file

@ -54,6 +54,12 @@ namespace // put the utils within this TU
bool IsGraphingModeEnabled()
{
static bool isGraphSupported = Windows::Foundation::Metadata::ApiInformation::IsMethodPresent("Windows.UI.Text.RichEditTextDocument", "GetMath");
if (!isGraphSupported)
{
return false;
}
static bool isChecked = false;
static bool isEnabled = false;