windows-phone-7.1

Flipping animation similar to the unread count of the home screen

a 夏天 提交于 2019-12-11 09:19:01
问题 I'm looking for a Windows Phone control (or source code) in order to have a counter similar to the one showing the unread count for SMS and mail in the home screen. When the value changes from 2 to 5 for example, we have various animations showing briefly 3, 4 and 5. 回答1: one way is to use Reactive Extension . First you need Microsoft.Phone.Reactive and System.Observable references. In my xaml page, I defined a TextBlock named NumberTextBlock . Also I created a Storyboard that animates the

HttpWebRequest returns null ResponseStatusCode

匆匆过客 提交于 2019-12-11 08:22:07
问题 I'm writing a background audio agent that plays music from an online stream and also periodically checks for updates in the track name and artist. I'm attempting to use an HttpWebRequest object to get the name and artist, but whenever I call HttpWebResponse trackResponse = (HttpWebResponse)trackRequest.EndGetResponse(result); the error below is thrown. A first chance exception of type 'System.Net.WebException' occurred in System.Windows.dll The stack trace for the WebException is the

Can we get the list of apps programmatically in windows phone?

余生长醉 提交于 2019-12-11 08:14:02
问题 Is that possible to get the list of apps and their names in windows phone using c# code ? And links to launch any app installed in phone ? 回答1: You cannot get the list of applications that are installed on the Windows Phone that are published by someone other than the publisher of the calling application . There is a way , however, to get the list of applications that are installed on the device and are originating from the publisher of the caller app. Here is what I am talking about:

Unable to show alert via Javascript in WP7 web browser control

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 08:11:48
问题 I am trying to show alert box using javascript in a webpage using web browser control in WP7. The alert is not popping up. Is there anything wrong in the code or WP7 doesn't support it at all? <phone:WebBrowser Name="browser" IsScriptEnabled="True" ScriptNotify="browser_ScriptNotify" Source="Default.html"/> Inside Default.html <html><br> <head><br> </head><br> <body onload="onLoad()"><br> <script type="text/javascript"><br> function onLoad() {<br> alert("hello");<br> }<br> </script><br> <

Tap event for a rectangle with text and image on top of it

房东的猫 提交于 2019-12-11 07:55:02
问题 I am trying to create a UI which gives a tile like feel to the end user. I have three elements - rectangle,text and image in the following manner: <Rectangle Name="systemTime" Height="173" Width="173" Grid.Column="0" Grid.Row="0" Fill="{StaticResource PhoneAccentBrush}" Opacity="0.85" Margin="0,12,12,12" /> <TextBlock Text="System Time" Grid.Row="0" Grid.Column="0" FontSize="{StaticResource PhoneFontSizeMediumLarge}" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Bottom"

Parsing complex JSON

纵饮孤独 提交于 2019-12-11 07:07:21
问题 I want to parse a complex JSON on WP7. First I have to parse a JSON feed and I retrieve data to parse second JSON feed. To parse the first feed I use this web service http://horaires-ter-sncf.naholyr.fr/prochainsdeparts.php?gare=... after that we use the code and the station's name to parse the second feed http://horaires-ter-sncf.naholyr.fr/prochainsdeparts.php?gare=....&id=... This my code but it doesn't work: public static class Parser { public static string resultats; public static

How to exit from the application in WP7?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 06:59:13
问题 I want to quit the application from the Application page, on click of a button. Please guide me to do so. Thanks in advance. 回答1: There is no way to close a Silverlight Application from code, but you will find a small loophole in this under the page i linked in. Possibly you will find the answer here! If it is an XNA then you can Call Game.Exit() 回答2: You can't quit the application. That is controlled by the OS. 来源: https://stackoverflow.com/questions/8681484/how-to-exit-from-the-application

How to send long query string in Windows Phone with HttpWebRequest

别等时光非礼了梦想. 提交于 2019-12-11 06:33:27
问题 I am making an API call to Facebook, using the Facebook C# SDK, and I can't seem to send long query strings via HTTP GET. I need a long FQL query (select .. from .. where .. in ) to execute and I can't seem to send it. If the query is smaller, it does send successfully and return the results. Unfortunatelly, as FQL supports GET and not POST, I am stuck to GET. How can I increase the default query string limit in Windows Phone HttpWebRequest? I am using Windows Phone SDK 7.1, but testing on

How does GeoCoordinateWatcher.PositionChaged event work inside a periodic task?

我是研究僧i 提交于 2019-12-11 06:24:10
问题 How does GeoCoordinateWatcher.PositionChaged event work inside a periodic task? If I have a background agent that runs every one hour. Code is protected override void OnInvoke(ScheduledTask task) { GeoCoordinateWatcher watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default); watcher.MovementThreshold = 100; watcher.PositionChanged += _watcher_PositionChanged; watcher.Start(); } If initially the device was at postion A and device travelled more than 100m within the next hour, then