LogViewer.MainWindow.OnItemCollapsed C# (CSharp) Метод

OnItemCollapsed() приватный Метод

private OnItemCollapsed ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
Результат void
        private void OnItemCollapsed(object sender, RoutedEventArgs e)
        {
            Expander expander = (Expander)sender;
            Expander source = e.OriginalSource as Expander;
            if (source != null && source != expander)
            {
                // bugbug: for some reason WPF also sends collapse event to all the parents
                // but we want to ignore those.
                return;
            }
            ListView childView = expander.Content as ListView;
            if (childView != null)
            {
                childView.ItemsSource = null;
            }
            // todo: remove the graphs...
        }