Skip to content

TianXiaTech/AppsFolderDialog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppsFolderDialog

logo

GitHub stars All releases Github forks All issues

Provide a dialog box to select installed app from local machine. image

the selected item is Application User Model ID ,You can run it in the following way

  • Run dialog
shell:appsfolder\xxx
  • C#
System.Diagnostic.Process.Start("explorer.exe","shell:appsfolder\xxx");

Example

System.Diagnostic.Process.Start("explorer.exe","shell:appsfolder\Microsoft.Windows.MediaPlayer32");  //open Windows Media Player

Preview

AppsFolderDialog.mp4

Usage

PM>NuGet\Install-Package AppsFolderDialog -Version 0.0.1
AppsFolderDialog.AppsFolderDialog appsFolderDialog = new AppsFolderDialog.AppsFolderDialog();
var result = await appsFolderDialog.ShowDialog();

if(result)
{
    //this.listbox.ItemsSource = appsFolderDialog.SelectedPath.ToList();
    foreach (var item in appsFolderDialog.SelectedPath)
    {
        switch(item.PathType)
        {
            case AppsFolderDialog.PathType.Absolute:
                //Absolute
                System.Diagnostics.Process.Start(item.Path);
                break;
            case AppsFolderDialog.PathType.AUMID:
                //AUMID
                System.Diagnostics.Process.Start("explorer.exe", item.Path);
                break;
            case AppsFolderDialog.PathType.Folder:
                //Folder
                break;
            default:
                break;
        }
    }
}

TODO

  • modify dialog title
  • append context menu
  • use win32 native button

LICENSE

Apache License