silverlight

Retrieve baseUri w/o resorting to Application.Current

My custom controls are not loading in VS.NET's designer because of a null reference exception. It's got everything to do with the way I am retrieving the baseUri of the application when it runs in the browser: _uriPrefix = Application.Current.Host.Source.AbsoluteUri.Substring(0, Application.Current.Host.Source.AbsoluteUri.IndexOf(...

Animations and MVVM in Silverlight

OK I have looked and searched all i want to do is fire a storyboard animation from my view model onto my view. The problem is there is just simply too much boilerplate code to get a simple thing like myStoryboard.Begin(); firing. So what are the methods that you use? Currently, I am using Silverlight 3, MVVM Light. EDIT: I can't use so...

sql locking on silverlight app

Hi, i am not sure if this is the correct term, but this is what id like to do: I have an application that uses a mssql database. This application can operate in 3 modes. mode 1) user does not alter, but only read the database mode 2) user can add rows (one at a time) onto a table in the database mode 3) user can alter several tables in t...

Slider - Moving of slider clears the screen.....

Hi, I am currently working on Silver light 3.0. Currently facing one simple issue but not able to find the solution about it. I have one column slider, which is placed in between column 1 and column 3. Column 2 contains slider itself. But when i move the slider from column1 on column 3. That means column1 will only be visible right n...

Moving from Silverlight 3 to Silverlight 4

Hi, I moved my app from silverlight 3 VS2010 to a system having Silverlight 4 and VS 2010. When I open the Solution I get the following error in the MainPAge.xml. What is wrong. Could not resolve mscorlib for target framework 'Silverlight,Version=v3.0'. This can happen if the target framework is not installed or if the framework monik...

How reliable is DateTime.UtcNow in Silverlight applications?

I have a silverlight application which users will be running in various time zones. These applications load their data from the server upon start up, then cache it in IsolatedStorage. When I make changes to the data on the server, I want to be able to change the "last updated time" so that all silverlight clients download the newest da...

Problems with overlapping ChildWindows in Silverlight

Hello, I have a Silverlight application. At some point the app shows a ChildWindow with two datagrids and three buttons on it. One of the buttons is 'Reset To Defaults'. After it's pressed, the app shows another ChildWindow on top of the current one in order to ask confirmation. After the second ChildWindow is closed the first one star...

Considering migrating to silverlight - are there any official figures for silverlight propagation, and advice?

We are considering migrating our site from flash to silverlight, and also building additional components in silverlight. However there is a strong argument that many people do not have silverlight on their computers, and will not or cannot install silverlight. Are there any official figures on how many computers have adopted silverlight...

Silverlight ria services giving httpContext.Current is null

Hi, I have started playing around with Wcf Ria Services with silverlight. All was working until this morning. For some reason I get HttpContext.Current as null in the call: private static bool OwnsFile(string virtualPath) { if (!virtualPath.EndsWith(".svc", StringComparison.OrdinalIgnoreCase)) { return false; } if (!Virtu...

Handling async ASMX web service exceptions

Hi, I've developed silverlight client with makes async web services calls to a asmx web service. The problem is, I want to handle exceptions, so far as to be able to tell in the client application whether there was an exception in the webservice (and therefore will be logged local to the webservice) or whether there was a communication ...

telrik radwindow : Value does not fall within the expected range

I have two user controls that contain the telrik radwindow. When I try to open second window on first window button click, I get the exception: "Value does not fall within the expected range". ...

How to write back to database from Silverlight?

Hi, I use LINQ to SQL to get data from a database and use a service contract to access it in Silverlight at the client side. I display the data in a DataGrid. Now how do I make sure that any changes in the datagrid is written back to the database? EDIT: This is the example code I implemented: http://www.silverlight.net/learn/tutorials...

Silverlight and Azure Tables

Of the following two options... Silverlight app talks directly to Azure Tables Silverlight app talks to Web Role using WCF and that Web Role accesses Azure Tables Which are possible? Which is the recommend approach? ...

partial entity loading and management in silverlight / wcf ria

I have a Silverlight 4 app which pulls entities down from a database using WCF RIA services. These data objects are fairly simple, just a few fields but one of those fields contains binary data of an arbitrarily size. The application needs access to this data basically asap after a user has logged in, to display in a list, enable selecti...

Silverlight: Binding to static value

I need TextBlock.Text to be retrieved from translation manager, something like <TextBlock Text="{Binding TranslateManager.Translate('word')}" /> I don't want to set DataSource for all text blocks. The only way I found how to do this is to bind to "static" class and use converter: <TextBlock Text="{Binding Value, So...

silverlight DataGrid style

my Datagrid is: <data:DataGrid x:Name="dgSearchResults" Style="{StaticResource dgStyle}" Grid.Row="1" ColumnHeaderStyle="{StaticResource dgHeaderStyle}" > I have defined styles in my App.xaml file: <Style x:Key="dgStyle" TargetType="data:DataGrid"> <Setter Property="Background" Value="White"/> <Setter Property="RowBa...

Silvlerlight 4 development using VS 2008.

My current software is based on Silverlight 3 and i am using VS 2008 and Blend 3 for development. With SL4 out in the wild, can i use my existing tool set (VS 2008 atleast) to develop SL4 code? ...

How to tell Size of a Grid Cell?

I have a custom control that I've placed inside a cell of a grid. I have some internal calculations I need to run based on the height and width of the custom control. However, I want it to resize based on the size of the cell. So, my main question is... how to I programatically determine the height and width of a given cell? ...

Silverlight 2 Video Player, passing a variable to the web page to manipulate via Javascript

I'm working on manipulating SL2 to be an audio player and has markers. However, when a marker is reached I'd like to manipulate the marker metadata via javascript. I see that he has allowed certain variables to be manipulated via javascript and I just want to add onto that. Any ideas? I have tried adding a scriptable member method in the...

Preventing concurrent data modification in Web based app

Hi, I am building a web app in Silverlight which allows users to view and edit a database. In order to prevent multiple users from editing the same data, I was thinking of implementing a lock and key mechanism, so that other users are made to wait when one particular user is editing the data. Is there any way in which we can have variabl...