79424160

Date: 2025-02-09 00:59:48
Score: 1.5
Natty:
Report link

It can be done using :

private async void OnBrowserFolder(object sender, RoutedEventArgs e)
{
    var picker = new FolderPicker();
    IntPtr windowHandle = new WindowInteropHelper(Application.Current.MainWindow).Handle;
    WinRT.Interop.InitializeWithWindow.Initialize(picker, windowHandle);
    picker.SuggestedStartLocation = PickerLocationId.VideosLibrary;
    var folder = await picker.PickSingleFolderAsync();
    this.RecordingFolder.Text = folder.Path;
}

See https://learn.microsoft.com/en-us/windows/apps/develop/ui-input/display-ui-objects

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Chris