【问题标题】:Synchronizing Desktop App Converter app settings across devices跨设备同步 Desktop App Converter 应用程序设置
【发布时间】:2018-05-31 07:10:24
【问题描述】:

Roaming settings options FAQ 在微软文档中说:

桌面桥可帮助您将现有的 Windows 桌面应用程序引入通用 Windows 平台。 从这里开始,只需最少的代码更改即可利用 Azure AD 应用程序数据漫游。桌面桥为您的应用程序提供应用程序标识,这是为现有桌面应用程序启用应用程序数据漫游所必需的。

但没有提及“最小的代码更改”是什么。

应用程序是否应该使用Windows.Storage.ApplicationData.Current.RoamingSettings API?我使用 C++ Win32。我是否需要加载 .NET 框架才能使用 API?还是有Win32的替代品?

【问题讨论】:

    标签: winapi uwp desktop-app-converter


    【解决方案1】:

    应用程序是否应该使用 Windows.Storage.ApplicationData.Current.RoamingSettings API?我使用 C++ Win32。我是否需要加载 .NET 框架才能使用 API?还是有Win32的替代品?

    首先,我想让您知道,并非所有 UWP API 都可用于通用桌面应用程序。请检查UWP APIs available to a packaged desktop app (Desktop Bridge)UWP APIs callable from a classic desktop app

    那么,详情请见Enhance your desktop application for Windows 10

    另外:

    某些 Windows 10 体验(例如:支持触控的 UI 页面)必须在现代应用容器内运行。如果您想添加这些体验,请使用 UWP 项目和 Windows 运行时组件扩展您的桌面应用程序。

    也请查看Extend your desktop application with modern UWP components 文档以获取更多参考。

    【讨论】:

    • 感谢您的回答。虽然它没有回答主要问题:“应用程序是否应该使用 Windows.Storage.ApplicationData.Current.RoamingSettings API?” - 答案看起来暗示,答案是“是” .但是你能确认一下吗?
    • @MartinPrikryl 感谢您的回复。 UWP APIs callable from a classic desktop app文档已经解释清楚了。 If the DualApiPartition attribute is listed,If the API does need the calling app to have a package identity then the API is not allowed to be called from a classic desktop app. But the API can be called from a classic desktop app that has been converted to a UWP app. Windows.Storage.ApplicationData is an example
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-26
    • 2019-08-05
    • 2017-09-17
    • 1970-01-01
    • 1970-01-01
    • 2018-06-03
    相关资源
    最近更新 更多