Tuesday, June 23, 2009

Get property value without casting to it's original source

Today I had a requirement to check a property value without casting or converting it back to it's source class.

this is one way i foundout doing it..


Type t = element.DataContext.GetType();

foreach (var prop in t.GetProperties())
{
if (prop.Name == "MessageType")
{
string messageType = prop.GetValue(element.DataContext, null).ToString();
break;
}
}

Monday, June 22, 2009

Silverlight Developer Toolbar

last couple of days i was looking for an application same like IE Developer toolbar to check style issue on IE brower and i found this awsome free tool


http://silverlightspy.com/