static BindingExpression GetBindingExp(DependencyObject d, DependencyProperty dp) {
#if !SILVERLIGHT
return BindingOperations.GetBindingExpression(d, dp);
#else
if(d is FrameworkElement)
return ((FrameworkElement)d).GetBindingExpression(dp);
return d.ReadLocalValue(dp) as BindingExpression;
#endif
}