windows-phone-7.1

WP7 Mock Microsoft.Devices.Sensors.Compass when using the emulator

拥有回忆 提交于 2019-12-12 23:49:09
问题 I'd like to be able to simulate the compass sensor when running a Windows Phone 7.1 in the emulator. At this stage I don't particularly care what data the compass returns. Just that I can run against something when using the emulator to test the code in question. I'm aware that I could deploy to my dev unlocked phone to test compass functionality but I've found the connection via the Zune software to drop out frequently. Update I've looked into creating my own wrapper class that could

Application works if installed from PC, but crashes if installed from store (WinPhone 7.5)

一世执手 提交于 2019-12-12 19:40:57
问题 I have a project that runs on Windows Phone 8 and Windows Phone 7.5. It works fine on 8 devices in all cases, but on Windows Phone 7.5 it crashes on startup with following message (only if installed from store): If the application is built on PC and uploaded to device it works fine. I tried numerous things but nothing helped. 回答1: Looks like it was a store issue. Should be resolved now. Issue with 7.1 XAP submissions between Dec 04 and Dec 12 (Beta and Non-beta apps) 回答2: Well, my assumption

Reading HttpOnly Cookies from Headers of HttpWebResponse in Windows Phone

妖精的绣舞 提交于 2019-12-12 15:46:33
问题 Is there any way to read HttpOnly Cookies from Headers of HttpWebResponse in Windows Phone? In my code below "Set-Cookie" is not present in response.Cookies[] My code HttpWebRequest webRequest = (HttpWebRequest)asynchronousResult.AsyncState; // End the get response operation using (HttpWebResponse response = (HttpWebResponse)webRequest.EndGetResponse(asynchronousResult)) { Stream streamResponse = response.GetResponseStream(); // But Set-Cookie is not present here as its HttpOnly var cookies =

Add Items to ListBox when scroll reaches the end in Windows phone?

拥有回忆 提交于 2019-12-12 15:29:49
问题 I need the requirement that.. Initially i have set of datas that are bound to ListBox... If we scroll to the end i will add some more datas to the collection and will update the ListBox... Is there any way to achieve this in Windows phone ? 回答1: I suppose that by "achieve this" you mean the possibility to detect if the ListBox is at the end. In that case, this should help. You'll first need to gain access to the ScrollViewer control in order to see if a user scrolled, and what the current

Detect pinch zoom in Windows phone (7.1)

一个人想着一个人 提交于 2019-12-12 14:31:04
问题 According to Silverlight toolkit the Gesture listener is to be considered deprecated The Gesture Listener should be considered deprecated for all Windows Phone 7.1 SDK development. And no other suggestions are available. In the absence of gesture listener what is the best way to detect pinch/zoom gestures in WP7? 回答1: Take a look at this MSDN page. It is using the ManipulationDelta class to handle touch and resizing. 来源: https://stackoverflow.com/questions/8870755/detect-pinch-zoom-in-windows

Converting system.windows.media.brush to Hex color code

喜夏-厌秋 提交于 2019-12-12 11:11:18
问题 In my Windows phone7 application I placed a canvas and have set its background color to some hex color code.Now I am not able get the hex color code value through c# code.I used the below code but it give the color value in system.windows.media.brush.Plz help me with an answer? clr = Convert.ToString(clr1.Background); 回答1: It seems it returns a Brush and since you've set a color it should return a SolidColorBrush . Try this var color = ((SolidColorBrush)clr1.Background).Color.ToString();

How to parse HTML page data in Windows Phone 7?

痞子三分冷 提交于 2019-12-12 08:16:26
问题 I want to do the below two tasks In Windows Phone 7 application. 1.Navigate to a web page (e.g.http://www.FlightsInd.com) and get the HTML page data.I wnat to ensure that all the Document data is completely downloaded. In C#.Net i am doing this using below code: WebBrowser objWB = new WebBrowser(); webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted); objWB.Navigate("http://www.FlightsInd.com") here once the DocumentCompleted event is

Group Listbox for Windows Phone 7?

旧时模样 提交于 2019-12-12 07:38:22
问题 I'm looking for a way to group items similar to the way the applications below have it for there grouping. Is it possible to create a group listbox using View Models? I plan on having multiple customer groups for example: "AAA" (Group) -- "XDN" (Contact) "NCB" (Group) -- "XDN" (Contact) etc... I don't want it to be seperated by letters but instead by group names. Is this possible? Thanks. 回答1: Nothing prevents you from creating a custom ordered collection that suits that precise purpose. Here

Windows phone 7.1 ListPicker, easy way to go full mode?

北城以北 提交于 2019-12-12 07:24:51
问题 I'm trying to use the ListPicker controller with ListPickerMode="Full" , to get the fullscreen pick window. However it just generate an error when i try "A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.dll Additional information: Set property Microsoft.Phone.Controls.ListPicker.ListPickerMode threw an exception. [Line: 49 Position: 57]" Here's my code: <toolkit:ListPicker x:Name="OutputSelector" ListPickerMode="Full" Margin="0,542,6,0"

Disable particular item in the ListBox

谁说我不能喝 提交于 2019-12-12 05:48:05
问题 I bind list of objects to my ListBox in WindowsPhone application. This business object has one boolean property. Based on the Boolean property i need to set the IsEnabled property in the ListBoxItem. Is there any way to achieve this in WindowsPhone ListBox ? 回答1: There're few ways to achieve this: You can add the ListBoxItem by C# code and set the property properly. In Xaml, inside the list box, place the following: <ListBox.Resources> <Style TargetType="ListBoxItem"> <Setter Property=