silverlight

How do I position the content of a tabpage in Silverlight?

When I place a control on a tabpage in Silverlight the control is placed ~10 pixels down and ~10 pixels right. For example, the following xaml: <System_Windows_Controls:TabControl x:Name=TabControlMain Canvas.Left="0" Canvas.Top="75" Width="800" Height="525" Background="Red" HorizontalContentAlignment="Left" VerticalContentAlignment="To...

Local Database with Silverlight

What would be a good local database for a Silverlight application? The database's main purpose is for local data caching and synchronization services. I do not believe that SQL anywhere or SQLite will work since they use unmanaged code which will not run under the silverlight sandbox ...

Create anonymous object by Reflection in C#

Is there any way to create C# 3.0 anonymous object via Reflection at runtime in .NET 3.5? I'd like to support them in my serialization scheme, so I need a way to manipulate them programmatically. edited later to clarify the use case An extra constraint is that I will be running all of it inside a Silverlight app, so extra runtimes are ...

Obfuscating Silverlight XAP

I am wondering any efficient way to hide our Silverlight code. I know there are some obfuscators available but it looks like people can hack that too. Anybody have any success on this front? ...

Can you use Silverlight with AJAX without any UI element?

I know you can just use CSS to hide the DIV or Silverlight Plugin, but is there a way to instantiate a Silverlight Component/App using JavaScript that doesn't show any UI element at all? There is alot of great functionality in Silverlight, like MultiThreading and compiled code, that could be utilized by traditional Ajax apps without usi...

Detect via javascript whether Silverlight is installed

Is there a javascript function I can use to detect whether a specific silverlight version is installed in the current browser? I'm particularly interested in the Silverlight 2 Beta 2 version. I don't want to use the default method of having an image behind the silverlight control which is just shown if the Silverlight plugin doesn't loa...

Databinding with Silverlight

If I want to bind a collection to a some form of listing control in Silverlight. Is the only way to do it so make the underlying objects in the collection implement INotifyPropertyChanged and for the collection to be an Observablecollection? If I was using some sort of third party object, for example that returned by a web service, I wo...

Calling WCF Service from Silverlight

Im calling a locally hosted wcf service from silverlight and I get the exception below. Iv created a clientaccesspolicy.xml, which is situated in the route of my host. <?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="*"/> <...

Silverlight development [Visual Studio 2008 vs Expression Blend]

I'm a .Net developer and want to get into developing Silverlight applications. I have VS 2008 but wanted to know if I should/need expression blend. What are pros/cons of having blend along side VS? ...

How Do I Give a Textbox Focus in Silverlight?

In my Silverlight application, I can't seem to bring focus to a TextBox control. On the recommendation of various posts, I've set the IsTabStop property to True and I'm using TextBox.Focus(). Though the UserControl_Loaded event is firing, the TextBox control isn't getting focus. I've included my very simple code below. What am I missi...

Immutable Styles in Silverlight 2

Anyone found a good pattern for getting around immutable styles in Silverlight 2? What I mean is does anyone have a workaround for the fact that you cannot switch the style of an element programmatically once it has been set, i.e. the second line here will throw a catastrophic failure exception: this.TestButton.Style = (Style)Applicatio...

Rich Text Editing in Silverlight 2

We've looked in Silverlight 2 recently and found no way to edit formatted text there. Is this really true, and are there any (maybe commercial) external rich text editors available? ...

View SVG using Silverlight or Flash

Is there a way to view a SVG from either a file or webpage dynamically using Silver light or flash? Edit: I am currently converting them on the server using inkscape. The only trouble with this is the time it takes to make all 60+ pages of the catalog is a little slow. It take 5 min to make it, and some customers(boss included) would...

Convert an image to XAML?

Does anyone know of any way to convert a simple gif to xaml? E.G. A tool that would look at an image and create elipses, rectangles and paths based upon a gif / jpg / bitmap? ...

Sprite / Character animation in Silverlight (v2)

We have a Silverlight 2 project (game) that will require a lot of character animation. Can anyone suggest a good way to do this. Currently we plan to build the art in Illustrator, imported to Silverlight via Mike Snow's plug-in as this matches the skills our artists have. Is key framing the animations our only option here? And if it ...

Silverlight 2 and the MVP Pattern

Any ideas on how i get MVP working with Silverlight? How Do I get around the fact there is no load event raised? This the view I have: public partial class Person: IPersonView { public event RoutedEventHandler Loaded; public Person() { new PersonPresenter(this); InitializeCompo...

Silverlight Security- Sensitive Data

Silverlight works on client side so putting any sensitive data like connection strings, passwords etc. in the code seems not to be a good thing. I want to build whole web app in Silverlight doing lots of authorization and database quering things. How to make it safe? Any tips&tricks and what things should I avoid? ...

Where can I find an AutoComplete TextBox code sample for Silverlight?

I've searched around for a while today, but I haven't been able to come up with an AutoComplete TextBox code sample for Silverlight 2 Beta 2. The most promising reference was found on nikhilk.net but the online demo doesn't currently render and after downloading a getting the code to compile with Beta 2, I couldn't get the Silverlight p...

How do I call a WCF webservice from Silverlight?

I am trying to call a WCF webservice (which I developed) from a Silverlight application. For some reason the Silverlight app does not make the http soap call to the service. I know this because I am sniffing all http traffic with Fiddler (and it is not a localhost call). This my configuration in the server relevant to WCF: <system.serv...

Is the SendChuncked Property missing from System.Net.HttpWebRequest in Silverlight 2?

I need to send large files from silverlight 2 beta 2, so I need to set the sendchuncked property to true, but the property doesn't seem to exist. I've seen other posts on the internet where people have been able to set this in Silverlight. I disassebled the .dll at C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Reference Assemblies...