silverlight

Silverlight error message [Arg_VersionString]. Don't know where to begin.

One of the users of a silverlight app I wrote gets this error message: [Arg_VersionString] Arguments: Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50524.0&File=mscorlib....

TreeViewItem.ItemContainerGenerator.ContainerFromItem inconsistent results

Hi, I have a TreeView on my page. It's bound to a collection of clients containing contracts, like: public class Client { public int ClientID { get; set; } public string Name { get; set; } public List<Contract> Contracts { get; set; } } public class Contract { public int ContractID { get; set; } public int ClientID { get; s...

Silverlight: Can I set an event to a base class event handler in XAML?

I have created a custom user control to use as a base class for some maintenance functions. I would like to be able to wire up some events to handlers defined in the base class. I can do this manually in the code behind but would like to assign them in XAML. Is this not possible? <src:CustomerMaintenanceControlBase x:Class="ProjectMana...

Template for Control Effect

I was wondering if there was a way to make a template for an effect so I can apply it to all my controls. That way if i was the effect to be modified, I only have to change it in one location... Let's say I have: <Button Content="Foo" Height="50" Width="50" > <Button.Effect> <DropShadowEffect BlurRadius="10" Color="Black" Opac...

Is there a document highlighting WPF and Silverlight controls available in the framework?

I'm looking for something like a pdf or anything else that would show a chart of available controls in SL and/or WPF. Ideally, the chart should have a drawing of the control, some succinct description and the hierarchy if possible. Has anyone seen such a thing? Freeware or Payware, can even be from a book I could buy. ...

How to position a Grid in Silverlight 3.0

Hello All- I'm very new to Silverlight and I want to reposition the Grid below in my Silverlight App. I've noticed if I increase the Margin the Grid will drop farther down the screen but it does not go directly down which is what I desire. Instead it goes diagonally downward. So in other words if the Grid is at the Top, Left then I w...

How to get user info from WebContext?

My SL app use windowes authentication. When app started, Following code add user info to colloection: public App() { InitializeComponent(); // Create a WebContext and add it to the ApplicationLifetimeObjects // collection. This will then be available as WebContext.Current. WebContext webContext ...

Binding a UIElement's Name

Is there any way to use binding to set the UIElement's name? I always get a runtime exception saying System.Windows.Markup.XamlParseException: AG_E_UNKNOWN_ERROR <Button Name="{Binding myName}" Content="{Binding myName, Mode=TwoWay}" /> If I take the binding off for the Name property the control works and the Content property is bin...

Insert / Update with RIA services Compositional Attribute

I am creating a Silverlight 4 application with Entity Framework, RIA Services and MVVM-Light toolkit. The application deals with a complex object graph, that contains the following structure: Job 1->* Resources Job 1->* Workplans Workplan 1->* WorkplanItems Resource 1->* Assignment WorkplanItems 1->* Assignment I would like to...

binding an image source in XAML

I am trying to bind an image source to my XAML through c# this works <Image Source="images/man.jpg"></Image> this does not work <Image Source="images/{Binding imagesource}"></Image> where imagesource is a string variable in the c# file of this xaml and is being set equal to "man.jpg" ...

Centering text in passwordBox in XAML

I'm trying to center the text in a PassWord box: In Blend the Text properties for alignment are all disabled. Is there another way to do this? Thank you for your help. ...

CLR differences between Silverlight and normal .NET Framework?

Are there any aggregated guides to writing libraries which need to be Silverlight-compatible? Or is the standard procedure to just build, look for errors, fix, repeat? Obviously I recognize the answer may depend on what version of Silverlight is being targeted, but I'd expect any answer to just specify version if the solution is specif...

Convert XNA Project to Silverlight

Is there a way to convert an XNA project to a Silverlight project? I've never actually used Silverlight, but I like the prospect of transitioning my XNA project for use on the web. Of course, I would prefer to make as few changes to the original code as possible. ...

Silverlight Windows Phone Databinding -- noob question

I have a basic Windows Phone List application, with code like this in the MainViewModel class // CODE THAT WORKS -- Items.Clear(); foreach (var itm in e.Result) Items.Add(itm); Count = Items.Count; // CODE THAT DOES NOT WORK -- I'm trying to understand WHY Items = e.Result; The databinding Xaml looks like this: <DataTemplate...

Accessing silverlight object data from aspx page

Hi, I am new to silverlight and I am wondering if it is possible to access silverlight object data from the aspx page that host it. Or have silverlight write to a hidden field on the page on client side. What I am trying to do is to use silverlight to upload file via WCF (client to WCF Service directly instead of posting data back to...

How to display rows with embedded tables in Windows Phone 7?

I'm working on an app that has rows in the following format. I've numbered the rows for clarity. The rows alternate background, so even rows are all one color and odd rows are another. I've it working using a grid containing x number of rows, and within each row i create another grid with two rows and two columns to organize the data. I'...

Move down overflow contents in horizontal stackpanel

I have a list box in expander: <ListBox ItemsSource="{Binding MySource"> <ListBox.ItemTemplate> <DataTemplate> <RadioButton Content="{Binding MyContent}" /> </DataTemplate> </ListBox.ItemTemplate> <ListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" />...

WPF, Silverlight or WinForms?

The company I work for has an existing product which is a Delphi 32 bit windows application. The application has a spreadsheet like UI which requires a very fast data grid/table view and advanced charting (plus the usual button/dropdown/menuing/toolbar controls). We also have a .net 3.5 ASP.NET application which mirrors large parts of ...

Setting the UserControl property to child controls - WPF, Sliverlight

I have a Usercontrol with a Button and TextBlock in it. I would like to set the Background of both Button and TextBlock with the Background of the Usercontrol.(ie, I am trying to Bind to the usercontrol's Background property). Please let me know how can I do this in XAML. Is there any difference for this in Silverlight and WPF? ...

LINQ to XML:Is XNode query possible

I want to use LINQ to XML in Silverlight 3 since there is no XPath support. I have kind of got the hang of it. But the project I'm working on will not guarantee that all the XML tags I will be querying for will appear in the result XML file. Due to this I will not be able to query the overall file as XDocument becase the absence of the ...