silverlight

Another "The maximum string content length quota (8192) has been exceeded while reading XML data." issue with WCF and Silverlight 4

I have no trouble retrieving a large amount of data, but sending it back to the service displays this error. I've tried adding the element to both the web.config and servicereferences.clientconfig and it's not recognized in either. At one point I got a message about adding readerQuotas to bindingElementExtensions, but I can't find anyth...

How do you handle validation severity in Silverlight 4?

With 4.0, Silverlight now supports INotifyDataErrorInfo but out of the box I can't seem to find anyway of specifying a severity (Error, Warning, Info) in order to be able to style the inputs differently (red, yellow, blue). How do you handle this? Is there anyway to tap into the mechanism that styles the inputs, or do you have to resort...

How do you restrict selection of cells to exclude a column in a DataGrid?

I have a datagrid based selection control that duplicates the Easing Function selector in Expression Blend. This is for the Easing Function project so you will also be helping yourself :) This selector is a permanent fixture on the screen, to make it easy to try out options, while still looking enough like the options you normally sele...

Silverlight DragDrop.DoDragDrop()

I am really struggling to get a simple drag and drop sample working in Silverlight 4. Here's what I have: XAML <UserControl x:Class="TestDragDrop.MainPage" Width="350" Height="200" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; <Grid Background="...

Silverlight Dataform: "Save" and "Edit" buttons not showing up

I'm trying to make a data form in Silverlight 4. Perhaps I'm doing something wrong. The class: public class ExpenseInfoTest { public int MyProperty { get; set; } public int Foo { get; set; } public int Bar { get; set; } } XAML: <local:ExpenseInfoTest x:Key="newExpense"/> <df:DataForm Height="218" ...

Silverlight: Use a collection for multiple options in a Data Form?

I have a data form that is working pretty well. One of the properties of my data object is an ObservableCollection. Right now, in the data form, it only displays the ToString() of the colletion. Not very helpful. I'd like some sort of autocomplete box with valid options, and when the user selects them they will be added to the data obje...

Silverlight & ObservableCollection: Raising CollectionChanged on UI thread

I need to raise the CollectionChanged event of an ObservableCollection on the UI thread. I have seen different approaches ranging from a wrapper class to custom implementation of the relevant interface. Is there any simple way to override INotifyCollectionChanged on an ObservableCollection to accomplish this? Thanks. ...

How to retrieve the Cell or Row value for Silverlight DataGrid, when using ValidationSummary

I'm adding items to a DataGrid's validation summary manually. This is all working, but I can't find a way to retrieve the cell which contains the error. I need a reference to the cell because I need to focus that cell when the user clicks on the error. I know what the bound data item, and the property causing the error, but it doesn't ...

Validating new rows in Silverlight DataGrid

We're using RIA Services / Silverlight 4, and I'm binding a datagrid to something like Context.Foo. I can see validation errors appearing in the datagrid's validation summary when users try to enter empty strings into mandatory fields and so forth, life is good. However when I add a new item by calling something like Context.Foo.Add(ne...

How to enable Arabic in Silverlight

Hi All, Can I know how to enable arabic in Silverlight?? I have a requirement in which user can select whether they would like to type in English or Arabic and based on their selection the language must change. Can anyone pls help me out?? Thank you. ...

Silverlight Sculpture generated application locking up on service calls (on some machines)

We have an application generated using the Sculpture software package. That means the project is roughly equivalent to the code in a Prism application. Part of their model is that all WCF Service calls are performed synchronously, but on background threads (actually they are async calls as well, but the Sculpture background thread metho...

Restoring a Visual Element to its initial position in WPF application

Hi there, I'm implementing a WPF application where one can drag & drop a element in a designated area where this element is restored to its initial position. The drag & drop is working, and already have the events for the dragging and drop actions; my problem is how to restore the visual element to the correct position, previously stored...

Silverlight page check if user is logged in

How can i block access to all silverlight pages if user is not logged in, without writing verification code in each page? ...

How can I open an aspx page in a new browser window from a SilverLight Application?

Hi, I want to add a button to my user control in SilverLight 4.0 application which will open a new browser window with an aspx in it when it is clicked. How can I achieve this, can you please advice? Additionaly, can I lock the SL application until this new window is closed (Alike a modal dialog)? thanks! ...

How to enable scroll for nested controls when parent is disabled?

I have lots of nested controls in the panel and I want to disable all of them, but leave scrolls enabled. Basically, I'm setting IsEnabled property of the root element (panel) to false using binding. But this disables scroll as well. Any ideas (except adding IsEnabled to each control instead)? I'm using MVVM. So, in code it looks like t...

Why would WebClient.OpenReadAsync return a e.Result of zero length if download is successful?

Using the following code (from a Silverlight 4 OOB app) I'm getting a result stream with a size of zero even though it takes the time to download the whole file (900+MB) and no error is reported. Fiddler also says the whole file was downloaded. The handler on progress changed (although not shown below) is hit and reports an increase in ...

DataBinding happens only first time

I have two User Controls in my window, both are bound to the same context. One of them is getting updated and the other is not. What could be the reason? ...

OnApplyTemplate is not being called

Hello everyone, I have a solution with 2 projects: Windows Phone App and a Windows Phone Class Library. The class library has a control called MessageBoxExtended which inherits from ContentControl. The project also has a Themes folder with a generic.xaml file. The file has the Build Action set to Page and it looks like this: <ResourceDi...

Multiple ContentProviders in one UserControl

Hi Silverlighters. I have problem where I'd like to design a UserControl containing two ContentControls. Imagine the old fashioned explorer that has a treeview on the left and a list on the right. I need the users of my control to be able to add their own controls to each ContentControl - say the left and the right. Unfortunately the Con...

Fix DataGrid Column Headings When Scroll Viewer is Applied

I have a DataGrid wrapped in a ScrollViewer like this... <ScrollViewer MaxHeight="600" VerticalScrollBarVisibility="Auto" BorderThickness="0" Padding="0"> <sdk:DataGrid ItemsSource="{Binding BatchItems}" IsReadOnly="True"> <sdk:DataGrid.Columns> <!-- Yada, yada, yada --> </sdk:DataGrid.Colum...