dotnet / dotnet/maui

FilePicker default directory

Open
#9,212 12 comments 22 reactions 0 assignees View on GitHub
area-essentials proposal/open t/enhancement ☀️
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

I would love to have the ability to set a default directory in the FilePicker type. i.e. Set FilePicker to a specific directory when it displays to the user.

### Public API Changes

public class PickOptions
{
public PickOptions();


public static PickOptions Default { get; }


public static PickOptions Images { get; }

public string? PickerTitle { get; set; }

public FilePickerFileType? FileTypes { get; set; }

--> public string BaseDirectory? {get; set;}
}
}

### Intended Use-Case

In my application I have the ability for users to Open and Backup/Restore project files. Currently when "Open Project" is selected the FilePicker opens in the Documents directory. Being able to set a default directory for the picker to open too would save a lot of support issues once a production release is pushed out.

Contributor guide

Open the contributing guide

Research direction

Start by locating the FilePicker type and the PickOptions class described in the issue, then trace how picker options reach each supported platform. Define the default-directory behavior for the requested property and verify that existing picker title and file-type behavior remains unchanged across platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop-dev, mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.