silverlight

Silverlight 4 - Print Items Control

Hello, I am building a Silverlight 4 application. This application is going to print the contents of an ItemsControl. This ItemsControl uses an ItemTemplate to render the items bound to the control. In all, I have 500 items that are bound to the control. Oddly, when I attempt to print the ItemsControl, it seems to cut off after a certa...

Silverlight avoid lose focus on datagrid

Hi, I have a question: How could I keep the focus on a combobox of a cell inside a datagrid in edit mode; even when I drag a textbox inside a scroll viewer to drag & drop. This is the behaviour I need: The user start to edit a cell by double clicking, and a combobox is showed, then the user could drag and drop some text (one of the te...

Accessing other controls by name in a Silverlight ControlTemplate

I have a custom control that inherits from ContentControl. Inside the generic.xaml file is a simple Grid with 2 rows: Row 1 - A toggle button Row 2 - A StackPanel with a TextBlock, named "Stackpanel1" The ToggleButton has its own nested ControlTemplate which has VisualStates for Checked/Unchecked. Is it possible to reference "Stack...

Silverlight 4 how to format a binded decimal value

Hey, sorry for my bad english... I have a very simple textbox on my sl4 app, like this: <TextBox Text="{Binding Source={StaticResource Valor}, Path=ValorReal, ValidatesOnExceptions=True, Mode=TwoWay, ValidatesOnDataErrors=True, StringFormat=\{0:c\}, NotifyOnValidationError=True}" /> and a class like: public class Valor: INotifyPrope...

Should i use a trigger or Behaviors for this?

I have an abstract object called Applicant and two different types of objects that inherit from Applicant called Business and Individual. So I have three classes that look like this: public abstract class Applicant { ... } public class Individual : Applicant { ... } public class Business : Applicant { ... } Now in the DataGrid ...

How to play multiple audio sources simultaneously in Silverlight

I want to play simultaneous multiply audio sources in Silverlight. So I've created a prototype in Silverlight 4 that should play a two mp3 files containing the same ticks sound with an intervall 1 second. So these files must be sounded as one sound if they will be played together with any whole second offsets (0 and 1, 0 and 2, 1 and 1 s...

Sockets with Silverlight 4

I need to implement a persistent socket connection from my in-browser Silverlight 4 app to a device on the network. I need the following: Connect to it and keep a persistent connection Send and Receive data Get some type of event or notification (or detect it) when the connection drops. Is this possible with Silverlight 4? If so,...

SilverLight: game programming for kids

Hi, Is it possible for kids with only HTML/CSS programming experience to do game programming in SilverLight 4.0? They are using Visual Web Developer 2010 Express edition. Do they have to learn c# or any other language since they are just starting out? Thanks ...

Read Song Title/Artist from a live audio stream with Silverlight 4?

I have a SL4 project that is successfully streaming a great sounding WMA audio stream from a remote location. All of the MediaElement actions are straight forward. What I want to do is read the attributes that are passed as text along with the Audio stream. For instance the encoder of the stream embeds the title of the stream, the tit...

Custom UserControl property not being set via XAML DataBinding in Silverlight 4

I have a custom user control called GoalProgressControl. Another user control contains GoalProgressControl and sets its GoalName attribute via databinding in XAML. However, the GoalName property is never set. When I check it in debug mode GoalName remains "null" for the control's lifetime. How do I set the GoalName property? Is there so...

Asp.net MVC/Silverlight and Sharepoint 2010 integration

Just a sidenote: I'm not sure whether I should post this to serverfault as well, because some MOSS admin may have some info for me as well? Additional note 1: I've found this document (Asp.net MVC 2 & Sharepoint integration) if anybody with sufficient expirience is willing to comment on its content whether this can be used in my ...

silverlight 3 and System.Core.dll version

I have a Visual Studio 2008 solution with several projects. One project is a web site with a Target Framework of ".NET Framework 3.5". One is a Silverlight 3 Application which was created with the selection (in the dropdown) of ".NET Framework 3.5". I notice that if I wish to add a reference to System.Core.dll to the website, I am p...

Mixing application modules between Silverlight and ASP.NET

Background: I work in a suite of ASP.NET applications that have several different "modules". The applications all share a main menu, so they all link to one-another. The modules are the high-level areas of the application. So, for example, it might be Payments, Orders, Customers, Products, etc. And Payments and Orders are in one app ...

XAML ContextMenu gets bound to wrong row in a DataGrid

I have a XAML based ContextMenu bound to the rows in a datagrid. It works just fine - until the grid is scrolled! This is the context menu for one of the controls in the visual tree or a DataGrid row. <data:DataGridTemplateColumn Header="Customer Details" Width="*"> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> ...

Silverlight and Unexpected Font Sizes

Someone please teach me to fish here... I'm just learning Silverlight and have ran into a few situations where the font size actually used is drastically different than I would expect. There's probably something conceptual that I'm missing. Case A In one instance, I have defined a user control that presents a Label to show text. If ...

Cursor on Path doesn't appear in SilverLight

I am trying to draw a circle with a glass effect using Alpha. I am successful in creating that by using the below XAML. The cursor changes to Hand for the Ellipses, but it doesn't affect Path. Basically, I want to show "hand" cursor wherever the mouse appears over the circle. I hope this is not a known issue and I am missing something sm...

Silverlight Navigation Application

Is there anyway I can have one mainpage, with tabs, which load child pages in the content area, but also have within the child page another navigation menu which loads siblings into the same content area it itself is in? This is just a nested navigation frame situation really. ...

Can you view XAML as "regular" .net code (c#\vb.net)?

There are times when I find some example XAML that I want\need to do in code (c#\vb.net). I assume at some point the XAML becomes code, or at least IL. So my questions: Am I correct in assuming that XAML is converted to IL? (or if not IL what does it become?) If the above is correct, when does XAML become IL (or whatever it becomes)?...

How to add Silverlight 4 ContextMenu to DataGrid row using XAML?

Silverlight 4 has a new ContextMenu control in the latest toolkit. I can't find any examples anywhere on how to reliably use this ContextMenu on a DataGrid row. Theres a tonne of context menus out there but I want to use the new version from the toolkit. I'd like to be able to set context menus for rows as well as cells. The only way ...

Loading xap file on demand

I have Silverlight application called MyApp. During startup MyApp loads MyApp.Main.xap module using the following code: WebClient wc = new WebClient(); wc.OpenReadCompleted += new OpenReadCompletedEventHandler(onMainModuleLoaded); Uri uri = new Uri("MyApp.Main.xap", UriKind.Relative); wc.OpenReadAsync(uri); It works. Within MyApp.Main...