silverlight

How to Use XDocument class in SilverLight Project (C#)

扶醉桌前 提交于 2019-12-18 06:27:38
问题 I'm trying to create a Silverlight application (for the first time) that involves parsing XML from a site and displaying information. To do this I am using Visual Studio 2008 on Windows XP Service Pack 3. I also have .NET Framework 3.5 SP1 installed. My problem is that no XML-parser I have seen on the internet works. The top of my code I have both lines I believe are necessary (using "System.xml;" and using "System.linq;") but XDocument, XMLReader, XMLDocument, and any others I have found do

How to Use XDocument class in SilverLight Project (C#)

自古美人都是妖i 提交于 2019-12-18 06:26:10
问题 I'm trying to create a Silverlight application (for the first time) that involves parsing XML from a site and displaying information. To do this I am using Visual Studio 2008 on Windows XP Service Pack 3. I also have .NET Framework 3.5 SP1 installed. My problem is that no XML-parser I have seen on the internet works. The top of my code I have both lines I believe are necessary (using "System.xml;" and using "System.linq;") but XDocument, XMLReader, XMLDocument, and any others I have found do

Windows Phone 7: How to parse Bezier Path string like in XAML?

淺唱寂寞╮ 提交于 2019-12-18 06:23:21
问题 I have a need to parse Bezier Path Strings, but apparently the System.Windows.Media.Geometry version in the .Net CF framework doesn't have the Parse() method that is available in it's normal counterpart. However, entering the following XAML does work, so there must be a way the system parses the Path Data String. <Path Stroke="Blue" Data="M 0 0 Q 10 10 20 0"/> Any clue on how I can initiate this parsing myself with a custom string outside XAML? I ofcourse could also try to write my own parser

Silverlight Async Timeout Error

前提是你 提交于 2019-12-18 05:42:01
问题 Calling through to my Silverlight Enabled WCF-Service in my silverlight application, occasionally users get timeouts. Whats the easiest way to boost the time allowed by the service client for a response? The exact exception thrown is: System.TimeoutException: [HttpRequestTimedOutWithoutDetail] Thanks 回答1: Ammount of time connection can be open: BasicHttpBinding.OpenTimeout property Time that a connection can remain inactive, during which no application messages are received, before it is

How to save BitmapImage / WriteableBitmap using SaveFileDialog in Silverlight 3.0?

孤人 提交于 2019-12-18 05:21:44
问题 How can a WriteableBitmap from Silverlight be Saved onto the File System, I am unsure what to do with the FileStream to make this work, it can be in Bitmap, PNG, Jpeg format etc, as long as a commercial library is not required. Is it possible to do this? Here is my call to SaveDialog, below: Dim SaveDialog As New SaveFileDialog If SaveDialog.ShowDialog Then Try Using FileStream As Stream = SaveDialog.OpenFile ' Save Image File Code Here End Using Catch ex As Exception End Try End If Edit

Is it possible to change the background color of the WebBrowser control before loading content?

…衆ロ難τιáo~ 提交于 2019-12-18 04:38:06
问题 I have a page that contains a WebBrowser control that is frequently updating content. I am using a black background, but the default color before loading content of the WebBrowser is white. I could change it by loading a small HTML string with the background set to black but there is still a period of time when the WebBrowser appears as white so there is a sort of a flickering effect happening. My question is this: is there any way to change the color of the underlying control of the

Difference between Attached and non-Attached Dependency Properties in Silverlight

回眸只為那壹抹淺笑 提交于 2019-12-18 04:36:15
问题 Okay Stackers, I've spent a good couple of hours on this question, and I want to know if anybody has a definitive answer. For all the research I've done, I can't find ANY difference between .Register and .RegisterAttached in Silverlight . Now, before you jump the gun and tell me that .RegisterAttached is used for attaching a DP to another class, try implementing an Attached Dependency Property using DependencyProperty.Register() . I have found not a single difference, and so I am at a loss as

New Windows Phone Silverlight 8.1 apps

☆樱花仙子☆ 提交于 2019-12-18 04:24:19
问题 I have just updated my Windows Phone HTC 8S to Windows Phone 8.1 Developer Preview and I would like to begin playing around with any new API's. I did come across the Windows.Phone.System.LockScreenExtensibility namespace, but it says: Minimum supported phone Windows Phone 8.1 [Windows Phone Silverlight 8.1 apps only] Is there a difference between normal Windows Phone 8 apps that we're currently making, and "Windows Phone Silverlight 8.1" apps? I've never heard of Silverlight 8.1 apps before.

Silverlight 4: how to switch control visibility

浪尽此生 提交于 2019-12-18 04:14:48
问题 I am using MVVM in my Silverlight app. When control visibility is need to be managed by data, I am connecting its 'Visibility' property to object's corresponding property: XAML: <TextBlock Text="Price" Visibility="{Binding PriceVisibility, Mode=OneWay}"/> <TextBox Text="{Binding TicketPrice, Mode=TwoWay}" Visibility="{Binding PriceVisibility, Mode=OneWay}"/> CodeBehind (C#): public string PriceVisibility { get { return PriceVisible ? "Visible" : "Collapsed"; } } But from my perspective,

How do I embed and read a text file ina WP7 app?

半腔热情 提交于 2019-12-18 04:10:21
问题 I'm trying to include a text file that contains some static data that I need to read in when the app starts up. I've added the file and marked the Build Action to "Resource" but I'm unsure of how to actually read it in as a stream. Anyone know how to do this? 回答1: You can use the System.Windows.Application.GetResourceStream method: var resource = System.Windows.Application.GetResourceStream( new Uri("textfile.txt",UriKind.Relative)); should do the trick 回答2: try this: var resource =