title: WPF UI control move position via data binding
body: <p>Please refer to the Model,ViewModel and View below.
   The Textblock control on the view is not getting moved/updated to new position on the screen once i have set the value of the databinding property in the corresponding ViewModel.</p>
  
  <p>Model:</p>
  
  <pre><code>  private int _Text_1_Left;
    public int Text_1_Left
       {
           get { return _Text_1_Left; }
           set
           {
               if (_Text_1_Left != value)
               {
                   _Text_1_Left = value;
  
               }
           }
      }
  </code></pre>
  
  <p>ViewModel:</p>
  
  <pre><code>public class MyViewModel:INotifyPropertyChanged
  {
       private int _Text_1_Left = 50;
       public int Text_1_Left
           {
               get { return _Text_1_Left; }
               set
               {
                   if (_Text_1_Left != value)
                   {
                       _Text_1_Left = value;
                       RaisePropertyChangedEvent("Text_1_Left");
                   }
               }
           }
       public event PropertyChangedEventHandler PropertyChanged;
          private void RaisePropertyChangedEvent(string Property)
          {
              if (PropertyChanged != null)
              {
                  PropertyChanged(this, new PropertyChangedEventArgs(Property));
              }
      }
  
  }
  </code></pre>
  
  <p>View(XAML):</p>
  
  <pre><code>  &lt;canvas&gt;
      &lt;TextBlock Canvas.Left="{Binding ObjMyVM.Text_1_Left,Mode=OneWay}" Canvas.Top="10" /&gt;
   &lt;/canvas&gt;
  </code></pre>
  
  <p>View(Xaml.cs)
  I am setting the DataBinding property in code behind of View.</p>
  
  <pre><code> public form_load()
   {
      MyViewModel objMyVM=new MyViewModel()
      this.DataContext=objMyVM;
   }
  
   private void cmdMoveLeft_MouseUp(object sender, MouseButtonEventArgs e)
           {
               double Left;
               TextBlock lbl_curr_selected;
               lbl_curr_selected = Button_Text_1;
  
               if (lbl_curr_selected != null)
               {
                   Left = CurrentRec.Text_1_Left;
                   Left = Left &lt;= 0 ? 0 : Left - 5;
                   ObjMyVM.Text_1_Left =int.Parse(Left.ToString()) ;
  
           }
           }
  </code></pre>
  
  <p>No error but textblock is supposed to move left by 5,which it is currently not doing.
    Please show me how to move the position of a control element on the UI by changing the binding from code-behind.</p>