title: WPF : the SizeChanged always being fired
body: <p>i m used ResponsiveGrid to make a Dynamic page And set a SizeChanged event in order to change  button's position . but the SizeChanged always being fired make the windows flicker ,and SizeChanged event can not stop,here is my code in .cs</p>
  <pre><code> private void Condition_SizeChanged(object sender, EventArgs e)
          {
              if (ActualWidth &gt; 1480)
              {
                  Col1.Height = new GridLength(100.0, GridUnitType.Star);
                  Col2.Height = new GridLength(1.0, GridUnitType.Star);
                  Row1.Width = new GridLength(5.0, GridUnitType.Star);
                  Row2.Width = new GridLength(1.0, GridUnitType.Star);
  
                  CommonButtonSearch.SetValue(Grid.ColumnProperty, 1);
                  CommonButtonSearch.SetValue(Grid.RowProperty, 0);
  
                  CommonButtonSearch.Margin = new Thickness(30, (ActualHeight - 32) / 2, 0, (ActualHeight - 32) / 2);
  
              }
              else
              {
                  Row1.Width = new GridLength(100.0, GridUnitType.Star);
                  Row2.Width = new GridLength(1.0, GridUnitType.Star);
                  Col1.Height = new GridLength(5.0, GridUnitType.Star);
                  Col2.Height = new GridLength(1.0, GridUnitType.Star);
  
                  CommonButtonSearch.SetValue(Grid.ColumnProperty, 0);
                  CommonButtonSearch.SetValue(Grid.RowProperty, 1);
  
                  CommonButtonSearch.Margin = new Thickness((ActualWidth - 120) / 2, 30, (ActualWidth - 120) / 2, 30);
              }
          }
  </code></pre>