I did a test from MSDN UWP sample which worked in WPF, at least on my OS (Windows 10 21H1)
Change the SDK version in those paths if it is different in your installation (mine is 10.0.19041.0):
// Add reference to : "C:\Program Files (x86)\Windows Kits\10\References\10.0.19041.0\Windows.Foundation.UniversalApiContract\10.0.0.0\Windows.Foundation.UniversalApiContract.winmd"
// Add reference to : "C:\Program Files (x86)\Windows Kits\10\References\10.0.19041.0\Windows.Foundation.FoundationContract\4.0.0.0\Windows.Foundation.FoundationContract.winmd"
// Add reference to : "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.WindowsRuntime.dll"
// Add reference to : "C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.19041.0\Facade\Windows.winmd"
Test with a random file "E:\butterfly.png", in a Button click :
private void Button_Click(object sender, RoutedEventArgs e)
{
LaunchUri();
}
private async void LaunchUri()
{
string sPath = @"E:\butterfly.png";
var file = await Windows.Storage.StorageFile.GetFileFromPathAsync(sPath);
var sToken = Windows.ApplicationModel.DataTransfer.SharedStorageAccessManager.AddFile(file);
var sUri = String.Format("ms-screensketch:edit?source=MyApp&isTemporary=false&sharedAccessToken={0}", sToken);
bool bResult = await Windows.System.Launcher.LaunchUriAsync(new Uri(sUri));
if (bResult)
{
// URI launched
}
else
{
// URI launch failed
}
}
and I get the file correctly opened (french version of Snip & Sketch) :