silverlight

Is HTML 5 + CSS 3 >= Microsoft Silverlight

It is said that the unreleased HTML 5 and CSS 3 can produce the effects and graphics which can be done in Microsoft Silverlight. It thats true then can I skip learning Silverlight and wait for HTML5 and CSS 3? ...

Silverlight DataBinding, avoid BindingExpression Path error on missing properties, hide controls instead

Hi Stackoverflowers! imagine the following simple Models (example for simplicity reasons; in fact, we have MVVM here but it doesn't matter): public class User { public string Username { get; set; } } public class StackOverflowUser : User { public int Reputation { get; set; } } Now we have a Silverlight UserControl which contains...

Sanitize Silverlight input

Hey, I have a silverlight application that allows the user to modify their username, password, bio etc. This information is stored in a MySQL database and retrieved used a WCF webservice. I need to sanitize all information received from the user before it gets into the database. At the moment I can't store apostrophes in my DB. Where is...

silverlight mouse event

I am creting some border objects on a canvas through code behind. I don't have any XAML for these borders. Their opacity by default is set to 0.5 and I want to change their opacity to 1 on mouse enter. This is the code I have to try and make a mouse enter event for them. But it doesn not work. I think I have to cast the sender object as...

Silverlight Conditional CheckBox/RadioButton

Imagine I had a list of names, each paired with a value ("C" for CheckBox or "R" for RadioButton). Can I put together a template to display the correct control based on the given value? For instance if I have "Name0, C" I'd like to display a CheckBox labeled Name0. If I have "Name1, R" I'd like to display a RadioButton labeled Name1. ...

Silverlight XAML - set child item properties

I've got a Grid in my XAML page. The grid is simply a holder for XAML loaded from the database: <Grid x:Name="dynamicXamlHolder" /> I want all <TextBlock> objects that get inserted into that grid to have .TextWrapping = Wrap. How can I do this? I'm sensing styles might be the answer, but it's unclear to me how to create a grid style...

How can I get the X and Y position of a path in Silverlight?

I have some paths that are not inside any canvas, and I want to know how to get their X and Y position to create animations based on it. <Grid x:Name="LayoutRoot" Width="640" Height="480"> <Image Source="SC.png" Stretch="Fill" Width="640" Height="480" d:LayoutOverrides="HorizontalAlignment"/> <Path x:Name="but77" DataCo...

Multiple WCF endpoints for same service with Cassini

I'm trying to config a WCF service for Silverlight to use either http or https and it works fine with IIS, but not the web server built into Visual Studio (Cassini). The services section of web.config system.serviceModel is: <services> <service behaviorConfiguration="RhymeDotBehavior" name="RhymeDot.Service.Root"> <endpoint name="Rh...

What presentation design pattern fits HTML5 development?

There are various discussions about whether to use Flash, Silverlight or HTML5. When it comes to Silverlight, it has very different programming experience (more of a desktop model), and this makes it reasonable for Silverlight applications to use MVVP presentation pattern. But when it comes to pure HTML5-based Web application, is there ...

Dataform.EditTemplate Use Display string

Hi, Here is a part of my DataForm <Grid x:Name="LayoutRoot" Background="White"> <df:DataForm x:Name="df1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CurrentItem="{StaticResource descriptor}" CommandButtonsVisibility="All" AutoGenerateFields="False" > <df:DataForm.EditTemplate> <DataTemplate> ...

WCF service returns HTTP 200 header and then times out without returning any content.

I have a Silverlight 4 user control that calls a WCF service residing within an ASP.NET 4 web application. Anonymous access to the webservice is enabled. clientaccesspolicy.xml is in place and downloads successfully. Navigating to FieldITDbService.svc on the server correctly pulls up the service metadata. However, when I try to view t...

How to debug WCF service with Silverlight

I have two solutions, one is the WCF service and the other one is the Silverlight. I would like to use the debugger on both solutions at the same time. The debugger for the WCF service automatically starts a ASP.NET development server. However, I have a hard time making my Silverlight client connecting to the ASP.NET development server. ...

How to import a .rtf file to silverlight 4 richtextbox?

Hi, experts, I have a .rtf file and want to put it in a richtextbox in silverlight 4. Unfortunately we do not have .rtf property in silverlight 4 richtextbox, we only have .xaml. So what i did is to create a FlowDocument, than load the .rtf to this FlowDocument, then format it to xaml. then assigned it to richtextbox. But i got a argum...

Silverlight webbrowser control

Is there a way to fire an event when the user clicks on link on a web page. I looked at all the events available for the webbrowser control and the only one I saw was the LoadCompleted event. But this event fires after a page has been loaded. I need to fire an event right before a page is loaded. ...

Unable to set a reference to System.Data.dll in a Silverlight client project

I created my first Silverlight application. In the client project, I want to define a Dataset object. To do so, I figured I first need to reference the System.Data namespace in the dll of the same name. When I add a reference to the dll, I get a msg that "it was successfully added," I see thje dll in copied to the bin folder, and then ...

how to use/migrate a dll (built by me) in silverlight ?

I have a class library built on .net 3.5, I wanted to use it in a silverlight project and it told me that I must build it against silverlight runtime, anybody knows how to do this ? can I migrate it, or should I create a new silverlight project and rewrite it or something ? ...

Delay in silverlight initialization in aspx page

Hi All, We have a silverlight/asp.net application which communicates with WCF to fetch data. Now we are facing a problem where in the silverlight component is taking some time to initialize after the asp.net page life cycle is completed. We have tried tracing all the events and found that there is a time lapse between the aspx page unl...

Silverlight treeview. Cannot bind "IsExpanded" property

I have treeview control and i want bind tree nodes IsExpanded property to my datasource items! But i have exception: System.Windows.Markup.XamlParseException occurred Message=Set property '' threw an exception. StackTrace: at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at Silverlig...

HOw to Include many level objects in LINQ Queries

Hello friends , im using Silverlight and Ria services i have the following linq function in ria that returns an object called DependantPerson: public IQueryable<DependantPerson> GetDependantPersons(int PerID) { return this.ObjectContext.DependantPerson .Include("Person1") .Where(dp => dp.Person_FK...

Get an Element from Treeview

Hi, I have got a Rectangle inside the HierarchicalDataTemplate of a TreeView. On selectedItemChange event of Treeview i have to change the color of the Rectangles coming as children under that selected node. I am not able to assign a name to the rectangle during binding. It is showing an error 'Text representation expected for name pro...