silverlight

Silverlight caching HTTP POST which results in a 404

Situation: I am developing a Silverlight-Application which needs Component based on a local HTTP Listener. The HTTP-Listener can't be 'required' to be installed and running when the Application starts, so the Application does the following: Handshake via HTTP POST If Connection failed open a Click-Once Setup to install the component....

Silverlight DataGrid refresh problem

Hi, I have encountered a problem when I refresh the observable collection behind my Silverlight DataGrid (the DataGrid binds to a PagedCollectionView with an ObservableCollection as source). When I clear the observable collection and add the new items to the collection the DataGrid repositions to the top. I want the DataGrid to keep th...

How to remove named HTML Tags and Contents from a String?

I've tried to understand a few examples, including questions here so I apologise if this seems to me a duplicate but I cannot find a RegularExpression I can understand. I have some HTML to parse using an XML parser - but I want to strip out the <head> </head> tags from this content as the rest is valid enough for normal XML Parsing. The ...

Silverlight File Upload: is this safe?

I've seen the Silverlight upload sample here referenced multiple times on this site and elsewhere, but I have a question about whether or not it's really safe. Quick review: This code does "chunked" uploading to an ASHX handler. UploadFileChunk() instantiates a WebClient and uses OpenWriteAsync and an OpenWriteCompletedEventHandler to s...

Silverlight 4 Datagrid Sorting

I'm having a heck of a time trying to get a silverlight datagrid to properly sort, and do so quickly (sub 1/10 second). Here's the scenario: -WCF callback every 1/5 of a second -Take the callback, match up to the existing record in an ObservableCollection -Update the ObservableCollection's properties -Bind the grid. I've tried a linq ...

Silverlight Navigation - how to override Back button behavior

I'm trying to override the default behavior of the browser's back button in Silverlight (v4). Each of my XAML pages has an ability to show options. I want these options to be hidden when the user presses the back button, or to move to the previous page if the options are not visible. The Silverlight Frame seems to set back and forward po...

Silverlight ChildWindow Memory Leak

Does anyone know how to resolve to the memory leak in SL3 with the ChildWindow? Refer to the code snippet below: private void Button_Click(object sender, RoutedEventArgs e) { var window = new ChildWindow(); window.Closed += new EventHandler(window_Closed); window.Show(); } void window_Closed(obje...

Since Microsoft remove streaming site, are there any other free site to host Silverlight?

Any free site to host silverlight application? Old answer from StackOverflow that doesn't apply anymore ...

How to specify unique container styles for heterogenous hierarchies using SL3 and TreeView control

Hello, Just look for strategies that have been successful in rendering hierarchies that represent inheritance structures using SL3/4 TreeViews. I need to render certain nodes differently than others, depending upon what kind of container they are (a choice between things, or simply a list of related things, etc.) So far, I've been ver...

How to add a click event to a textbox created in code

I'm using silverlight 3 and i'd like to create a handler and event wired up to a mouse click in a text box that was created in code behind. Can someone point me in the right direction. I need to make it so that some things fire off when that textbox is clicked into. if you have an example in vb.net that would be even better. thank...

How to play youtube vidoes in silverlight(in browser)?

I want to develop an silverlight application which plays youtube videos. I dont want to let users install my silverlight application on thri PCs, so I would need to play the videos in browser. Is there anyway we can achieve this? ...

does Silverlight 4 support wshttpbinding?

Now that the stable release is out, could someone please confirm if SL4 supports wsHttpBinding? and also any feedback on netTcpBinding? ...

Login Functionality For Silverlight Application

Hi All, I have a silverlight application that requires the user to login. The problem is when you hit the refresh button on the web page it reloads the site, and requires the user to login again. What I want it to do is act like ASP .NET where the user will remain logged in for 20 minutes even if they hit the refresh button. What mec...

DataGrid row and MVVM

Hi, I have a wpf datagrid with many rows, each row has some specific behaviors like selection changed of column 1 combo will filter column 2 combo, and what is selected in row 1 column 1 combo cannot be selected in row 2 column 1 combo, etc... So I am thinking of having a view model for the main datagrid, and another for each row. Is ...

Conducting Quiz

I want to conduct a quiz using silverlight. This quiz contains few questions and each question will have multiple choices (Radio Buttons). User should select one answer. After completing the quiz I need to display Result. Is it better to provide the questions and options in XML Document and then retrieve it into silverlight class? If y...

Reading XML using XElement in Silverlight

Hi, Can anyone please guide me on how to use XElement in Silverlight (C#) to read an XML file. Thank You! ...

silverlight. Wait end async method in sync method.

Hello guys. I've got strange issue. I want wait end async call at sync function call. At other projects I successfully use ResetEvents, but in sl it don't seem to be working. //Sync call save some value in storage public static void SaveValue(string key, object value, bool encrypted) { if (encrypted) { ...

TreeViewDragDropTarget could not be found

I am trying an example with the TreeViewDragDropTarget however I cannot find the control in the toolkit. I am using the latest version of the toolkit. How can i use this control? ...

How do I call a webservice in the Application_Exit event

Hi, I have learnt from a lot of sources that it is not possible to call a webservice in the Applicaton_Exit function. I basically want to do a DB update to stop a dispatcher timer with the current timer value when the user closes the browser. How can I achieve this? I am using Silverlight 3.0. Regards, Syed Nadeem. ...

Manipulating existing XDocument (fails)

Hi there, I got the following Code snippet from my Silverlight Application: var messages = from message in XcurrentMsg.Descendants("message") where DateTime.Parse(message.Attribute("timestamp").Value).CompareTo(DateTime.Parse(MessageCache.Last_Cached())) > 0 select new ...