1. Windows Phone 7 is a multitasking operating system, but allows only one third-party application to run in the foreground
2. Initiators and selectors provide an indirect way for applications to access the built-in functionality of the phone.
Some built-in initiators: Emailcomposetask, Marketplacedetailtask, Marketplacehubtask, Marketplacereviewtask, MarketplaceSearchTask , Mediaplayerlauncher, Phonecalltask, Searchtask, Smscomposetask, Webbrowsertask.
Some of the built-in selectors: Cameracapturetask, Emailaddresschoosertask, Phonenumberchoosertask, Photochoosertask, Saveemailaddresstask, Savephonenumbertask.
3. When the initiator or selector is started, the application enters the Deactivate state (note that it is not necessarily Tombstone) when the task is only written, the original application is reactivated and the application invokes the activated event. Page Triggers Onnavigationto event
4. If the application in Windows Phone 7 is tombstone, a new instance will be generated when the application is opened again, which calls the app and the constructor of the page, so our logical code is not placed in the constructor, but in the Application_ Code that writes the recovery status in activated, Onnavigationto events.
5. Determine if the network in Windows Phone 7 is available
if (Microsoft.Phone.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable ()) {// Code when the network is available} else {// The network is not available, give a hint}
Navigation classes in 6.Windows Phone 7: Phoneapplicationframe and PhoneApplicationPage. The alias navigation in Windows Phone 7 supports the following
<nav:UriMapper x:Key="nav">
<nav:UriMapping Uri="Home" MappedUri="/Pages/Views/Default.xaml"/>
<nav:UriMapping Uri="About-Us" MappedUri="/Pages/Views/Misc/About.xaml"/>
<nav:UriMapping Uri="Page/{number}" MappedUri="/Pages/Views/Books/Page{number}.xaml"/>
<nav:UriMapping Uri="Customers/{id}" MappedUri="/Pages/Views/Data/Page.xaml?action=getCustomer&id={id} "/>
<nav:UriMapping Uri="Products/{id}" MappedUri="/Pages/Views/Data/Page.xaml?action=getProduct&id={id} "/>
<nav:UriMapping Uri="Orders/{type}&{id}&{date}" MappedUri="/Pages/Views/Data/Page.xaml?action={type}&orderId={id} &orderDate={number}"/>
</nav:UriMapper>
7.wmappmanifest.xml: A metadata file containing application-specific data, including title, icon location, function, and so on.
8. Page Navigation Scheme
(1) Write the XAML file address directly in the XAML code, such as
<HyperlinkButton Content="Pasta" NavigateUri="/Pasta.xaml" Height="30" HorizontalAlignment="Left"
Margin="10,10,0,0" Name="hyperlinkButton1" VerticalAlignment="Top" Width="200" />
(2) using aliases for navigation in XAML code, you need to configure in App.xaml
(3) Using event handling, such as Navigationservice.navigate (New Uri ("/pasta.xaml", urikind.relative));