1, call the system built-in filter:
Windows.ApplicationModel.CameraApplicationManager.ShowInstalledApplicationsUI ();
2. Completely exit the application:
Application.current. Exit ();
3. Launch System content application via URL:
Windows.System.Launcher.LaunchUriAsync (NewUri ("Ms-settings-lock:")); Jump to the Lock screen Settings page Windows.System.Launcher.LaunchUriAsync (NewUri ("Ms-settings-airplanemode:")); Jump to the Flight Settings page Windows.System.Launcher.LaunchUriAsync (NewUri ("Ms-settings-bluetooth:")); Jump to the Bluetooth Settings page Windows.System.Launcher.LaunchUriAsync (NewUri ("Ms-settings-cellular:")); Jump to the Network Settings page Windows.System.Launcher.LaunchUriAsync (NewUri ("Ms-settings-wifi:")); Jump to the WiFi Settings page Windows.System.Launcher.LaunchUriAsync (NewUri ("ms-settings-location:")); Jump to the Location Settings page Windows.System.Launcher.LaunchUriAsync (NewUri ("ms-settings-emailandaccounts:")); Jump to the Email + Account Settings page Windows.System.Launcher.LaunchUriAsync (NewUri ("ms-settings-screenrotation:")); Screen Rotation Windows.System.Launcher.LaunchUriAsync (NewUri ("callto:1391234567")); Call the specified phone number
Windows.System.Launcher.LaunchUriAsync (New Uri ("http://webabcd.cnblogs.com/")); Open the specified network address
Windows.System.Launcher.LaunchUriAsync (New Uri ("Mailto:[email protected]")); Send a message to the specified mailbox
4. Custom Delay Wait Operation:
Task.Factory.StartNew (async () = { task.delay). Wait (); Latency wait time interval awaitthis. Dispatcher.runasync (Coredispatcherpriority.normal, () = { ///Here to add the required action function
}); });
5. File read:
Windows.Storage.KnownFolders;//Includes access to the app's common location
Windows.ApplicationModel.Package.Current.InstalledLocation; // Get the location of the installation package
Windows.Storage.ApplicationData.Current.LocalCacheFolder; Get Local cache Folder
Windows.Storage.ApplicationData.Current.RoamingFolder; //Get the Roaming Data folder
Windows.Storage.ApplicationData.Current.LocalFolder; //Get Local App folder
Windows.Storage.ApplicationData.Current.TemporaryFolder; Get the Application Temp folder
6. Hide and show the status bar:
Windows.UI.ViewManagement.StatusBar.GetForCurrentView (). Hideasync (); Windows.UI.ViewManagement.StatusBar.GetForCurrentView (). Showasync ();
7. Hide Command bar:
commandbar.visibility = Windows.UI.Xaml.Visibility.Collapsed;
8. URI scheme for installation package file:
"ms-appdata:///local/..." //access to files stored in a local folder
"ms-appdata:///roaming/..." //access to files stored in roaming folders
"ms-appdata:///temp/..." //access to files stored in temp folder
"ms-appdata:///..." //accessing files in the installation package folder
9. Rewrite the event corresponding to the back key:
Windows.Phone.UI.Input.HardwareButtons.BackPressed + = hardwarebuttons_backpressed;
void Hardwarebuttons_backpressed (object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
{
Add the corresponding event handling here
}
Note: Of course you can also use the delegate method to write the event, which is more refined:
Windows.Phone.UI.Input.HardwareButtons.BackPressed + = (A, b) =>{ ////Add corresponding event processing };
10, contact related actions:
Windows.Phone.PersonalInformation.ContactStore.CreateOrOpenAsync (); Create a contact
Contactinformation info = new Contactinformation ();
var porperties = info. Getpropertiesasync (); Get Contacts
^^ ^^ ^^ ^ Of course, there are many, then think again in turn!!!!
These are some of the commonly used operations I have listed for beginners, hoping to have some guidance for beginners. Of course, also very welcome reprint, but please specify the source!
WindowsPhone8.1 Development Tips