silverlight

Visual Studio overwriting UserControl parent when not inheriting System.Windows.Controls.UserControl

I am creating a series of UserControls that all have some similar business logic. So I tried to implement this common business logic in an abstract base class that all of these user controls would inherit from. The inheritance chain looks something like this: System.Windows.Controls.UserControl <-- MyControlBase (abstract)<--MyControl1,...

How to get a certain part of current URL in silverlight?

I need a certain part of current URL. Say for example the URL is: http://www.abc.com/123/product/234?productid=123 And I want to check if a certain string contains http://www.abc.com/123 Please don't give answers like "do string manipulation" and all. Is there a way to get this sort of URL? ...

Silverlight Capture to mp4 C#

Hello, I'm currently working on a silverlight application for a client. is there any way to capture the application to a mp4 file format using C# on the client side?? For use to review the user actions? ...

Using the same usercontrol across all pages of a Silverlight Nav App

I have about 20 pages in my Silverlight nav app. I have 1 usercontrol that I want to use across all 20 pages. I also need the state of the usercontrol to look the same across the 20 pages. So for example if they are on page 1 of the app and they change the background color of the usercontrol it will be the same color across the other ...

Background HTML visibiltiy in Silverlight Full Screen Mode

I am creating a page with Silverlight component and some HTML controls. On enabling Silverlight's full screen, I am unable to view the background HTML controls. Even if I set the xaml's background to transparent. Please let me know if it's possible to view the HTML controls in full screen mode of Silverlight or not. Thanks ...

Why LINQ to SQL does not work with silverlight vb, but if successful c #?

Why LINQ to SQL does not work with silverlight vb, but if successful c #? ...

XAML ScrollViewer scroll bar hidden issue (Silverlight)

I’ve got this strange problem whereby the content within a scroll viewer increases in size, the scroll viewer then shows is horizontal scroll bar. However the grid the ScrollViewer is ultimately within doesn’t seem to resize enough to show the scroll bar. I’ve isolated the problem in this sample app, basically some xaml and some code be...

Bind to Property of Parent Element in Silverlight

I am trying to bind a property of an element within a UserControl to a property set on the UserControl itself in Silverlight. I'm sure it should be simple, but I haven't managed to get it working with either RelativeSource or ElementName binding. In this example I want the Rectangle to be Green (or whatever the UserControl's Background p...

Silverlight 3: No change but now I am getting "Page Not Found"

Had a page that was working fine. Only change I made was to add a datagrid to the page (which also added the xmlns) and all of the sudden I'm getting Page Not Found. Checked the UriMappings. Tried the default nav link. No joy. Ideas? UPDATE: The answer was that I had a mock class that was not initializing a collection. See Byrant's ans...

Loading Images from different UserControls in Silverlight

Loading images in Silverlight has many options depending on what you want to do, but this small problem has me slightly confused. Hopefully somebody here can help me out! In the web project, within the ClientBin directory I have a directory called Images which contains a png file. In the MainPage.xaml file, I can create an Image object...

problem with making Web Request in Silverlight

Hey, I am making restful requests in my silverlight app, I want to get information that might be pushed to the page so i continously make the request to get the updated data, doing something like .... Uri url = new Uri(theUrl);WebClient wc = new WebClient(); wc.DownloadStringCompleted += RetreiveUserMessagesResponse; wc.DownloadStr...

How to access property attributes on a data bound property in Silverlight?

For example, I have a simple textbox bound to a property: <TextBox Text="{Binding FirstName, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}" /> The property looks something like this: [Display(Name="Last Name")] public string LastName { ... } So, given the textbox, I would like to get the Display Name prope...

A grid, a Viewbox, and a Canvas

Ok, I have a Grid which 'auto sizes' to a web browser. In there I have a canvas with shapes drawn onto it. What I want is for the canvas to 'stretch' to fill the page. I tried using a 'Viewbox' from the Silverlight 3 10/09 Toolkit but it does not seem to fill all the space in the grid and only works when I give it an exact pixel count...

Silverlight Navigation project template and the WrapPanel

I'm new to Silverlight and I'm trying to get the WrapPanel sample working with the Navigation project template. My issue is that the WrapPanel doesn't wrap. Here's what I've tried: Create a new Navigation based project. Copy the code from the Toolkit Samples for the "Select a Color" demo. When I create a "regular" Silverlight applicat...

MediaStreamSource in WPF

Hi. I need to play a custom audio stream in WPF. I can deal with the mp3/wmv restrictions. The MediaStreamSource class seems ideal, but all the examples I have seen are Silverlight 3. Is there a WPF equivalent? Thanks Pete ...

Silverlight error-handling conventions: There is no relationship between onSilverlightError and ReportErrorToDOM()?

When I see the call System.Windows.Browser.HtmlPage.Window.Eval (which is evil) in ReportErrorToDOM (in App.xaml.cs) this shows me that it has no relationship to onSilverlightError. So what kind of JavaScript-based scenario calls onSilverlightError? When will onSilverlightError definitely be needed? What are Silverlight error-handling co...

Displaying Silverlight apps in Silverlight?

I am looking for the Silverlight equivalent of the age-old Flash "loadMovie" function. I know it is possible to load code dynamically in Silverlight from DLLs. But this assumes there is a pre-arranged contract between the host and the DLL. I am looking for a way to display Silverlight content within a running Silverlight application, wi...

Polling duplex does not scale... what's the alternative?

Our tests showed that the polling duplex binding simply does not scale and can not be used on a service within a web-farm or even a web garden. We have looked at TCP/IP sockets for a client push method, but the firewall issue is does allow us to use sockets. I was wondering what is the alternative "free" solution to this problem? allowi...

WPF - Control over blending between semi-transparent layers

In digital imaging, when overlaying two visual layers there are multiple ways you can calculate the image that results when light from a lower layer shines through an obstructing layer in some way. This can offer effects that do not occur as natural phenomenon, such as multiplying colours. Here's an example of the layer blending mode m...

Radiobuttons and Silverlight

I have radiobutton in Silverlight 3 with FontSize=20. Within the control the radio dialog image forced to the top alignment. Relative to the text/content the image appears too high. This is not obvious with smaller text sizes however with the large text size the vertical alignment between the text/content and the dialog image looks ...