silverlight

Setting initial control focus in Silverlight

I'm looking for a way to automatically set the initial focus on a Silverlight UserControl to a specific control. I have a login page with a user name textbox and I'd like to have it so that as soon as the user goes to the page their cursor is already positioned and waiting in the username textbox instead of having to make them click the ...

Silverlight: Programmatically binding control properties

The big picture: I have a custom child control that generates various textboxes, datepickers, combo etc based on properties that I set. This control is embedded in various places within my SL application. I generally use the MVVM pattern, and I want to bind the values of these dynamic controls back into my master page view model. I al...

How to return Domain objects from a WebService to my SilverLight Application

Im my DDD Aplication I have a lot of Domain Objects like date: class User() { public String Name{get;set;} } The persistence of then already done! Now im going to Client Side (SilverLight). My problem is: how i work with a User object on Client Side. Example: // only a example User user = Service.Login("crazyjoe","1234"); ...

Silverlight application architecture

I just started learning Silverlight, and I'm wondering about the typical architecture of a Silverlight application and the workflow in the application (I'm using Silverlight 2, but will move to 3 any time soon). In my test-application I currently only have the two default projects - MyProject and MyProject.Web. I'm familiar with the MV...

Silverlight Ftp Upload

Hi I'm working on trying to ftp a file to the server through a silverlight application. Where the location to upload the file on server file system, exists outside the sandbox area for the web server. In this case the web server root exists at "C:\test\www\" and the location to upload the file will exist at "C:\User\Uploads". In this ...

Silverlight stuck on server side when calling wcf service

Hello all, I am developing a small application using silverlight 3.0 beta and an aspnet web application. I've created a silverlight enabled web service (.svc). I am able to call the service via silverlight, when debugging I can see that the call successfully emits in the server side, but when it's time for the server to return the calcu...

Streaming audio file to another computer

Hello everybody, This is what I am trying to do. We are 5 people in a room. Everybody has a PC. Each PC has mp3 files but only one of the PCs has speakers (ex. called Speakers-PC). So, instead of asking the person on Speakers-PC to play you a song you want, I was thinking of an application that can take an audio file from a No-Speakers-...

Silverlight Polyphony

Any ideas or working solutions for achieving polyphonic audio in Silverlight? It is possible to play individual notes using sound files (e.g. wmv), but holding samples of every combination of the 3, 4, 5 or more note combinations in a chord based on any one of twelve root notes is unworkable. In WinForms I can use APIs to access the sou...

Announcments Control in WPF

What is the recommended way to implement an announcments (or news) control in WPF? Thanks. ...

How to delete cookie when silverlight application is closed ?

I am creating an application with silverlight 3.0 . In This application I had create one cookie Now if any end user will close browser then i want to delete data from that cookie. How can i delete that data from silverlight application. ...

Silverlight and J2EE

Hi All, I am currently experimenting with silverlight for the first time and I am interested to know if there any frameworks which can help utilize a J2EE backend. I have read online that silverlight supports socket connections which seems very interesting given the nature of the applications I am building. Does anyone know of any reas...

Using an attribute to throw an exception in .NET

Hello, Is it possible to use some kind of attribute to throw an exception. This is what I mean. Instead of doing this: public int Age { get { return this.age; } set { this.age = value; NotifyPropertyChanged("Age"); if (value < 18) { throw new Exception("age < 18"); } } } D...

Are WCF polling duplex services usable by other clients?

I'm writing a server app with a silverlight client. At some point I'd like non-silverlight clients to be able to use my services. Right now I've written some WCF services which get polled, but I'm not happy with the responsiveness. I'm thinking of switching the code over to using Silverlight/WCF duplex polling, but if I do that, will I b...

How do I get the URLs to display properly when switching from the SL3 Beta?

I was using the SL3 beta and used the Deep Linking functionality as part of my application. When I switched to SL3, the deep linking stopped working. What do I need to do to get it back? ...

How do you get the client size in a Silverlight Application?

I want to get the size of the browser window running my Silverlight Application? I've tried the following lines, but it always returns zero! public Page() { InitializeComponent(); Initialize(); } public void Initialize() { WorldLimits.Y = Application.Current.Host.Content.ActualHeight; W...

Silverlight Image in Listbox

I have a listbox with a data template. The problem is that it expects the source to be a string. The string I have is a uri of an image inside the xap file. So it would be uri( xxx, uri.relative) How do I get it to look inside the xap file for the image since I can only use a string value? ListBox.ItemTemplate DataTemplate StackPanel Or...

Converting Int to Color in C# for Silverlight's WriteableBitmap

In Silverlight 3 there is now a WriteableBitmap which provides get/put pixel abilities. This can be done like so: // setting a pixel example WriteableBitmap bitmap = new WriteableBitmap(400, 200); Color c = Colors.Purple; bitmap.Pixels[0] = c.A << 24 | c.R << 16 | c.G << 8 | c.B; Basically, setting a Pixel involves setting its color, ...

Binding ItemsSource to a "proxy" collection. How to get DataContext?

We've got a Silverlight application with several listboxes and comboboxes that display data sorted incorrectly, which I need to fix. Most of their ItemSource properties are set through XAML. Their DataContext may not be set directly on the control, and instead were set on a parent. So I can't easily slap an "OrderBy" on the ItemSource or...

VS 2008 Opens Default Browser instead of IE for SilverLight Application

Hi My default browser is Chrome. When I run my web applications within VS 2008 IDE, it uses chrome. I want to use IE for this. Is there an option in VS 2008 to make IE the browser to load the web applications? I just want this when using VS 2008 - I don't want to change my default browser each time otherwise. EDIT: when creating a s...

Silverlight: Problem customizing the DatePicker template

I'm trying to override the default DatePicker template in Silverlight. I want to remove the DatePickerTextBox and replace the content of the "calendar" icon to the right of the DatePickerTextBox with just the Month and Day as the content. Here's where I'm at, there are two ContentPresenter controls each with a different way of trying to ...