silverlight-2.0

Silverlight 2 UI pattern

I have to build small (for now) admin app in Silverlight2, and would like to use some pattern for binding UI with my BL/DAL. I found view-model-viewmodel and mvp/mvc patterns, where first one (V/M/VM) is specially suited for WPF apps, because it uses rich capabilities of WPF data-binding options. What do you suggest? Can you write simple...

Silverlight Logging framework and/or best practices

Now that Silverlight 2 has finally shipped. I'm wondering if anyone has put together any logging frameworks for it, maybe something like enterprise library logging or log4net? I'm interesting in something that can perform tracing client side and also log messages to the server. So far the only project I have found is Clog on CodeProject...

XamlParseException: Attribute in custom control missing, but it's defined!

I sometimes get the following exception for a custom control of mine: XamlParseException occurred Unknown attribute Points in element SectionClickableArea [Line: 10 Position 16] The stack trace: {System.Windows.Markup.XamlParseException: Unknown attribute Points on element SectionClickableArea. [Line: 10 Position: 16] at System.Win...

Image Slider with Silverlight

I have a requirement of creating an Image slider using Silverlight. I need to display 5 images at first. There will be two buttons previous and next. When I'll click the next button another new 5 images will be shown in place of previously diplayed images. Would it be possible for anyone to tell me the solution for this? Someone please...

Silverlight image: load URL dynamically?

I'm tinkering with Silverlight 2.0. I have some images, which I currently have a static URL for the image source. Is there a way to dynamically load the image from a URL path for the site that is hosting the control? Alternatively, a configuration setting, stored in a single place, that holds the base path for the URL, so that each ima...

Is the Silverlight 2 Bible worth purchasing?

Someone on SO mentioned they'd bought a copy and I'm damned if I can find the question again. http://www.amazon.co.uk/Silverlight-2-Bible-Brad-Dayley/dp/0470375000/ref=sr_1_2?ie=UTF8&s=books&qid=1224844673&sr=1-2 Has anyone bought this, if so is it worth it? Also, what about the MS book "Introducing Silverlight 2"?: http:/...

Silverlight 2 and large canvases?

Hi all, I am working on an application that uses several large canvas controls (several thousand pixels across), layered on top of each other. The canvas controls themselves are completely invisible, but each contains a number of controls, mainly images. My question is, is there a recommended maximum size for a canvas, or is it purely...

Is there a notification mechanism for when a dependency property has changed?

In a Silverlight application I'm trying to find out when a property on a usercontrol has changed. I'm interested in one particular DependencyProperty, but unfortunately the control itself doesn't implement INotifyPropertyChanged. Is there any other way of determining if the value has changed? ...

How to (de)serialise JSON data in Silverlight using a different name to member variable

I have the following members defined in a class that I'm trying to deserialise: [DataMemberAttribute(Name = "cust_title")] public String Title { get; set; } [DataMemberAttribute(Name = "cust_description")] public String Description { get; set; } For some reason, the deserialisation fails (it seems to ignore the DataMemb...

How to convert DateTime from JSON to C#?

I've got the following class: [DataContractAttribute] public class TestClass { [DataMemberAttribute] public DateTime MyDateTime { get; set; } } Here's the JSON: { "MyDateTime":"1221818565" } The JSON is being returned from a PHP webservice. What I need to do, is convert that epoch string into a valid C# DateTime. What's the be...

How do I create a Popup Dialog box in Silverlight ?

I'd like to create a popup dialog box in silverlight in which i can manipulate controls, enter data, and return a value. I want it to be modal, so that when it is open, the page "Below" is inaccessible. I havent found an easy way to do this yet. Any suggestions? ...

LINQ to Array in Silverlight 2

There's something wrong with my code or I'm just not understanding this fully. I have the following code that runs a query that MAY contain more than one RIGHT attribute and want to store each within an array for later fetching: var members = from myList in o_data.Descendants(bp + "Reaction") select n...

How do you make a ASP.NET Control talk to a Silverlight app on the same page in C#

For example: First, say I have a Silverlight app with Windowless=true so that I can place ASP.NET controls on top of it. Then I place an ASP.NET button on the page. How can I have say the text of a control in the Silverlight app change when the user presses the ASP.NET button? How would I send the Silverlight app an update message f...

Expression Blend 2 Issue with Creating Silverlight 2 Projects?

I have Expression Blend 2, Service Pack 1, and cannot create a Silverlight 2 project. When I attempt to create a Silverlight 2 project, I get the following error: Blend cannot continue because a compatible Silverlight version could not be found. I installed Blend a few weeks ago, and service packed it yesterday. The order I did thi...

Fetching images from two different servers

Hi Everyone, Can anyone please tell me the procedure to bring two images from different servers in Silverlight 2? ...

How to create a numeric textbox in Silverlight?

As the title says really. I've had a look at inheriting from TextBox, but the only sensible override was "OnKeyDown", but that just gives me a key from the Key enum (with no way to use Char.IsNumeric()). ...

How to use a custom item template containing Path tag in ComboBox (without causing out of range exception)

I have a combo box with the following DataTemplate: <DataTemplate x:Key="ComboBoxDataTemplate"> <StackPanel> <TextBlock Text="{Binding Path='Name'}"/> <Path Data="{Binding Path='PathGeometry'}" Width="64" Height="64" Stroke="Black" Stretch="Fill" StrokeThickness="1"/> </StackPanel>...

Updating a tooltip in Silverlight 2

I have a control in Silverlight 2 that changes state during the application. When its state changes, I want to update the tooltip that goes with it. I'm using the ToolTipService: ToolTipService.SetToolTip(ent.LayoutRoot, "FooBar"); which works fine the first time I set a tooltip, but fails the second time time around I get: "Object...

What's the most portable way to make a Silverlight & Regular .NET REST client

Hi, I'm trying to get a Server application to expose some status information using WCF. In particular I'm after using WCF services with RESTful "API". I'm hitting somewhat of a wall when it comes to consuming the REST api from a silverlight app/page that I want to have as an additional type of client... So far I've been successful in de...

What are the server requirements for Silverlight 2?

Can a Silverlight 2 enabled web page be managed from an Apache server? (I'm not actually interested in doing this but trying to understand Silverlight 2 a bit more.) Assuming that I have IIS6 and Server 2003 what are the .NET version requirements to host a web site with Silverlight 2? Are .NET 3.0 and 3.5 required on the server? My thin...