Skip to content

feat: add Open With context menu for media files#754

Open
Copilot wants to merge 9 commits intomainfrom
copilot/add-open-with-feature
Open

feat: add Open With context menu for media files#754
Copilot wants to merge 9 commits intomainfrom
copilot/add-open-with-feature

Conversation

Copy link
Contributor

Copilot AI commented Dec 13, 2025

Adds an "Open With" menu item to context menus across all media views, allowing users to launch files in external applications via the Windows application picker dialog.

Implementation

  • New Command: OpenWithCommand uses Launcher.LaunchFileAsync() with DisplayApplicationPicker = true to show the native Windows "Open With" dialog

    • CanExecute validates the media source is a StorageFile to disable the menu item for unsupported sources (URLs, streams)
    • Exception handling with contextual logging for debugging
  • UI Integration: Added menu item to 12 pages and controls:

    • Video/folder views: AllVideosPage, FolderViewPage, FolderListViewPage
    • Music library: HomePage, SongsPage, AlbumDetailsPage, ArtistDetailsPage
    • Search: SearchResultPage, SongSearchResultPage
    • Playback: PlayQueueControl, PlayerControls
  • Localization: Added OpenWith resource string to en-US/Resources.resw

Usage

Right-click any media file → "Open With" → Select application from Windows picker

<MenuFlyoutItem
    Command="{StaticResource OpenWithCommand}"
    CommandParameter="{Binding}"
    Icon="{ui:FontIcon Glyph=&#xE8A7;}"
    Text="{strings:Resources Key=OpenWith}" />
private async Task OpenWithAsync(MediaViewModel? parameter)
{
    if (parameter?.Source is not StorageFile file)
        return;

    LauncherOptions options = new() { DisplayApplicationPicker = true };
    await Launcher.LaunchFileAsync(file, options);
}

Note: Uses Windows' native "Open With" dialog rather than custom favorites/pinning UI. Windows manages recently used apps automatically.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • crl.godaddy.com
    • Triggering command: /usr/bin/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Screenbox/.codeql-scratch/dbs/csharp/working/3256F08C1671F9FA0FA5343B5C71D01D/missingpackages_workingdir --packages /home/REDACTED/work/Screenbox/.codeql-scratch/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /home/REDACTED/work/Screenbox/.codeql-scratch/dbs/csharp/working/nugetconfig/nuget.config --force -l ox/Strings/en-US/Resources.resw .cs /home/REDACTED/.local/bin/grep OpenWithCommand .cs cal/bin/grep grep (dns block)
  • ocsp.godaddy.com
    • Triggering command: /usr/bin/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Screenbox/.codeql-scratch/dbs/csharp/working/3256F08C1671F9FA0FA5343B5C71D01D/missingpackages_workingdir --packages /home/REDACTED/work/Screenbox/.codeql-scratch/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /home/REDACTED/work/Screenbox/.codeql-scratch/dbs/csharp/working/nugetconfig/nuget.config --force -l ox/Strings/en-US/Resources.resw .cs /home/REDACTED/.local/bin/grep OpenWithCommand .cs cal/bin/grep grep (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>"Open With" Button + Favorite Applications</issue_title>
<issue_description>Add an "Open With" option that lets users quickly choose which app to open a file with, and allow favorite apps to be pinned for faster access.

Extra Ideas:

Separate preferred apps for audio, video, images, etc.

Add a simple Photo Viewer for quick image previewing.

Why:
This would make viewing and editing files faster, more flexible, and more user-friendly.</issue_description>

Comments on the Issue (you are @copilot in this section)

@United600 > Add an "Open With" option that lets users quickly choose which app to open a file with, and allow favorite apps to be pinned for faster access.

Wouldn't that be better handled by a file explorer? Sorry, but can you please elaborate on it and explain the use case? I'm having trouble understanding what you have in mind.</comment_new>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits December 13, 2025 04:18
Co-authored-by: huynhsontung <31434093+huynhsontung@users.noreply.github.com>
Co-authored-by: huynhsontung <31434093+huynhsontung@users.noreply.github.com>
Co-authored-by: huynhsontung <31434093+huynhsontung@users.noreply.github.com>
Co-authored-by: huynhsontung <31434093+huynhsontung@users.noreply.github.com>
Copilot AI changed the title [WIP] Add open with button for favorite applications feat: add Open With context menu for media files Dec 13, 2025
Copilot AI requested a review from huynhsontung December 13, 2025 04:29
@United600 United600 marked this pull request as ready for review February 14, 2026 21:59
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Feb 14, 2026
@United600
Copy link
Collaborator

The command can be a bit finicky with audio files, but refreshing the library resolves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Open With" Button + Favorite Applications

3 participants