Modernizing Desktop Apps Part 1

Sign in to queue

The Discussion

  • User profile image
    cppForMe
    So this discussion leaves out how non-.NET desktop apps can take advantage of the platform. For example, an MFC or other Win32 C++ application. What's the path for calling these APIs for those situations?
  • User profile image
    adambr
    Have you seen CPP/WinRT - http://aka.ms/cppwinrt? You will need to have the Windows SDK installed to reference the headers. We are looking at ways to improve this in the future and would welcome your feedback and scenario. Either submit through the "Send Feedback" link in VS, or open an issue right on the documentation page - https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/consume-apis

    -Adam [MS]
  • User profile image
    MhAlan
    Please reduce video time, we don't have time for 40 minute, maximum should be 4 minutes.
  • User profile image
    Dinerobits
    Incredible information. Thank you.
  • User profile image
    Niner758377
    Calling Windows Hello from WPF as demonstrated but the UserConsentVerifier.RequestVerificationAsync pops up behind the WPF app and users will not know what to do.

    I tried Windows.UI.Xaml.Hosting.WindowsXamlManager.InitializeForCurrentThread()
    which seemed hopefull but it messed up subsequent calls to ADAL library
  • User profile image
    adambr
    I followed up with the API team, turns out the InitializeForCurrentThread() isn't enough. There are 2 solutions.

    The preferred solution is to implement the UserConsentVerifier interop interface (in UserConsentVerifierInterop.h) which has a RequestVerificationForWindowAsync() method where you pass in the parent window. This is the supported solution and you won't need to call InitializeForCurrentThread.

    I was experimenting when I had a XamlIsland on the same WPF window, that the UserConsentVerifier appeared parented correctly to the window w/o having to do the COM interop interface. I think there are still issues with xaml islands and multiple windows that pop dialogs getting parented correctly, so this may not solve all your scenarios.

    Try this and let me know if either solves your issue. Also let me know if either resolves the issue with ADAL. If it doesn't I may need a snippet of code or public GitHub repo.
  • User profile image
    RodAtWork
    I started to watch this video today. Quite relevant for my work situation. I'm only about half way through, so I've watched the part where Adam mentioned MSIX and Windows App Packaging Project (new to me). But I've got a question about this. From what I've seen so far, this is all done within VS 2017. That's good, as that's what we're using, but we also use TFS 2015. Recently, I became the TFS Admin, so I'd really like to see the deployment handled through the build process of TFS. Perhaps that is addressed in the rest of this video, but in case it isn't, how do I go about updating a MSIX project through TFS 2015's build process?
  • User profile image
    adambr
    RodAtWork - The video does not cover TFS scenarios. But TFS 2015 can be used to build VS2017 solutions as long a valid VS2017 SKU is installed in the build server.
  • User profile image
    Niner758377
    "The preferred solution is to implement the UserConsentVerifier interop interface (in UserConsentVerifierInterop.h) which has a RequestVerificationForWindowAsync() method where you pass in the parent window."

    Please show how to do this.
  • User profile image
    2HolerPoler

    As far as i can see the demo- code is not provided as a separate download. For someone not familiar with the APIs mentioned it is hard to follow the demo code if only the left half of it is displayed in the video.

    This is about coding, show the entire code, please.

  • User profile image
    OzBobWa
    Dotnet core 3 xaml 3 islands in a package can be submitted to store or sideloaded.

    Fails in this video but the working solution is in the 3rd video here: https://youtu.be/cuqOAGRwmzI?t=1314

Add Your 2 Cents