title: How to let a property change event fire when its sub-property changes?
body: <p>I have a class AdvanceBasicEffect, it has a property SpecularColor which is object of class AdvanceVector3 class, so when i bind specularColor.X property, property change event fires but only in AdvanceVector3 class not in AdvanceBasicEffect. </p>
  
  <p>See the code you will figure out :</p>
  
  <pre><code>public partial class Lights : UserControl
  {
      public Lights()
      {
          InitializeComponent();
  
          this.DataContext = this;
          basicEffect = new AdvanceBasicEffect();
      }
  
      public AdvanceBasicEffect basicEffect { get; set; }
  }
  
  public class AdvanceBasicEffect : INotifyPropertyChanged
  {
      public AdvanceBasicEffect()
      {
          SpecularColor = new AdvanceVector3();
          basicEffect = ((bathroom)CurrentWindowHandle.currentGame.Components.First()).basicEffect;
      }
  
      BasicEffect basicEffect;
  
      AdvanceVector3 _SpecularColor;
      public AdvanceVector3 SpecularColor 
      { 
          get
          {
              return _SpecularColor;
          }
          set
          {
              //Line 1 : event not occuring 
  
              _SpecularColor = value;
              if(basicEffect!=null)
               basicEffect.DirectionalLight0.Direction = new Vector3(_SpecularColor.X, _SpecularColor.Y, _SpecularColor.Z);
              valueChanged("SpecularColor");
  
          }
      }
  
      private void valueChanged(string p)
      {
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(p));
              CurrentWindowHandle.currentGame.models[0].SetMeshEffect("Archinteriors7_10_80", basicEffect, false);
              CurrentWindowHandle.currentGame.models[0].SetMeshEffect("Archinteriors7_10_111", basicEffect, false);
              CurrentWindowHandle.currentGame.models[0].SetMeshEffect("Archinteriors7_10_112", basicEffect, false);
          }
      }
  
      public event PropertyChangedEventHandler PropertyChanged;
  }
  
  
  
  public class AdvanceVector3 : INotifyPropertyChanged
  {
      float _X;
      public float X
      {
          get
          {
              return _X;
          }
          set
          {
              _X = value;
              valueChanged("X");
          }
      }
  
      float _Y;
      public float Y
      {
          get
          {
              return _Y;
          }
          set
          {
              _Y = value;
              valueChanged("Y");
          }
      }
  
      float _Z;
      public float Z
      {
          get
          {
              return _Z;
          }
          set
          {
              _Z = value;
              valueChanged("Z");
          }
      }
  
      private void valueChanged(string p)
      {
          //line 2 :Event Occuring 
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(p));
              //CurrentWindowHandle.currentGame.models[0].SetMeshEffect("Archinteriors7_10_80", basicEffect, false);
              //CurrentWindowHandle.currentGame.models[0].SetMeshEffect("Archinteriors7_10_111", basicEffect, false);
              //CurrentWindowHandle.currentGame.models[0].SetMeshEffect("Archinteriors7_10_112", basicEffect, false);
          }
      }
      public event PropertyChangedEventHandler PropertyChanged;
  }
  </code></pre>
  
  <p>At comment "Line 1" event is occurring whereas on "Line 2" event occur, so my question is when the sub property changes then why is the parent property change not occuring. I can not define X,Y,Z in same class as i have many properties which are going to need AdvanceVector3 class </p>
  
  <p>Binding code is as follows :</p>
  
  <pre><code>  &lt;Slider ToolTip="SpecularColorX" Minimum="-1" Maximum="1" Value="{Binding basicEffect.SpecularColor.X}" /&gt;
          &lt;Slider ToolTip="SpecularColorY" Minimum="-1" Maximum="1" Value="{Binding basicEffect.SpecularColor.Y}" /&gt;
          &lt;Slider ToolTip="SpecularColorZ" Minimum="-1" Maximum="1" Value="{Binding basicEffect.SpecularColor.Z}" /&gt;
  </code></pre>