Skip to content
Discussion options

You must be logged in to vote

It is C++, but it is possible to use this same functionality from C#. WinUI is based upon the same set of underlying components, so most of that should work as is. The biggest issue is with the call to DwmSetWindowAttribute, since that would have to be a platform invoke call.
This would mean that it is pretty trivial to convert between the two when working with the WinUI code, and WinRT component code in general.

namespace CsMeh
{
    public class NativeApi
    {
        //Platform invoke definition for DwmSetWindowAttribute
        [DllImport("dwmapi.dll")]
        public static extern int DwmSetWindowAttribute(IntPtr hwnd, int attribute, ref int value, int size);
    }

    public seale…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@stefanvd
Comment options

@DarranRowe
Comment options

@stefanvd
Comment options

@DarranRowe
Comment options

Answer selected by stefanvd
@stefanvd
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants