silverlight

How to enumerate all input controls in silverlight

Is it possible to enumerate all the input controls in the codebehind of a silverlight user control? For example, say you wanted to perform a form submission behind the scenes to another service. You would need to send a POST which included all of the inputs contained on your silverlight page. ...

Consuming Oracle Data with Silverlight

So I want to get some data on the server side using OracleClient. Something like OracleDataReader rdr = OracleDataAccess.ExecuteReader(Conn, sQry); What is the best way to deliver this data to Silverlight? I set up a web service I just don't know the best data structure to package the result set. The silverlight CLR can not use the Or...

wasn't there a way to generate an event handler from the XMAL editor in a silverlight project

Not wanting to enter into the debate of wiring up event handlers in code or in XAML, sufice it to say, that I seem to recall there was a kind of "tab to create" feature in the XAML editor for silverlight projects. Clearly it's been a while since I have been codeing XAML, but I was sure it was a simple process of adding an event handler ...

Binding complex properties in Silverlight/WPF

Lets say I have a custom data type that looks something like this: public class MyDataType { public string SimpleProp1; public string SimpleProp2; public List<SomeType> ComplexProp; } now I hava a data bound control (i.e. ItemsControl or DataGrid), that is created dynamically. How would the binding defined in xaml code look like...

Silverlight 3 - RIA Services and LINQ

Hi This is a basic LINQ question. In my RIA Services Application, I have a Family object with Contacts in a child list. This is a entity framework application. I am wondering why when I select my fam the child list of Contacts are not loaded, well I know that it must because of lazy loading but how to I get my query to load the child...

Silverlight 3 - dataform errorsummary with RIA validation

Hello, I got a dataform partially working with RIA services (I can fetch and edit data). The problem is that I added validation to my RIA service fields. Ex: from my metadata.cs file [StringLength ( 50, ErrorMessage= "bad data dude!" , MinimumLength=4)] public string Title; In the dataform, when a user enters data violating the abov...

Silverlight databinding a textBlock in another user control

I have a small usercontrol that basically increments or decrements a value by one. The user control has two buttons(one to add and the other to subtract) and a textBlock that is used to display the value. I am going to have multiple instance of this usercontrol in another usercontrol so I can manipulate values of a dataclass that has an...

Silverlight 2 - Download file - IE Blocks file download

Hi All, I'm having a problem with IE only in my Silverlight application. Since Silverlight 2 doesn't include a mechanism for file downloads I was left to my own devices to come up with a solution. The way I did it was as follows: HtmlPage.Window.Navigate(new Uri(sb.ToString(), UriKind.Relative)); My StringBuilder contains the relative ...

silverlight error - the opreation is not supported for a relative uri

Hello All, I've just started developing silverlight applications. I've created a webserivce in my asp.net project. Now, when I try to connect to it through my silverlight project I receive the following error: "the opreation is not supported for a relative uri" I am using the following url --> http://192.168.1.2/MyWebsite/SubVersioned...

Amazon Elastic Cloud and Silverlight Deployment

We are experimenting with hosting a silverlight application on Amazons EC2. I can get it to serve up the .xap file, but I'm having some trouble with using the webservices that the silverlight application requires. Usually I would add a service reference in visual studio and enter the URL for the webservice, something like http://url.co...

Capturing tab in Silverlight TextBox

How can I capture a tab entered in a Silverlight TextBox and render 4 spaces (or a tab) in it's place? I can't figure out how to block the tab navigation. ...

Why would INotifyPropertyChanged only fire when at least TWO characters are changed?

I finally got a Silverlight MVVM example to work so that when I change the values of first name and last name text boxes, the full names change automatically. However, and strangely, my model which inherits from INotifyPropertyChanged is only notified if I change at least 2 characters of either the first or last name. if I change "Sm...

Silverlight Full Screen input problem

Hi, I am having some problems with the Silverlight full screen mode. If I switch my application to full screen all the input from the keyboard is not handled. No textbox input, no key down / key up event and probably much more. Here is a sample application that demonstrates this : Xaml : <Canvas> <TextBlock Text="Try some input:" C...

What are your strategies of binding the DataContext in MVVM?

These two 1-hour videos show step-by-step how to use the MVVM pattern to build simple quiz applications in both Silverlight and WPF: Implementing Model-View-ViewModel in Silverlight Implementing Model-View-ViewModel in WPF What amazes me about these is how different they are structurally, for instance, how they use DataBinding: In th...

IIS Silverlight not connecting to WCF

Hi, I am at a loss, and hoping someone here can help me. I have created a WCF service that runs on a remote computer. The service is self-hosted, but provides the clientaccesspolicy.xml through a webget command. I also have a silverlight application that queries the WCF server. I access the service through a service reference. When ...

How to add context menu to Silverlight tree items?

I want to have context menus attached to tree items in my Silverlight Toolkit tree. How can I do this? ...

Silverlight RoutedEvents and Exceptions

I have a complex application that consists of an Application, containing many modules, each containing many views. The behaviours of my views may throw exceptions. Sometimes I want to handle exceptions on the view that created them, sometimes in the parent module, sometimes in the grand-parent application. The concept of RoutedEvents s...

Are WPF and Silverlight command implementations useless for the M-V-VM (M-V-P) pattern?

Please excuse my ignorance, I only started coding in Silverlight recently. I tried implementing the command pattern in Silverlight and hit a wall. They say commands are great, because you can write them into xaml, so you can keep your code-behind clean, also you have loose coupling between your view and your viewmodel because there is n...

Silverlight Design Resources for the Inept

I'm steadily progressing on Silverlight from a programming standpoint. I believe I'm to the point where I want my application to look decent to begin demo'ing. Doesn't have to look awesome, but not like a 2 year old did it (although a 2 year old might be a step above my current design skills). With HTML, you could typically find some ...

Silverlight - Binding with ObservableCollections

This is no doubt a newbish question, but I have looked for an answer to no avail. My setup is simple: I have a ListBox control defined in XAML and an ObservableCollection<MyClass> in the same class. I am binding the ObservableCollection<MyClass> to the ListBox. Within the hierarchy of this ListBox in XAML, I want to bind to a given My...