Exemple #1
0
 //<Snippet3>
 private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     //Get the column header that started the command and move that column left to freeze it.
     System.Windows.Controls.Primitives.DataGridColumnHeader header = (System.Windows.Controls.Primitives.DataGridColumnHeader)e.OriginalSource;
     if (header.Column.IsFrozen == true)
     {
         return;
     }
     else
     {
         header.Column.DisplayIndex = DG1.FrozenColumnCount;
         DG1.FrozenColumnCount++;
     }
 }
 public DataGridColumnHeaderAutomationPeer(System.Windows.Controls.Primitives.DataGridColumnHeader owner) : base(default(System.Windows.Controls.Primitives.ButtonBase))
 {
 }