windows-phone-8.1

How to POST using HTTPclient content type = application/x-www-form-urlencoded

有些话、适合烂在心里 提交于 2019-12-17 06:06:21
问题 I am currently developing a wp8.1 application C#, i have managed to perform a POST method in json to my api by creating a json object (bm) from textbox.texts. here is my code below. How do i take the same textbox.text and POST them as a content type = application/x-www-form-urlencoded. whats the code for that? Profile bm = new Profile(); bm.first_name = Names.Text; bm.surname = surname.Text; string json = JsonConvert.SerializeObject(bm); MessageDialog messageDialog = new MessageDialog(json);/

Windows Phone 8.1 Universal App terminates on navigating back from second page?

半腔热情 提交于 2019-12-17 02:33:10
问题 I have 2 pages in my Windows Phone 8.1 Universal App. I navigate from Page1 .xaml to Page2 .xaml by using a button with the click event code: this.Frame.Navigate(typeof(Page2)); When I am on Page2, and I use the hardware back button the app closes without an exception or anything. It just returns to the startscreen. I already tried the following on Page 2 : public Page2() { this.InitializeComponent(); Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed; } void

UWP Based project, WebView with DOM Explorer

巧了我就是萌 提交于 2019-12-14 04:03:45
问题 I was wondering if there's such a library or if anyone could give me hints on how to implement something like this. What I want exactly is the functionality of DOM Explorer (to be more specific, when you are on any browser and hit F12 window with DOM Explorer pops where you can look through various aspects of HTML and CSS). I want to know if it would be possible to create this function for WebView and if so, any example would be appreciated. Note: I am working on Visual Studio 2015, WinRT

How to change the color of the Border of a TextBox when it has focus?

倖福魔咒の 提交于 2019-12-14 03:59:30
问题 In my windows phone app, I have set the border of my Text box to null: But when it has focus, it still show a blueish color as its border. How can I config that color? I tried looking at the template for Text Box, I don't see there is a property for the color of border when it has focus: Does anyone has any idea if that is changable? <Thickness x:Key="TextControlHeaderMarginThemeThickness">0,0,0,4.8</Thickness> <x:Double x:Key="TextControlThemeMinHeight">33</x:Double> <x:Double x:Key=

Can't convert HttpResponseMessage with UTF8 encoding

你说的曾经没有我的故事 提交于 2019-12-14 03:26:08
问题 I'm struggling with the usual conversion issue, but unfortunately I haven't been able to find anything for my specific problem. My app is receiving a System.Net.Http.HttpResponseMessage, from a php server, UTF8 encoded, containing some characters like \u00c3\u00a0 (à) and I'm not able to convert them. string message = await result.Content.ReadAsStringAsync(); byte[] messageBytes = Encoding.UTF8.GetBytes(message); string newmessage = Encoding.UTF8.GetString(messageBytes, 0, messageBytes.Length

Get SIM MSISDN & IMSI number in Windows Phone Application

浪尽此生 提交于 2019-12-14 03:22:09
问题 Is it possible to get the SIM MSISDN & IMSI number in windows Phone app development? I have gone through some of the Q/A but they all are asked a long time ago. 回答1: You could get SIM MSISDN & IMSI number in Windows Phone Application. Please notice that you should manually edit your application Package.appxmanifest as follows: <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http:/

Dim overlay by swiping on Windows Phone

那年仲夏 提交于 2019-12-14 02:22:00
问题 I have a rectangle as an overlay and I want to modify its opacity by swiping up and down, like in the app Free Talking Alarm Clock. I figured out, that I have to deal with ManipulationStarted and ManipulationDelta events, but not sure which value to use. At this point I'm able to change the opacity by swiping, but changes only when the swipe is completed, and I want the opacity to change while I'm swiping. How do I do that? Right now, I have this: private Point initialpoint; private double

Unable to deploy on Windows 10 Mobile

那年仲夏 提交于 2019-12-14 02:07:58
问题 I was coding normally on visual Studio 2015 Community, I did some deployments on my Lumia Icon device, but suddenly, when I was developing an app with OAuth 2.0 to interact with LinkedIn and tried to deploy this app, visual studio started to crash, and I got that error list 2>------ Deploy started: Project: OAuth2, Configuration: Debug Any CPU ------ 2>Deploying X:\...\...\Documents\Visual Studio 2015\Projects\OAuth2\OAuth2\Bin\Debug\OAuth2_Debug_AnyCPU.xap... 2>Connecting to Device... 2

DataTrigger with VisualStates in Windows phone 8.1

夙愿已清 提交于 2019-12-14 01:55:01
问题 I'm trying to convert old Window phone 7.5 Silverlight Application to new WinRT Universal application and I have problems with this pice of code: <Style TargetType="Button"> <Setter Property="Visibility" Value="Collapsed"/> <Style.Triggers> <DataTrigger Binding="{Binding Active}" Value="True"> <Setter Property="Visibility" Value="Visible"/> </DataTrigger> </Style.Triggers> </Style> I used DataTrigger to set visibility of control based on binding value. In Windows Phone 8.1 winrt app this

How to detect that WP8.1 app launched on Windows 10 Mobile?

落花浮王杯 提交于 2019-12-14 01:04:23
问题 I need to check OS version (WP 8.1 or W10) in my code of WP8.1 application. What better way to do this? May be reflection or some special API for this purpose? 回答1: I didn't find any other way to do this, so here's my approach. The following property IsWindows10 detects if a Windows 8.1 or Windows Phone 8.1 app is running on a Windows 10 (including Windows 10 Mobile) device. #region IsWindows10 static bool? _isWindows10; public static bool IsWindows10 => (_isWindows10 ?? (_isWindows10 =