WinUI still needs the WinForm component
I am working on the Windows Desktop Application. Of Course, Now is 2025. I am building a new Windows application, and I think that WinUI is one of the best options I can think of.
However, WinUI is a kind of platform-independent, if you still need to access the local function such as the File Dialog, You still use to have Interpo.
var picker = new FileOpenPicker();
picker.FileTypeFilter.Add(".json");
picker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
WinRT.Interop.InitializeWithWindow.Initialize(picker, hwnd);
Here is the example
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
No feedback yet
Form is loading...