8.0 new initiators: Sharemediatask, Saveappointmenttask, Mapstask, Mapsdirectionstask, Mapdownloadertask
Introduced
Distinctive Windows Phone 8.0 new launcher
Sharemediatask-Shared media files
Sharemediatask-New Appointment to calendar
Mapstask-nokia Map
Mapsdirectionstask-nokia Map Driving route
Mapdownloadertask-Manage Nokia offline map
Example
1. Demo Sharemediatask-Shared media files
Launchers/sharemediataskdemo.xaml
<phone:phoneapplicationpage x:class= "Demo.Launchers.ShareMediaTaskDemo" xmlns= "http://schemas.microsoft.com/w Infx/2006/xaml/presentation "xmlns:x=" Http://schemas.microsoft.com/winfx/2006/xaml "xmlns:phone=" Clr-namespace: Microsoft.phone.controls;assembly=microsoft.phone "Xmlns:shell=" clr-namespace:microsoft.phone.shell;assembly= Microsoft.phone "xmlns:d=" http://schemas.microsoft.com/expression/blend/2008 "xmlns:mc=" http:// schemas.openxmlformats.org/markup-compatibility/2006 "fontfamily=" {StaticResource PhoneFontFamilyNormal} "FontSiz E= ' {StaticResource phonefontsizenormal} ' foreground= ' {StaticResource Phoneforegroundbrush} ' SupportedOrientations= "Portrait" orientation= "Portrait" mc:ignorable= "D" shell:systemtray.isvisible= "True" > <STACKPANEL&G
T <textblock name= "lblmsg" textwrapping= "Wrap"/> <button name= "Btndemo" content= "Demo" click=
"Btndemo_click"/> </StackPanel>
</phone:PhoneApplicationPage>
Launchers/sharemediataskdemo.xaml.cs
* * Sharemediatask-Shared media file * FilePath-the address of the media file that needs to be shared * Show ()-Pop-up Shared dialog box (contains a lot of provider, select a shared media file) * *
Using System.Windows;
Using Microsoft.Phone.Controls;
Using Microsoft.Phone.Tasks; namespace Demo.launchers {public partial class Sharemediataskdemo:phoneapplicationpage {public shareme
Diataskdemo () {InitializeComponent (); } private void Btndemo_click (object sender, RoutedEventArgs e) {//Select a picture Ph
Otochoosertask photochoosertask = new Photochoosertask ();
Photochoosertask.showcamera = true;
photochoosertask.completed + = photochoosertask_completed;
Photochoosertask.show (); } void Photochoosertask_completed (object sender, Photoresult e) {lblmsg.text = "file Address:" +
E.originalfilename; POPs up the Sharing dialog box, from which you select a provider to share the media file Sharemediatask sharemediatask = new Sharemediatask ();
Sharemediatask.filepath = E.originalfilename;
Sharemediatask.show (); }
}
}