windows-phone-7.1

How to parse JSON to a dynamic object on Windows Phone 7?

丶灬走出姿态 提交于 2019-11-28 11:41:09
For web applications I can use System.Web and use this trick to convert JSON to a dynamic object. But for Windows Phone I can't use JavaScriptConverter . What is the workaround to convert JSON in a dynamic object on Windows Phone 7.1? Json.Net ( http://james.newtonking.com/pages/json-net.aspx ) -----EDIT----- If WP7 supports DynamicObject: using System; using System.Dynamic; using System.Collections; using Newtonsoft.Json; using Newtonsoft.Json.Linq; public class JSonTest { public static void Main() { string jsonStr = @" { 'glossary': { 'title': 'example glossary', 'GlossDiv': { 'title': 'S',

Text in the message box should be the next next lines

妖精的绣舞 提交于 2019-11-28 09:46:14
Basically i display the some text in the MessageBox with Ok and Cancel button in WindowPhone 7.1. I need the requirement like the below. Some text will be here.... Property:value... Actually we can simply the text in the MessageBox, but how can i add the linebreak between the text in the MessageBox.. Is there any way to do this in Windows Phone? You can use Environment.Newline for line breaks string msg = "Text here" + Environment.NewLine + "some other text"; MessageBox.Show("Line 1" + Environment.NewLine + "Line 2"); SHAKIR SHABBIR You can try \n or <br /> for line Breaks. I am not sure if

how to add images for pivot item header

一笑奈何 提交于 2019-11-28 09:18:47
问题 Am developing a simple app for learning pivot control in wp7. can we add images for pivot item instead of text in header(red mark area in bellow image ). is it possible to add images, please suggest me my xaml code is: <Grid x:Name="LayoutRoot" Background="Transparent"> <!--Pivot Control--> <controls:Pivot Title="MY APPLICATION" Name="mainPivot"> <!--Pivot item one--> <controls:PivotItem Header="item1"> <Grid> <Image Source="/SchoolList;component/Gallery/child.jpg"/> </Grid> </controls

Poor UDP performance with Windows Phone 7.1 (Mango)

跟風遠走 提交于 2019-11-28 08:19:01
问题 Im trying to continuously send small UDP-packets (8 byte) as fast as possible from a Samsung Omnia 7 with Windows Phone 7.1 Beta2 refresh (Mango) to a standard PC with Windows 7 and I get very erratic performance. The weirdest thing is that I get the best performance when sending one message per around 1-4 milliseconds. If I send messages faster (< 1 ms) or slower (> 4 ms) I get strange freezings where the packages seem to get stuck (for 0.5-1 sec every ~0.5 sec) somewhere before they get

Not Able To Install Apache Cordova for Windows Phone7

淺唱寂寞╮ 提交于 2019-11-28 05:53:42
问题 I am Trying To create an Application with Apache Cordova(Phonegap) For windows phone7.I followed the linkApache Cordova For phone7 and the problem is am not able to find CordovaStarter-x.x.x.zip file in the downloaded content as mentioned in the instruction,Download Link.Plz sort out my problem.Thank you 回答1: In fact, VS templates is not bundled with phonegap 2.1. In order to 'install' a template, you will need to build the template. Simply open templates\full\CordovaSolution.sln in Visual

AudioPlayerAgent, timer and webservice

陌路散爱 提交于 2019-11-28 01:32:22
my application read a shoutcast. The meta data of the music played is collected from a webservice that return me a Json (so i don't have to decode the stream). I call the webservice every 20 seconds with a timer, this works in my application, but doesn't works in the AudioPlayer.cs //Timer private DispatcherTimer timer; /// <remarks> /// AudioPlayer instances can share the same process. /// Static fields can be used to share state between AudioPlayer instances /// or to communicate with the Audio Streaming agent. /// </remarks> public AudioPlayer() { if (!_classInitialized) { _classInitialized

Saving the photo to a class

谁说胖子不能爱 提交于 2019-11-27 21:34:57
I would like to save the PhotoResult from the cameraCaptureTask into my class which I'm using as a collection and then saving into Isolated Storage: void cameraCaptureTask_Completed(object sender, PhotoResult e) This is part of an ObservableCollection. I want to save the photo into this collection. [DataMember] public Image VehicleImage { get { return _vehicleImage; } set { if (value != _vehicleImage) { _vehicleImage = value; NotifyPropertyChanged("VehicleImage"); } } } I'm using the example from: http://www.blog.ingenuitynow.net and in the example it works fine, but it is setting up an

How to parse JSON to a dynamic object on Windows Phone 7?

大兔子大兔子 提交于 2019-11-27 06:24:41
问题 For web applications I can use System.Web and use this trick to convert JSON to a dynamic object. But for Windows Phone I can't use JavaScriptConverter . What is the workaround to convert JSON in a dynamic object on Windows Phone 7.1? 回答1: Json.Net ( http://james.newtonking.com/pages/json-net.aspx ) -----EDIT----- If WP7 supports DynamicObject: using System; using System.Dynamic; using System.Collections; using Newtonsoft.Json; using Newtonsoft.Json.Linq; public class JSonTest { public static

Text in the message box should be the next next lines

我的梦境 提交于 2019-11-27 05:51:24
问题 Basically i display the some text in the MessageBox with Ok and Cancel button in WindowPhone 7.1. I need the requirement like the below. Some text will be here.... Property:value... Actually we can simply the text in the MessageBox, but how can i add the linebreak between the text in the MessageBox.. Is there any way to do this in Windows Phone? 回答1: You can use Environment.Newline for line breaks string msg = "Text here" + Environment.NewLine + "some other text"; 回答2: MessageBox.Show("Line 1

Saving the photo to a class

元气小坏坏 提交于 2019-11-27 04:31:09
问题 I would like to save the PhotoResult from the cameraCaptureTask into my class which I'm using as a collection and then saving into Isolated Storage: void cameraCaptureTask_Completed(object sender, PhotoResult e) This is part of an ObservableCollection. I want to save the photo into this collection. [DataMember] public Image VehicleImage { get { return _vehicleImage; } set { if (value != _vehicleImage) { _vehicleImage = value; NotifyPropertyChanged("VehicleImage"); } } } I'm using the example