天天看點

與衆不同 windows phone (38) - 8.0 關聯啟動: 使用外部程式打開一個檔案或URI, 關聯指定的檔案類型或協定

<a href="http://files.cnblogs.com/webabcd/WindowsPhone.rar">[源碼下載下傳]</a>

與衆不同 windows phone (38) - 8.0 關聯啟動: 使用外部程式打開一個檔案或URI, 關聯指定的檔案類型或協定

介紹

與衆不同 windows phone 8.0 之 關聯啟動

使用外部程式打開一個檔案

使用外部程式打開一個 Uri

關聯指定的檔案類型

關聯指定的協定

示例

1、示範如何使用外部程式打開一個檔案

AssociationLaunching/LaunchFile.xaml

AssociationLaunching/LaunchFile.xaml.cs

2、示範如何使用外部程式打開一個 Uri(自定義協定)

AssociationLaunching/LaunchUri.xaml

AssociationLaunching/LaunchUri.xaml.cs

3、示範如何關聯指定的檔案類型(即用本程式打開指定類型的檔案)

AssociationLaunching/FileTypeAssociation.xaml

AssociationLaunching/FileTypeAssociation.xaml.cs

4、示範如何關聯指定的協定(即用本程式處理指定的協定)

AssociationLaunching/ProtocolAssociation.xaml

AssociationLaunching/ProtocolAssociation.xaml.cs

自定義 UriMapper,用于處理當本 app 由檔案打開或協定打開或鏡頭擴充打開或圖檔擴充打開時,導航到相關的處理頁面

MyUriMapper.cs

将此 app 的 UriMapper 設定為我們自定義的 UriMapper

App.xaml.cs

OK

繼續閱讀