2012-05-14 55 views

回答

1

你是對的。不可能。你可以嘗試構建一個mailto Uri並啓動它

2

這是正確的。股份合同也適用於其他應用程序,即Tweetro,它不使用電子郵件地址,因此用戶必須每手輸入一個電子郵件地址。 mailto Uri不起作用,它必須是有效的Uri,否則將不會顯示。請參閱http://msdn.microsoft.com/en-US/library/windows/apps/hh465261瞭解您可以設置爲通過超級按鈕共享的所有選項。

0

可以使用Uri方案來打開一個應用程序,但你需要使用LaunchUriAsync。此外,如果用戶沒有安裝該應用程序,Windows會將其帶到應用商店。

例如,這裏是我的方法,只有打開郵件應用程序在屏幕的一側(我用它的錯誤報告),或者如果他們已經安裝了Outlook將使用它來代替:

private async Task<bool> ReportErrorMessage(string detailedErrorMessage) 
{ 
    var uri = new Uri(string.Format("mailto:[email protected]?subject=Error Report&body={0}", detailedErrorMessage), UriKind.Absolute); 

    var options = new Windows.System.LauncherOptions 
    { 
     DisplayApplicationPicker = true, 
     DesiredRemainingView = Windows.UI.ViewManagement.ViewSizePreference.UseLess, 
     PreferredApplicationPackageFamilyName = "microsoft.windowscommunicationsapps_8wekyb3d8bbwe", 
     PreferredApplicationDisplayName = "Mail" 
    }; 

    return await Windows.System.Launcher.LaunchUriAsync(uri, options); 
} 

在電子郵件uri的情況下,應用程序已經安裝,所以它應該對每個用戶同等工作。此外,如果您知道FamilyPackageName,則可以設置要使用的首選應用程序。

Find more information about using the uri launcher here.

相關問題