silverlight

ComboBox.SelectionChanged doesn't catch the first selection

I need to fill textboxes depending on the item selected in a combobox. I fill combo async and in Completed event I have the following code combo.ItemsSource = e.Result; combo.DisplayMemberPath = "Name"; combo.SelectedIndex = -1; Then in the SelectionChanged event of the combo, I catch the selected object MyClass mc= ((ComboBox)sender...

Does a silverlight video player always need source address in URL format only?

I have seen on many sites the silverlight video player. I noticed that all of them took a URL as the source of the video file. Can a silverlight player play a video file kept locally? I mean a simple HTML file kept in a folder with the xap (say VideoPlayer.xap) and the video (say ABC.avi) file. The html file would contain an object ...

Displaying a silverlight plugin in a jQuery UI dialog box not sizing correctly.

I have a login page which detects if silverlight is installed and will degrade to html when it is not. I'm using jQueryUI.dialog to display both; the dialog box appears but is too small to see the content completely and i have to resize it manually. I think it's something to do with the order the javascript is running on the page. Can ...

Adding custom properties to Silverlight controls

Hello, What is the best way for me to add my own properties to an existing Silverlight control? For example I would like to associate a custom class with the DataGrid and be able to set the properties of this custom class in Expression Blend? Is this an easy thing to do? Thanks, AJ ...

silverlight with WCF(get data through collections)

in my silverlight page I am fetching the data through WCF WCF is returning an BusinessEntityCollection that is the collection of rows SqlParameter[] sqlParameter = new SqlParameter[]{new SqlParameter("@recordType",recordType)}; MenuEntity menuEntity; MenuEntityCollection menuEntityCollection = new MenuEnt...

silverlight accordion control

how can create accordion control dynamically and bind the data from code behind. ...

Can't add reference from Silverlight app to WCF-service that is hosted by ASP.NET

A "Silverlight-enabled WCF service" was added into existing ASP.NET web-application. On attempt to add reference from the Silverlight Application to the service the following error was received: Object reference not set to an instance of an object. How can I add reference? Thanks. ...

Element is already the child of another element.

I get the folowing error in my Silverlight application. But i cant figure out what control it is that is the problem. If i debug it don't break on anything in the code, it just fails in this framework callstack with only framework code. Is there any way to get more information on what part of a Silverlight app that is the problem in this...

Silverlight Chat WrapPanel Crash / Bug

I've been given the task to create a simple Silverlight chat box for two people. My control must adhere to the following requirements Scrollable Text must wrap if it's too long When a new item / message is added it must scroll that item into view Now I've successfully made a usercontrol to meet these requirements, but I've run into a...

How can I show a "selection highlighting"-rectangle around a column of a Silverlight Grid?

I have a feature matrix implemented with Silverlight's Grid where users need to select a product. How can I indicate selection with a rectangle around the whole selected column? It is easy to put a CheckBox at the bottom of each product's column, but that is too dull. I would have preffered to use SL Toolkit's DataGrid (with built-in ...

What is the Silverlight keycode for a dash "-"

I've tried Key.Subtract but I think that is the numpad version. I'm looking for the one after the zero key. I wish to handle it in a KeyDown event. Thanks ...

Random "Not Found" error with Silverlight accessing ASP.NET Web Services

I'm developing an application with Silverlight 3 and ASP.NET Web Services, which uses Linq to SQL to get data from my SQL Server database. Randomly when the user causes an action to get information from any of my web service methods, Silverlight throws the exception "The remote server returned an error: NotFound.", of type "Communicatio...

MVVM- Trigger Storyboard in the View Model in Silverlight

I have a couple of Storyboards in my view that I would like to trigger from the ViewModel if possible. Is there a simple way or elegant way of doing this. Here is what I am trying to do. Person Clicks on a Button-->RelayCommand (In the ViewModel), the Relay Command should then play the storyboard. Also one more thing, I would like to a...

Images from SQL Server JPG/PNG Image Column not being Type Converted to Bitmap in HttpHandlers (consumed by Silverlight Client)

Our Silverlight 3.0 Client consumes Images stored/retrieved on the File System thorough ASP.NET HttpHandlers successfully. We are trying to store and read back Images using a SQL Server 2008 Database. Please find the stripped down code pasted below with the Exception. "Bitmap is not Valid" //Store document to the database private...

Can you bind to DataForm.Mode from within its EditTemplate in Silverlight?

I have a DataForm in Silverlight. I have a single <DataForm.EditTemplate> defined for this control. I want to bind to the Mode (Edit/ReadOnly/AddNew) from within the template (I have a convertor to show or hide things depending upon the mode). Element binding doesn't work from within the EditTemplate but couldn't get RelativeSource t...

Setting a Silverlight textbox control's width relatively

Hello, I tried searching on stackoverflow for an answer to my question but couldn't seem to find anything relevant. Since I'm relatively new to Silverlight, I'm not even sure if this is possible, but I am trying to figure out if it is possible to set a Silverlight textbox control's width value proportionally to it's immediate parent co...

Getting PropertyChangedCallback of a dependency property always - Silverlight

I have a dependency property and a callback. public static readonly DependencyProperty IsBusyProperty = DependencyProperty.Register("IsBusy", typeof(bool), typeof(TabHost), new PropertyMetadata(false, IsBusyPropertyChangedCallback)); private static void IsBusyPropertyChangedCallback(DependencyObject o, ...

Bing map silverlight control content rendering issue when page gets refresh

When Bing map control loads for first time on any browser all pushpin on map are visible. Bing map control renders perfectly. Then I refresh browser it create rendering issue some custom pushpin on map gets disappeared. This behavior continues with pushpin. Pushpin are (.png) images and I am not using default bing map thumbtacks. May ...

WCF, Silverlight: Is Request/Reply possible over PollingDuplexHttpBinding?

Hello. We have been using PollingDuplexHttpBinding for some time to do Pub/Sub messaging. We have methods that do not return results that allow clients to subscribe to some data feed then then the service pushes data back via CallBack contracts. Just now we have been adding some Request/Reply methods to our OperationContract. As the cl...

Is there a way to synchronize Silverlight Child Window (make it like MessageBox)?

ChildWindow1 wnd1 = new ChildWindow1(); ChildWindow2 wnd2 = new ChildWindow2(); wnd1.Show(); //**Is there a way to pause thread here until wnd1 is closed???** wnd2.Show(); ...