silverlight

Deriving from UserControl in Silverlight

In Silverlight 2 I have the following class declaration for a control: public partial class ClassX : UserControl I wish to replace UserControl with ClassXBase which derives from UserControl but I'm getting the reasonable error "Partial declarations of 'ClassX' must not specify different base classes" However, I'm unable to find the o...

How do you learn WPF and Silverlight?

I've been doing some WPF development for the last few months, and I've recently started Silverlight development. Most of the time things go OK, especially for the simple stuff, but frequently I get stumped by seemingly simple things - especially in XAML. As an example, yesterday I was trying to use a Grid to lay out the items in a ListB...

Is Silverlight Secure?

We have a need for an application that runs on an end user's machine and provides us with score results, and we need to results to be accurate (i.e. not tampered with). Currently, there is a debate between Flash and Silverlight, and it looks like Silverlight is going to be the winner. Aside from the agurment that anything on an end us...

Is there any way to share resources in a Silverlight library project?

In a silverlight application you have App.xaml, but in a Silverlight library you don't. I tried using generic.xaml but I think this serves the specific purpose of applying styles to all controls based on their type. In case, I just want a place to put things like paths or objects that I will reuse throughout the library. ...

How do you configure a get-only property for a Silverlight-enabled WCF service

I'm not certain where the error is resulting (from silverlight, from wcf, something else...) but, I have a WCF service being called from Silverlight. The method returns a class, with a property that does not have a setter. This throws an error. If I add a setter to the property then it does not give an error. The error is the usual impe...

In Silverlight, what is the best way to convert between a System.Drawing.Color and a System.Windows.Media.Color?

I'm trying to convert from a System.Drawing.Color to a Silverlight System.Windows.Media.Color. I'm actually trying to pass this color through a service. The System.Drawing.Color, passed over the wire, does not serialize the argb value independently. I can convert the argb value to a 32-bit int [DataMember] public int MyColor { get {...

silverlight...hyperlinkbutton to file using relative path

I am trying to use a hyperlinkbutton in silverlight to enable the user to download a word document. I don't care if a file save as box appears or if the word doc opens in a new browser. I get the error "cannot navigate to locations relative to a page." I've seen it posted that you can do this with the absolute path (www.domain.com/fil...

How to dynamically add controls to a Silverlight Button?

I'm working on a Silverlight Polling control. My goal is to have a Button that contains other controls, so that when a user clicks on this combination, stuff happens. Here's the basic XAML: <Button Grid.Row="1" Grid.Column="0" Style="{StaticResource AnswerButton}"> <StackPanel Grid.Row="1" Grid.Column="0" Height="Auto" Width="Auto" ...

Silverlight 2: Text Glow effect?

I'd like to create an outer-glow (or halo) effect on a text block in Silverlight. (For PS3 users, something similar to the glow around the menu text on that system). I've seem samples to do inner and outer glow on other shapes, such as rectangles but this does not translate to text. Just wondering if anyone has pointers to help me. ...

Silverlight XML editor / syntax highlighting

Hi, I am looking for a Silverlight text editor control that provides XML syntax highlighting. I found a few answers in Winforms or WPF, like here on Stackoverflow, but I didn't manage to convert them to Silverlight. The fact that Silverlight is missing System.Drawing is probably a big problem. The only text editor I found for Silverlig...

Good Silverlight-MVVM Practice Example

I've read a number of good articles about the Model-View-ViewModel pattern and my team intends to implement this pattern in the latest version of our app. I still don't quite get ALL the bits that go together to make this work. I'd like to find a good example of this pattern that I can work through. Something on a small scale, much li...

Write to local disk from web page

I'm working on a Silverlight control that will allow multi-file downloading. At the moment I'm trying to get my mind around the permission model of the browser. Let's say, on a web page, a user enters a local folder (c:\temp) in a text box. The user then clicks a button. Is it possible in JavaScript or Silverlight, to write a collectio...

silverlight, how to implement a property of type StoryBoard

I have a user control and I want to create a property of type storyboard which I can set in xaml, so I tried to following, but I get a bad property error when I run it: private Storyboard sbTransitionIn_m; public Storyboard TransitionIn { get {return sbTransitionIn_m;} set {sbTransitionIn_m = value;} } xaml: <MyStuff:MyUserCo...

How do I associate metadata with a DeepZoom SubImage?

Hi all, I'm trying to sort through a collection of DeepZoom sub-images based on arbitrary data associated with each image. The sub-images get loaded automagically through an XML file generated by DeepZoom Composer. I don't see a clear way to associate arbitrary data with a DeepZoom sub-image. The solutions that seem most obvious to me...

silverlight: setting RowDetailsTemplate controls from RowDetailsVisibilityChanged

Given a silverlight datagrid with RowDetailsVisibilityMode="VisibleWhenSelected", on clicking a row in the datagrid, how do you set or bind the controls in the RowDetailsVisibilityChanged() event? <data:DataGrid.RowDetailsTemplate> <DataTemplate> <StackPanel> <TextBlock Text="a" x:...

What is the Best UI Component Set for WPF?

Looking for a general purpose WPF toolset. Currently looking at Telerik and Infragistics. Are there better options out there? Of those two, which is better? ...

How can I properly set the height of my Silverlight UserControl?

I can't get my silverlight control to go any taller than 600. Please see code below to reproduce this behavior. Notice that the color bands stop at exaclty 600. Can anyone tell me how to get this example to Show all rows in the grid? <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> </head> <body>...

What type of service should I use for Silverlight 2 data?

There is ASMX, WCF, REST, and ADO.NET Data Services... I've used WCF and ASMX succesfully with Silverlight 2, but what about the others? What are the pros and cons of using each type of service with Silverlight 2? ...

Silverlight Control won't go higher than 600, bug?

Try this example code. Below is the aspx page with the silverlight control, and below that is the xaml code for the grid with colored rows. Notice that the grid has 8 rows of 100 height each, but only the first 6 rows show up. I can't get any control to show larger than 600. aspx code <html xmlns="http://www.w3.org/1999/xhtml" > ...

finding a "semi-pro" project for Silverlight, suggestions?

I'd like to get my feet wet in Silverlight. I think all the reading and tutorials in the world don't work nearly as well as a real project. Plus I've done tutorials, read some books, listened to podcasts and so on. I'm ready for the next step. I'm not sure how to make that step though. I'm certainly not ready to put "Silverlight developm...