silverlight

Binding List to DataGrid Silverlight

Hi, I have a problem binding List to a DataGrid element. I've created a class that implements INotifyPropertyChange and keeps list of orders: public class Order : INotifyPropertyChanged { private String customerName; public String CustomerName { get { return customerName; } set { customerN...

Out of browser option is not loaded with controls

I changed the silverlight project property file in to out of browser option. The screen is loaded with no controls. Any idea? ...

How to get a TextBlock to wrap text inside a DockPanel area?

What do I have to do to get the inner TextBlock below to wrap its text without defining an absolute width? I've tried Width=Auto, Stretch, TextWrapping, putting it in a StackPanel, nothing seems to work. XAML: <UserControl x:Class="Test5.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="ht...

WPF/SL EventAggregator implementation with durable subscribers behavior?

Hi. Currently I'm building an application using latest Prism for Silverlight 4. I've a module and in that module I've two views with view models. Also I've a module view with two regions for each view. In module initialization I'm registering my views and view models in Unity container and also register views with corresponding regions. ...

MVVM - RaisePropertyChanged turning code into a mess

New to MVVM so please excuse my ignorance. I THINK i'm using it right but I find my ViewModel has too many of these: RaisePropertyChanged("SomeProperty") Every time I set a property I have to raise that damned property changed. I miss the days where I could just go: public int SomeInteger { get; private set;} These days I have to...

How do I assign a StackPanel to a specific Grid row/column in code (not XAML)?

Given this XAML: <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Margin="5"> How can I assign the Grid.Row and Grid.Column attributes in (C#/VB) code? StackPanel stackPanel = new StackPanel(); stackPanel.??? ...

Windows phone 7 - Is it possible to use its camera in Silverlight?

Is it possible to use Windows phone 7's camera in Silverlight in ANY way? ...

Unable to view ChildWindows in Silverlight

So here is the deal. I have created a silverlight dll that contains two ChildWindow dialogs. These dialogs are self contained with a WCF service reference. I want to reuse these dialogs across multiple projects. I have added a reference to the dll in another project. I am able to new up the childWindow, however, I am not able to set...

Grabbing values from Expression.Blend.SampleData

I am trying to figure out how to grab a value from Expression.Blend.SampleData. If my id is equal to a drop down for example, I can grab it by doing this: ((Expression.Blend.SampleData.MyDatabase.something)(MyDropDown.SelectedItem)).description; I need some way to place my own value where (MyDropDown.SelectedItem) is. Visual studio ...

Ria Services loading foreign keys with Linq-to-SQL

I have a database that consists of 5 tables : Course, Category, Location, CourseCategories, and CourseLocations. The last 2 tables just contain the two foreign keys. A Course has many-to-many relationships with both category and location. I am trying to load the data into a Silverlight app using Ria Services. My DB model is Linq-to-S...

Silverlight and Active Directory Interaction

I am planning to familiarize(read teach) myself with Silverlight by building an in-house app for managing our employees. I, obviously, would need this to interact with Active Directory on some level. What are my options? Has anyone tried this before? I am currently going to explore using Services(WCF???) to do the AD interaction ...

Why am I getting: InvalidOperationException: Failed to map the path '/app42/App_Code/'.

I've been working on a little Silverlight utility which calls a Silverlight web service. It works from my dev machine (XPsp2). I've tried publishing it to a 2008 R2 IIS 7.5 server and it doesn't work when trying to contact the web service. So I've tried using the WcfTestClient to connect to the web service. That gave an error. So I ...

How to set post parameters in WebClient class in a Silverlight app.

First of all, I wrote a simple php page, that picks up some variables from the POST parameters such as a query and a authentication string, and returns the result as xml. I intend to call this page with the WebClient class from a Silverlight application. I'm using POST because we are querying the database with any valid sql statement, no...

Can't call Silverlight from JavaScript in Firefox Mac

I'm creating a Silverlight control using Silverlight.js like so: var properties = { width: '640px', height: '480px', background: 'black', version: '2.0.0.0' }; var events = { onError: function() { alert('eek!'); }, onLoad: function(sender, args) { sender.content.Page.foo(); } }; Silverlight.createObject( ...

Silverlight templated Control databinding to custom properties

Is there some trick that I'm missing here? I've created a templated control, very simple. One single property on it, and I'd like to databind from the (viewmodel/datacontext of the) page in which it's hosted to a custom property on the control. The property will eventually be a vector type object, defining the position of the control, h...

How do I present Prism module views?

Heya, I'm writing a prism application, I've just created my 1st module, fired it all up and amazingly - it works. The application is going to grow soon(TM), and I'll be facing the need to host those modules in separate GUI elements. What type of GUI elements would you recommend to host the modules? Is it possible to data-bind a module...

Is anyone else experiencing weird debug + crash behavior with Silverlight?

I have noticed that after awhile of debug/tweakcode/debug etc that eventually Silverlight starts to crash all of my browsers (i.e. doesn't matter which i fire, they all just crash). If i then go to a site that has Silverlight, it works fine? so it has something to do with debugger + Silverlight not getting along? I then reboot and the p...

Multiple Service Address Configs in WCF Silverlight App

My team is building our first significant Silverlight application, using a 3 layered architecture and WCF. We have developed about 10 separate WCF services in the middle layer so far, and this number is only going to grow. Generally, the presentation layer (ie. the Silverlight app) is pointing to the services as hosted on our dev serve...

C# 4.0 RC, Silverlight 4.0 RC Covariance

Hi, I am trying to develop a Silverlight 4 application using C# 4.0. I have a case like this: public class Foo<T> : IEnumerable<T> { .... } Elsewhere: public class MyBaseType : MyInterface { ... } And the usage where I am having problems: Foo<MyBaseType> aBunchOfStuff = new Foo<MyBaseType>(); Foo<MyInterface> moreGeneralS...

using context menu in silverlight 3

Hi all I am new in silverlight. I want to use context menu in treeview item in my silverlight 3 application . I have searched in the net regarding this I have found my custom application for this but I am not getting them .How to use context menu, how to add rightclick event for using context menu . Thanks in addvance ...