コード例 #1
0
 private static void InitializeColumns(System.Windows.Controls.ListView listView)
 {
     if (ListView.TryRegisterColumns(listView))
     {
         ListView.AlignColumns(listView);
     }
 }
コード例 #2
0
 private static void OnTextAlignmentChanged(DependencyObject attachingElement, DependencyPropertyChangedEventArgs e)
 {
     // Get the parent ListView of the current column
     if (attachingElement is GridViewColumn gridViewColumn && ListView.ColumnListViewTable.TryGetValue(gridViewColumn, out System.Windows.Controls.ListView listView))
     {
         ListView.AlignColumns(listView);
     }
 }