windows-phone-7

Navigation in windows phone7

别来无恙 提交于 2020-01-06 18:01:30
问题 What kind of navigation is best suited for a home button in an application,Can any please help me,I am newbie? 回答1: Updated Answer based on your comments, First you need to create a button(preferably an Appbar button) and then place this code in the click event handler NavigationService.Navigate(new Uri("/Home.xaml?home=true", UriKind.Relative)); And then in the Home page in the onNavigatedTo event handler place this code string home; NavigationContext.QueryString.TryGetValue("home", out home

Navigation in windows phone7

倾然丶 夕夏残阳落幕 提交于 2020-01-06 18:00:13
问题 What kind of navigation is best suited for a home button in an application,Can any please help me,I am newbie? 回答1: Updated Answer based on your comments, First you need to create a button(preferably an Appbar button) and then place this code in the click event handler NavigationService.Navigate(new Uri("/Home.xaml?home=true", UriKind.Relative)); And then in the Home page in the onNavigatedTo event handler place this code string home; NavigationContext.QueryString.TryGetValue("home", out home

Parsing xml files in windows phone 7

北战南征 提交于 2020-01-06 15:06:47
问题 i have the following xml file <entry> <math marks>45</math marks> <eng marks>67</eng marks> <phy marks>56</phy marks> </entry> i wish to parse this xml file in windows phone 7 such that i can extract the values for each tag, for example math marks has value 45, and save them in a variable of type double and perform some mathematical operations on the created variable. How can i do this? 回答1: Firstly, that isn't xml (element names can't have whitespace). It would have to be, for example:

WebBroswer query in Windows Phone

妖精的绣舞 提交于 2020-01-06 14:32:26
问题 I've got the following code, but when I Build it I get an error on WebBrowserDocumentCompletedEventArgs telling me the type or namespace could not be found. I've been searching the web and attempting to add DLLs for over an hour. Can anyone help? private void b_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { WebBrowser b = sender as WebBrowser; string response = b.DocumentText; // looks in the page source to find the authenticity token. // could also use regular exp

WP7 How to parse the XML?

对着背影说爱祢 提交于 2020-01-06 14:16:11
问题 In wp7 i want to parse xml tag .Xml : <top> <value name="Group A"> <team position="1" name="india" won="10" lose="5"/> <team position="2" name="pakistan" won="5" lose="5"/> </value> <value name="Group B"> <team position="1" name="Aus" won="10" lose="5"/> <team position="2" name="newzeland" won="5" lose="5"/> </value> </top> i want output like this, Group A 1 India 10 5 2 pak 5 10 Group B 1 Aus 5 5 2 Neszeland 5 5 I' m using parser like this, list = (from story in xmlTweets.Descendants("value"

foreign culture XML text parsing

大憨熊 提交于 2020-01-06 14:11:14
问题 I have released a windows phone app a while back. Since then, BugSense reported a problem that is causing some crashes in foreign countries: System.ArgumentException - The character 'İ' (0x0130) is not available in this SpriteFont. If applicable, adjust the font's start and end CharacterRegions to include this character. Parameter name: character and here is the stack trace: at Microsoft.Xna.Framework.Graphics.SpriteFont.GetIndexForCharacter(Char character) at Microsoft.Xna.Framework.Graphics

foreign culture XML text parsing

流过昼夜 提交于 2020-01-06 14:10:09
问题 I have released a windows phone app a while back. Since then, BugSense reported a problem that is causing some crashes in foreign countries: System.ArgumentException - The character 'İ' (0x0130) is not available in this SpriteFont. If applicable, adjust the font's start and end CharacterRegions to include this character. Parameter name: character and here is the stack trace: at Microsoft.Xna.Framework.Graphics.SpriteFont.GetIndexForCharacter(Char character) at Microsoft.Xna.Framework.Graphics

media player in windows phone 7 displaying next song

扶醉桌前 提交于 2020-01-06 13:56:22
问题 I want to do something similar to the media player in windows phone 7 where the next several song is shown. What approach I would take to accomplish this? Example: previous song previous song CURRENT SONG next song next song my code currently like this: void MainPage_Loaded(object sender, RoutedEventArgs e) { List<string> songlist = new List<string>(); MediaLibrary library = new MediaLibrary(); mySongCollection = library.Songs; MediaPlayer.ActiveSongChanged += new EventHandler<EventArgs>

Parse json with different types value (Newtonsoft.Json)

泄露秘密 提交于 2020-01-06 13:37:12
问题 Help me parse the json with Newtonsoft.Json . { "_id": 160, "location": { "type": "Point", "coordinates": [43.59043144045182, 39.72119003534317] }, }, { "_id": 161, "location": { "type": "LineString", "coordinates": [ [43.58780105200211, 39.719191789627075], [43.58817794899264, 39.719465374946594] ] }, }, { "_id": 152, "location": { "type": "Polygon", "coordinates": [ [43.590524759627954, 39.71930980682373], [43.590474249766544, 39.71926689147949], [43.59043151061995, 39.71934735774994], [43

subclassing PhoneApplicationPage is not calling the inherited methods

人盡茶涼 提交于 2020-01-06 08:34:05
问题 I have created a Base class like this: `namespace XXX.Screens { public partial class Settings_screen_BASE : PhoneApplicationPage { public static readonly bool DEBUG = true; public Settings_screen_BASE() { if (DEBUG) Debug.WriteLine(this.GetType() + "->" + System.Reflection.MethodBase.GetCurrentMethod().Name); InitializeComponent(); if (DEBUG) Debug.WriteLine(this.GetType() + "<-" + System.Reflection.MethodBase.GetCurrentMethod().Name); } } }` And this child class: namespace XXX.Screens {