windows-phone-8.1

What is the equivalent to “OnBackKeyPress”

拥有回忆 提交于 2019-12-09 17:53:36
问题 In Windows Phone 8.0 I used this to handle the back button: protected override void OnBackKeyPress(CancelEventArgs e) { base.OnBackKeyPress(e); } This Event does not exists on the "Page" control. How can I handle a click on the back button in WP 8.1? 回答1: Take a look at Windows.Phone.UI.Input.HardwareButtons. If you add a Basic Page to your project then VS will add a NavigationHelper class to your project which helps with Navigating thru your App, you can also see in the source code that it

How to avoid the screen to lock while the Windows Phone is plugged in

流过昼夜 提交于 2019-12-09 15:00:58
问题 Easy as that, in android there's a setting called Stay awake that will prevent your phone to lock down while you're using it for debugging an app. I'm looking for the same thing (could be better) for Windows Phone 8.1. Every time I hit F5 I need to unlock my phone or I would get the following error: DEP6600 : Deployment failed. Cannot deploy app when device screen is locked. Please make sure that the device screen is not locked, and try again. or Error: Application launch failed. Ensure that

there is a way to activate a control WebView Desktop mode and not Mobile mode?

ε祈祈猫儿з 提交于 2019-12-09 14:53:43
问题 there is a way to activate a control WebView Desktop mode and not Mobile mode? <WebView x:name= "WebViewApp" ..../> 回答1: The WebView doesn't have an inherent desktop or mobile mode. Whether a site provides a mobile or desktop optimised site is generally based on the User Agent header. You can set this in a WebView by creating an HttpWebRequest with the agent you want and then navigating with WebView.NavigateWithHttpRequestMessage. If you want to mimic a specific browser mode you can find the

Stopping notification bar to popup during game play

吃可爱长大的小学妹 提交于 2019-12-09 13:07:30
问题 Context: I am working on a windows phone game using XNA 4.0 framework. During the gameplay, if the user accidentally drags the top of screen, notification center gets dragged down. I have seen few apps where this behaviour is overridden and instead of notification center popping up, a small cue is shown at the top as shown in the screenshot below. Question: What is the API that stops notification center to come up when user accidentally drags the top of screen during gameplay? Screenshot of

Send email from windows phone 8.1

时光怂恿深爱的人放手 提交于 2019-12-09 10:08:51
问题 I want to sent an email from windows phone 8.1 app.Email Compose task not working in it. I tried this EmailRecipient sendTo = new EmailRecipient() { Address = "abc@outlook.com" }; //generate mail object EmailMessage mail = new EmailMessage(); mail.Subject = "Feedback"; //add recipients to the mail object mail.To.Add(sendTo); //mail.Bcc.Add(sendTo); //mail.CC.Add(sendTo); //open the share contract with Mail only: await EmailManager.ShowComposeNewEmailAsync(mail); This gives an error in the

How can I bind source MediaCapture to CaptureElement using Caliburn.Micro?

…衆ロ難τιáo~ 提交于 2019-12-09 06:51:34
问题 On Windows Phone 8.1, I am using the Caliburn.Micro view-model-first approach, but as the view model cannot have any knowledge of the view, I cannot see how I can bind a MediaCapture object to a CaptureElement in the view. 回答1: I had the same problem. I'm using MVVM Light with Windows Phone 8.1 WinRT (Universal Apps). I used ContentControl and binded to CaptureElement: <ContentControl HorizontalAlignment="Left" Width="320" Height="140" Content="{Binding CaptureElement}"/> CaptureElement and

Windows Phone 8.1 API

雨燕双飞 提交于 2019-12-09 06:42:50
问题 This question was migrated from Windows Phone Stack Exchange because it can be answered on Stack Overflow. Migrated 5 years ago . Is there Windows Phone 8.1 API to refer? This is because I want to develop the Windows Phone 8.1 application, but I don't know where to refer the API, since the Windows Phone 8.1 an 8 have a big different, so I can't refer to the Windows Phone 8 API. 回答1: There is two sets of APIs available on Windows Phone 8.1 Windows Runtime (MSDN), all APIs with a phone icon on

How Can Use Isolated Storage in wp 8.1

北城余情 提交于 2019-12-09 04:30:31
How can I Use IsolatedStorage In this Code: private void Button_Click(object sender, RoutedEventArgs e) { textblock.Visibility = Visibility.Visible; } I use Windows Phone 8.1 Silverlight c# deeiip I assume you want to store the state of your Button Control. Then you can do this, if(!IsolatedStorageSettings.ApplicationSettings.Contains("ButtonVisibility")) { IsolatedStorageSettings.ApplicationSettings.Add("ButtonVisibility", Visibility.Visible.ToString()); } else { IsolatedStorageSettings.ApplicationSettings["ButtonVisibility"] = Visibility.Visible.ToString()); } This will work on windows 8 and

Send image to WebApi service

痞子三分冷 提交于 2019-12-09 03:54:37
问题 I'm making a project on Windows Phone where user can take a photo, save it on phone and next upload on my server. So there are two projects, WP8.1 and ASP.NET WEB API. Currently I don't know how to upload photo to my server(from phone), I even don't know how to catch it in API. What's the best way to make it? Here is my method to show on the screen(phone), picture which was taken by user. private async void LoadCapturedphoto(string filename) { //load saved image StorageFolder pictureLibrary =

How to programatically create a tile in Windows Phone 8.1?

拜拜、爱过 提交于 2019-12-09 03:43:04
问题 In Windows Phone 8 I was able to create a Shell Tile with the following: StandardTileData newTileData = new StandardTileData { BackgroundImage = new Uri("/Images/my_tile_medium.png", UriKind.Relative), Title = "My Tile Title", BackTitle = "My Tile Back", BackBackgroundImage = new Uri("/Images/my_tile_medium_back.png", UriKind.Relative), }; ShellTile.Create(MyAppPages.MainPage("Name=MyAppTile"), newTileData); This no longer works in Windows Phone 8.1. How can I programatically create a tile