silverlight

Queue a thread in .net

I have 2 functions that needs to be executed one after the other. In this function, async calls are made. How do I go about executing the second function after the async call is completed? For eg. public void main() { executeFn("1"); executeFn("2"); //I want this to be executed after 1 has finished. } private bool executeFn(str...

Silverlight Column Chart series and data based colors

How can I build a Column Chart with its chart item's color retrieved from data that is bound to or computed by the chart series? ...

Silverlight - Bing Maps - Customize Pushpin Style

Hello, How do I customize the style of a pushpin on the Bing Maps Silverlight control? I have reviewed the documentation shown here (http://www.microsoft.com/maps/isdk/silverlightbeta/#MapControlInteractiveSdk.Tutorials.TutorialCustomPushpin). However, I am programmatically adding a variable number of Pushpins. Ideally, I would like to ...

WCF RIA services?

Does WCF RIA services supports custom methods? also in which dll can i find the "[Custom]" attribute? ...

RowDetailsTemplate doesn't autosize back - Silverlight DataGrid

Hi, Please look at the attached screenshots. I'm adding a datagrid to the rowdetails area for each row in the template. The problem I have now is that the rowdetails area sizes correctly when it gets larger, ie when more content is added. But once you collapse those rows(and their corresponding rowdetails) and open another rowdetail...

How To Set ComboBox's SelectedItem Programmatically via Silverlight?

Here's my scenario - I am working with SL3 (and WCF Data Services) and I have a custom form that manages Employees. On the form, I have some simple TextBox(es) and some ComboBox(es) for entering basic information for an Employee. In my architecture, I have some base classes, one to handle the Collections of objects (ObservableCollectio...

How do I bind an Image dynamically in XAML?

The following displays an image correctly in a silverlight usercontrol: Image image = pagingManager.BaseApp.DatasourceManager.GetImage("helloWorld1"); ContentArea.Content = image; ... <ContentControl x:Name="ContentArea"/> However, I want to dynamically bind the image to XAML, e.g. like this: #region ViewModelProperty: MainImage priv...

Silverlight DataGridDragDropTarget. How to drag a data grid item into a stack panel / user control?

I have data grid. I have DataGridDragDropTarget from November Toolkit. I now can drag and drop a data grid item to a listbox or tree view.. However I need to drop the item onto my user control (and add it to a plane stack panel). There is an article from the guy who wrote all these extension: http://themechanicalbride.blogspot.com/200...

Silverlight. Fix needed. Dragging stack panel item to the right moves it underneath other items...

I have stack panel with custom controls in it. I attach standard MouseDragElementBehavior to each item. When I drag to the right the item moves underneath the other items. What would be a viable solution to create better user experience - to show better visual cue - how the item moves and where is it going to be dropped. ...

Common resources in Silverlight and .NET

Hello. Is any way to use common resource file in Silverlight and .Net project? I try to make link to Silverlight resources but different namespaces not allows ResourceManager to get resources from assembly. Do you have any ideas? ...

Silverlight Gridcolumn Collapse Visibility in code

Hi, I'm having a small problem. I have this grid with a column: <data:DataGrid ColumnHeaderStyle="{StaticResource headerStyle}" Foreground="#234BC3" AutoGenerateColumns="False" Name="protocollenBAMDataGrid" LoadingRow="myDataGrid_LoadingRow" SelectionChanged="DataGrid_SelectionChanged"> <data:DataGrid.Columns> ...

Ways to detect a request made by Silverlight in Asp.Net MVC

I'd like to detect requests made by my Silverlight client in ASP.Net MVC. Silverlight can't set 'X-Requested-With' as far as I remember. What do I use instead? ...

Security problems with Silverlight 3 application

I have a Silverlight 3 Application and for security I'm using Active Directory. For some reason that I can't explain whenever I access my app in the production servers the default browser authentication window pops up and I have to Authenticate two times! Whats up with that? I checked IIS and everything seems fine! ...

Silverlight datagrid don't show any data with anonymous query RIA services

Hi all! I have an anonymous linq query that I bind to a datagrid, when I debug it brings alright the data but it doesn't show in the datagrid, I suspect that the request to RIA services isn't completed before I bound it to the datagrid. I could use the LoadOperation<>() Completed event. But it only works with Defined Entities so how can ...

Which ui framework to select

In a windows/.net environment I currently use castle monorails with jquery to provide an administrative interface to an e-commerce application. This application works nicely, but has no real concept of ui composition. Up to now this has not been a problem, because the ui was targeted to a single user base, and a single domain object. Th...

criteria for choosing jquery or silverlight

For creating interactive web apps, Silverlight and Jquery (jqueryUI included) are used. Is there a list of criteria based on which this selection can be made to go with either silverlight or jquery ...

How Can I Compare Any Numeric Type To Zero In C#

I would like to create a function that checks if a numeric value passed as an argument has a value greater than zero. Something like this: public bool IsGreaterThanZero(object value) { if(value is int) { return ((int)value > 0); } else if(value is float) { // Similar code for float } return f...

How can I upload a file to a Sharepoint Document Library using Silverlight and client web-services?

Most of the solutions I've come across for Sharepoint doc library uploads use the HTTP "PUT" method, but I'm having trouble finding a way to do this in Silverlight because it has restrictions on the HTTP Methods. I visited this http://msdn.microsoft.com/en-us/library/dd920295(VS.95).aspx to see how to allow PUT in my code, but I can't fi...

How to get SYSTEM_POWER_STATUS using Silverlight 2/3/4 ?

I have a Silverlight application running full screen. Is there a way i can display system power status ( basically battery indicator how much is remaining ? ) using silverlight? I tried following [DllImport("kernel32.dll")] private static extern long GetSystemPowerStatus(SYSTEM_POWER_STATUS lpSystemPowerStatus); But got error messa...

Hosting a Silverlight database application that works with MySQL

I have a basic hosting package that gives me access to create a MySQL database. I can of course host silverlight applications on any site. But how can I work with a database from within Silverlight? I cannot run any service on my hosting provider, they only allow php or perl scripts. ...