Provide a dialog box to select installed app from local machine.
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");
System.Diagnostic.Process.Start("explorer.exe","shell:appsfolder\Microsoft.Windows.MediaPlayer32"); //open Windows Media Player
AppsFolderDialog.mp4
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;
}
}
}
- modify dialog title
- append context menu
- use win32 native button