9

One example would be the new notification APIs for Windows 10 universal platform. Can I use this set of APIs in a WPF app? If so are there any limitations?

Links to documentation regarding this would be much appreciated.

4
  • Yes. Getting help for such a broad question. Commented Nov 13, 2015 at 12:46
  • That's a general question that I couldn't find an answer to on the web. I want to add notification support for a wpf app but I couldn't find any helpful resources on the web. Commented Nov 13, 2015 at 13:13
  • So what was the point in asking for "limitations"? Just ask about the real problem you are trying to solve. Commented Nov 13, 2015 at 13:21
  • I edited my question to make the limitation part clearer. Commented Nov 13, 2015 at 16:18

2 Answers 2

12

It is possible to use UWP APIs in a WPF app. However not all UWP APIs can be used in a WPF app.

There are exceptions to the rule that Windows 10 APIs are accessible from PC software. The first big exception concerns XAML UI APIs. The XAML framework in UWP is different from the one in WPF and you really don’t want to be mixing them up, anyways.

The second set of APIs that you can’t use are ones that depend on an app’s package identity. UWP apps have package identities while PC software does not. Package identity information can be found in the app manifest file.

How do you determine which Windows 10 APIs require a package identity and which do not? The easiest way is to refer to this MSDN topic.

For how to access the Windows 10 APIs from WPF, please refer to this answer and also see the blog Calling Windows 10 APIs From a Desktop Application (Please note the name of the references in the blog is not right, so I'd suggest you refer the answer in SO).

Sign up to request clarification or add additional context in comments.

Comments

3

No, You can't - at least for now - But there's a progress on a project called "Centennial" Which will enable you to do so.

More see "bridges".

Yes, you can now.
https://blogs.windows.com/buildingapps/2017/01/25/calling-windows-10-apis-desktop-application/

1 Comment

Your post is outdated. ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.