Accept page in the load eventIf(Navigationcontext. querystring. containskey ("Username") {Tbusername. Text = navigationcontext. querystring ["Username"]. Tostring ();}
6. How can I disable the physical rollback key in Windows Phone 7?
Reference answer:Set E. Cancel = true in phoneapplicationpage_backkeypress
7. How to hide and display the system tray in Windows Phone 7?
Reference answer:In the post code, Microsoft. Phone. Shell.Systemtray. Isvisible =TrueOr you can also set it in XAML.
8. How many icons does the application bar support?
Reference answer: 4
9. Let's talk about common UI layout controls in Windows Phone 7.
Reference answer:Canvas: the absolute positioning control, which is fast and can be used in games.
Grid: Grid Positioning Control, commonly used Stackpanel: automatically locates controls, which are recommended for use with small areas.
10. Can I draw a picture of the application lifecycle in Windows Phone 7?
Reference answer:
11. Do you know the difference between the image generation method "resource" and "content?
Reference answer:The image generated as resource is compiled into the application assembly (DLL), and the image generated as content is deployed in the xap package.
12. what may happen when I click the physical rollback key of Windows Phone 7.
Reference answer:(1). When you click back-to-cycle, the program must return to the previous page
(2). If you click the back button on the first page of the program, the application must launch
(3) If your application is in a real dialog box or context menu, When you click the back button, Windows Phone 7 will automatically close the dialog box or context menu.
13. What are the differences between the starters, selectors, and starters you know?
Reference answer:Some built-in starters: emailcomposetask, marketplacedetailtask, marketplacehubtask, marketplacereviewtask, marketplacesearchtask, mediaplayerlauncher, phonecalltask, searchtask, smscomposetask, webbrowsertask.
Some built-in selectors: cameracapturetask, emailaddresschoosertask, phonenumberchoosertask, photochoosertask, saveemailaddresstask, savephonenumbertask
Difference: the initiator has no return value, and the selector has returned results.
14. What is the tombstone mechanism (tombstoning )? Why does this mechanism exist?
Reference answer:In Windows Phone, the operating system suspends the application because the user leaves the current application, but stores the instant status for restoration at any time. To ensure a fast and consistent user experience, Windows Phone only allows a unique application to use system resources to run on the foreground. Unlike the desktop operating system, window phone does not support running applications in the background. This is to prevent multiple applications from competing for limited mobile phone resources, thus avoiding rapid reduction in processing speed and battery power.
15. How can I determine whether the network in Windows Phone 7 is available?
Reference answer:Networkinterface provides the getisnetworkavailable method to determine whether the current network is Coco.
If(Microsoft. Phone. net. networkinformation.Networkinterface. Getisnetworkavailable ())
{// Code when the Network is available}
Else
{// Indicates that the network is unavailable.}
16. What is the use of wmappmanifest. XML in Windows Phone 7?
Reference answer:A metadata file that contains the specific data of the application, including the title, icon location, and functions.
17. There are several page navigation methods in Windows Phone 7.
reference answer: (1 ) directly write The XAML file address 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) When using aliases for navigation in XAML code, you must configure them in APP. XAML.
(3) Use event processing, such as navigationservice. navigate (NewUri ("/Pasta. XAML", Urikind. Relative ));
18. What is three red threads to be followed by application design in Windows Phone 7?
Reference answer:Personal, relevant, and connected (which can be described slightly)
19. How can we shake our cell phone?
Reference answer:DeclareVibratecontroller object, call itsStart Method
Vibratecontroller VIB = vibratecontroller. default;
VIB. Start (timespan. frommilliseconds (100 ));
20. What are common page la s in Windows Phone 7?
Reference answer:
21. Let's talk about the differences between httpwebrequest and WebClient.
Reference answer:1. httpwebrequest is an abstract class, so it cannot be new. You need to call httpwebrequest. Create ();
2. The method specifies the request type. Here, get and post are used. You can also specify the conenttype;
3. The requested URI must be an absolute address;
4. The request is asynchronous callback, starting from begingetresponse and specifying the callback method through asynccallback;
5. WebClient adopts the event-based asynchronous programming model. The WebClient callback triggered when an HTTP response is returned is called in the UI thread. Therefore, it can be used to update the attributes of the UI element, for example, bind the data in the HTTP Response to the specified control in the UI for display. Httpwebrequest is run based on background processes, and the callback is not a UI thread. Therefore, you cannot perform operations on the UI directly. Generally, dispatcher. begininvoke () is used to communicate with the interface.
22. What is enableframeratecounter in Windows Phone 7 used?
Reference answer:Monitor the frame rate when the program is running
23. How can I switch the keyboard input in the simulator to the physical keyboard of the Local Machine? The keyboard popped up in the simulator (or physical machine) is called sip. What is its full name?
Reference answer:You can use the pause/Break Key or Ctrl + Pageup (page down ). Full nameSoft Input Panel.
I have compiled the Windows Phone tips series together with Windows Phone 7 Q & A files into an ebook. Click here to download