Example #1
0
        private static void OnDataGridContextChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            HierarchicalGroupLevelIndicatorPane self = ( HierarchicalGroupLevelIndicatorPane )sender;
            Panel panel = self.GroupLevelIndicatorPaneHost;

            if (panel != null)
            {
                panel.Children.Clear();
            }
        }
Example #2
0
        private static void OnParentDataGridControlChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            HierarchicalGroupLevelIndicatorPane self = ( HierarchicalGroupLevelIndicatorPane )sender;
            DataGridControl grid = e.OldValue as DataGridControl;

            //unsubsribe from the old DataGridControl (the GLIP was disconnected)
            if (grid != null)
            {
                DetailsChangedEventManager.RemoveListener(grid, self);
            }

            grid = e.NewValue as DataGridControl;

            //register to the parent grid control's Items Collection GroupDescriptions Changed event
            if (grid != null)
            {
                self.PrepareDefaultStyleKey(grid.GetView());

                DetailsChangedEventManager.AddListener(grid, self);
                self.InvalidateMeasure();
            }
        }