views:

99

answers:

3

When I'm debugging my Silverlight Appliction and I'm using a list internally I cannot hover over the list and see the items inside the list. I just see the RAW view of the list.

If I want to see the items I have to write my own code which is tedious. Is this something normal to Silverlight?

I DO have the correct list view when debugging in normal Console/WPF/... applications.

Example: Silverlight (e.Result is a Dictionary<DateTime, decimal>): silverlight (link: click)

See how there is no 'list view in the first example?

And there in this one, non Silverlight:non silverlight (link: click)

The system is a Windows 7 64-bit, with Visual Studio 2010 and the Silverlight 4 SDK RC2.

A: 

alt text

I tried to send Dictionary from WCF to Silverlight and I can see the data in the debugger. So it should work fine for you too. Maybe there's something about your code?

What exactly "Date" class are you using? Please try DateTime instead as I did.

Heres' my server side code:

public Dictionary<DateTime, decimal> GetDataUsingDataContract()
{
    Dictionary<DateTime, decimal> x = new Dictionary<DateTime, decimal>();
    x[DateTime.Now] = 2;
    x[DateTime.Now.AddDays(2)] = 3;
    return x;
}
Fedor
Date was DateTime. I copied your code, and I still get no view of my Dictionary. Just Raw View. :( I assume that you are using 32 bit?
Snake
Yes it's 32 bit.
Fedor
e.Result is System.Collections.Generic.Dictionary<System.DateTime, decimal> in my case. It's Silverlight 3.
Fedor
+1  A: 

Silverlight's Dictionary<> class has a [DebuggerTypeProxy] attribute but it doesn't work in the current release of the toolset. Also mentioned in this thread. Same advice, report the bug at connect.microsoft.com so they are aware of it, hopefully it will be fixed in the official RTM release of the tools.

Hans Passant