silverlight

Binding Commands Without Using the DataContext [silverlight+prism]

Hello I have a problem with binding commands to button inside datagrid. Here should be explanation but it doesn't explain everything. http://msdn.microsoft.com/en-us/library/dd458928.aspx What should be in classes in namespace Infrastructure? Can somebody show me a really basic sample of using this? not just parts of the code... ...

PageIndex is not updated correctly in Silverlight DataPager

Hi, I am trying to use silverlight DataPager to show a list of documents (which is really an implementation of IPagedCollectionView) with the display mode "FirstLastPreviousNext". When I click on 'next page' arrow I see the next portion of documents but the page number in data pager itself isn't incremented. Should I do it manually and ...

how can i open xaml file without clearing the visual root

I want to open a new xaml file while keeping the original root running. At the same time as I want to play a video and when use click something else I don't want to exit I want to keep running the video in the background, any ideas or solutions? ...

Is it possible to data bind to a method in Silverlight?

We have a dynamic languaging system that doesn't use conventional resource files; fetching resources from a database, via a language manager library instead. Based on a legacy (VB6) solution, it languages controls according to the resource name in the control's tag property. After the page has initialised we fire off a method that takes ...

Resizing of a Line in Silverlight Application

I have included a Line control in a Silverlight application as followss. <Canvas x:Name="Adorner"> <Border BorderBrush="Black" BorderThickness="2"> <StackPanel Orientation="Vertical"> <Line Stroke="Black" StrokeThickness="0" Height="80" HorizontalAlignment="Stretch"> </Line> </StackPanel> </Border> </Canvas> Thi...

Silverlight RichTextBox: How to set custom font from resource/stream?

Hi everybody, Does anybody know how to set the font within a RichTextBox from a Stream? TextBlock and TextBox do have the option to set the FontSource, but classes like Run, Paragraph and the whole RichTextBox miss that. :( Any reason for that? Is there any known way to achieve that? I already tried to set the whole source URI withi...

What are the various uses of Attached Properties?

I've seen some really varying uses of AttachedProperties so far in my adventures in WPF, and am wondering, what are some of the various uses? I've seen fairly mundane uses, such as those found in Grid and Canvas, as well as some really cool hacks allowing binding to collections without setters. What other applications have you found fo...

CRM prompts for credentials when I add threading in Silverlight

I have a silverlight app embedded in an IFRAME in Dynamics CRM... calls after the form is loaded retrieve data via the CRM service soap client. The client is programmatically initialized with the URL and the CRM authentication token injected into the headers. All of this, by itself, works perfectly fine. The problem came in when I adde...

Add Service Reference not appearing

In a Windows Phone 7 Silverlight project, I had a service reference to a WCF service. This morning when I opened up the project, suddenly the namespaces for my WCF service were unknown. The option for "Update Service Reference" in Solution Explorer was not there, so I deleted the Service Reference with the intent of re-adding it. But ...

Client and server validation

Hi, I'm developing application that use nHibernate for ORM, WCF services and silverlight as UI. My question is how to provide validation on server and also on client for domain entities. I thought using nHibernate validation framework but not sure if I can use it as client (silverlight) validation. I don't want to have two codes of valid...

Propagate changes in model to view in Silverlight

Hi folks, in my Silverlight 4 Application I have an ObservableCollection that I data bind to two different listboxes. The listboxitems showing the content of the MyClass-Object. When I add an item to the ObservableCollection, the new item is displayed in both listboxes properly. I have set the Binding Mode to two way, so that editing t...

VS runs old version of Silverlight application instead of new one.

Hi, I've got a problem with Silverlight, or maybe more with VS2010 Ultimate. I was fooling around playing with it, when in one moment a fix that I wrote didn't fix anything. Investigating why I found out that VS is not running the new version which it just compiled, but rather an old version of application - that's why my changes don't ...

Blend crashes every time I try to use sample data

I open my project, go to data tab, new sample data. It adds a SampleDataSource. I try to change the name of the first property and blend immediately crashes: http://imgur.com/3hfq8.png This happens no matter what page or control I am on. I tried this in a brand new project and I DID NOT get the error. Can't really start this project ov...

Why can't I create a assembly for silverlight and usual .NET?

Why can't I create a assembly for silverlight and usual .NET? ...

Using IOC container in silverlight to dynamically load assembly. Is this possible?

Hello, I have two silverlight assemblies. In assembly 1 I have implemented an interface ISnProvider. In assembly 2 I have a concrete class which implements the ISnProvider. I plan on having more assemblies which will contain different implementations of ISnProvider. Assembly 1 has no reference to assembly 2. When my silverlight app sta...

Silverlight MVVM - How Can I Declaratively Bind a ComboBox in a DataGrid CellEditingTemplate using a ViewModel?

I am trying to declaratively bind a ComboBox within a DataGrid CellEditingTemplate using a ViewModel. The ComboBox is not being bound. What am I doing wrong? XAML: <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sdk="http://schemas...

Group by is not working on WCF Data Services

I have this code, Data Summary is a class, it is not an entity. I use it for the anonymous type on "select new" public class DataSummary { public DataSummary() { } public int AccountID { get; set; } public decimal Total { get; set; } } then I have this query DateTime date...

Problems with event bubbeling (ScrollViewer)

I have a problem with bubbeling events. I manage to bubble events in borders, grid, stackpanel, but not in a ScrollViewer If you look at the example below you will notice that when you click the TextBlock the event is bubbeled up to the Grid. But when I include the ScrollViewer the event stops here and is not sent up to the Grid. Does ...

Declarative / Imperative Cross Over

I'm looking for a way to gain reference to a class that was instanciated via XML, but I need reference to it in imperative code. I usually do this via the datacontext of the control, but in this case, the user control does not have declaritive reference to the class that I require. I know I have seen how to gain a reference to a class ...

Rotating states in a Blend 4 VisualStateManager based on timer events?

I'm building a Silverlight 4 UserControl in Blend which has three VisualStates. I would like to have the states change from the first to the second state after a delay of a few seconds, second to third after a few more seconds, third to first after another delay, and continue rotating like that. Essentially, this is a very primitive ...