Stack Exchange
Can't Bind the DependencyProperty of a Class Derived from DependenyObject in WPF?
Im having  a control named MyControl which contains a Collection<MyClass> named MyClasses 
   <MyControl>
      <MyClasses>
         <MyClasss Value={Binding} />
      </MyClasses>
  </MyControl>

MyClass that is derived from DependencyObject
        Public Class MyClass : DependencyObject,INotifyPropertyChanged
        {
            Value  //propdp (DependencyProperty) 
        }

Im having  a DataTable. I need to bind the data present in table[0][0]  with the Value Property of MyClass
        Binding valuebinding = new Binding();
        valuebinding.Path = new PropertyPath("ItemArray[0]");
        valuebinding.Source = Table.Rows[0];
        valuebinding.Mode = BindingMode.TwoWay;
        BindingOperations.SetBinding(myValue, MyClass.ValueProperty, valuebinding);
        BindingOperations.SetBinding(textBlock, TextBlock.TextProperty, valuebinding);

Now i need to dynamically change the value of the data present in the data table ?
is there issue in it? whether the solution related to the below reasons?

The DependencyObject class overrides and seals the Equals() and GetHashCode() methods
DependencyObjects are not marked as serializable
DependencyObject has thread affinity – it can only be accessed on the thread on which it was created

NOTE: It works fine in Silverlight

You better can do one thing. Create a class with the property which you would be setting from the dataTable object, derive that class from INotifyPropertyChanged and bind the property of this class from the control. A small code snippet as shown below
class MyCodeSnippet:INOtifyPropertyChanged
{
   public object MyProperty {
     get; 
     set
      {
        //Register for Notification
      }
    }

   //Implement all the INotifyPropertyChanged function
}


valuebinding.Path = new PropertyPath("MYProperty");
valuebinding.Source = MyClass;


`private double myValue;
public double MyValue
{
get { return myValue;}
set{myValue = value;RaisePropertyChanged("MyValue");}
}
    public event PropertyChangedEventHandler PropertyChanged;

    public void RaisePropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }`


you can change the source and path as shown in the code in my answer. I think it is better to have class as source and the property as path
