windows-phone

How to deserialize json data in windows phone?

淺唱寂寞╮ 提交于 2019-12-20 06:37:02
问题 Initially my json was in the format, "code": 0, "message": "success", "students": [ { "id": "257633000000070001", "name": "hjeke", "percentage": 36, "type": "Good", }, { "id": "257633000000073001", "name": "Second", "percentage": 4, "type": "bad", }] And so i used the following class for deserializing using Newtonsoft.json [DataContract] public class students { [DataMember(Name = "code")] public int Code { get; set; } [DataMember(Name = "message")] public string Message { get; set; }

How to connect to windows phone 7 from a 64-bit application

别说谁变了你拦得住时间么 提交于 2019-12-20 06:30:28
问题 I have a 32-bit program (written in C++) that can connect to some different devices and as long as it is 32-bit everything works fine. However, now I need to build it as a 64-bit program but then I came across some problems with Windows Phone 7. I found out that a dll (written in C#) that I rebuilt as 64-bit throws exception at this line: MultiTargetingConnectivity connectivity = new MultiTargetingConnectivity(CultureInfo.CurrentUICulture.LCID); The exception is: An unhandled exception of

Compress wav file to wma on Windows Phone 8

天涯浪子 提交于 2019-12-20 05:38:12
问题 I am looking to encode a wav file in wma (or mp3, ogg, etc) on Windows Phone. I have not found any resources online. Any ideas on how I can archive this? I am trying to record a voice from the microphone and upload it from the phone. That's why I prefer to compress the audio file before sending it. 回答1: Starting from Windows Phone 8.1, you can use MediaTranscoder class for that. Also, since WP 8.0 you can use AudioVideoCaptureDevice to record directly into the compressed format. Unfortunately

Generating ARM code for a managed assembly on an Intel machine

若如初见. 提交于 2019-12-20 05:24:12
问题 Directly related to this question. Given a managed assembly for Windows Phone, how can I generate native code for it for an ARM CPU? I don't have a Windows/ARM device (neither tablet nor a phone). There's the ngen utility out there, but AFAIK it can only generate code for the host machine (i. e. Intel). The reason why I'm asking, the offsets in the crash stack that Windows Phone Dev Center provides are not MSIL offsets (I've checked - they go way beyond MSIL function size). Those look like

How to schedule a repeating task to count down a number in windows phone 8

二次信任 提交于 2019-12-20 05:14:11
问题 I need to just have a simple task that runs as long as the user is on one specific screen. On this screen there is a count down timer. I looked into Background Agents - but that seems not to be the right approach. Basically it should work like this: The user goes to this one screen, presses start and the cont down timer starts to count down - every 30 seconds update is perfectly ok. How should I do this on WP8 ? Many thanks! 回答1: You should use a DispatcherTimer as wkempf points out. Pretty

How do I remove the App name from my flipping live tile on Windows Phone?

最后都变了- 提交于 2019-12-20 05:02:32
问题 I'm using this template TileWide310x150PeekImage03 from the documentation here. On the example image, the name of the App is not displayed on the image, but on my App the name of the app remains. This ruins the UI of my tile because the App name is displayed within the image of my flipping live tile. How do I remove it? 回答1: Add branding="none" to the binding element in the template XML. http://msdn.microsoft.com/en-us/library/windows/apps/br212854.aspx 来源: https://stackoverflow.com/questions

Windows Phone Image Binding

扶醉桌前 提交于 2019-12-20 04:58:16
问题 I want to put images in my ListBox using Binding. Below is the object containing the URI's: _roomView.Room = new Room { Items = new List<Item> { new Item {ItemType = ItemType.BlueKey, ImageUri = "/Escape;component/Images/Items/a.jpg"}, new Item {ItemType = ItemType.Bracelet, ImageUri = "/Escape;component/Images/Items/b.png"}, new Item {ItemType = ItemType.Money, ImageUri = "/Escape;component/Images/Items/b.png"}} }; DataContext = _roomView; Below is the XML: <ListBox x:Name="Mylist"> <ListBox

How to crop image on ScheduledTaskAgent in Windows Phone

血红的双手。 提交于 2019-12-20 04:24:07
问题 I need to crop an image using a ScheduledTaskAgent. Since it runs in the background I get a cross-thread exception when trying to instantiate a WriteableBitmap (as it needs to be created in the UI thread). I have a stream of the image, how would I go about cropping it without using a WriteableBitmap? Thanks 回答1: You can use the dispatcher (and therefore the UI thread) even in a background agent: protected override void OnInvoke(ScheduledTask task) { Deployment.Current.Dispatcher.BeginInvoke((

Showing m.bing.com in the WP8 WebBrowser control

江枫思渺然 提交于 2019-12-20 04:11:13
问题 I'm having a problem getting bing.com to load in a WebBrowser control on Windows Phone 8. It seems that doing that will launch the WP8 Search App (same as pressing the Search button on the phone). The problem is, once you click a result in that search app, it doesn't take you back to your original app - it goes to IE to show the result. This isn't going to work for me and seems to be a massive flaw (IMO) in the WebBrowser behavior. There does seem to be a few apps out there that have

Compressing frames inside an AVI video

落爺英雄遲暮 提交于 2019-12-20 03:52:48
问题 I've built a Windows Phone class to convert some WriteableBitmap into a AVI Full Frame (Uncompressed). Videos are really huge. Is there a simple codec implementation existing, like a codec that just zip images, or something that is making a next/previous XOR then zip it in jpeg? Windows Phone doesn't allow any unsafe code and most DLL cannot be wrapped into a C# WP library. So that's why I'm coding something from scratch. Note that I'm more efficient at coding from scratch than in studying C+