public void AddCollapsedView(ColumnDefinition def, string header, Action expandAction)
        {
            var control = new ColumnCollapseControl { ColumnName = header };

            control.ExpandAction = delegate
               	{
                // Execute expand action
               		if (expandAction != null)
               			expandAction();

                // Remove control from view
                ColumnCollapseStackPanel.Children.Remove(control);
               	};

            ColumnCollapseStackPanel.Children.Add(control);
        }
Exemple #2
0
        public void AddCollapsedView(ColumnDefinition def, string header, Action expandAction)
        {
            var control = new ColumnCollapseControl {
                ColumnName = header
            };

            control.ExpandAction = delegate
            {
                // Execute expand action
                if (expandAction != null)
                {
                    expandAction();
                }

                // Remove control from view
                ColumnCollapseStackPanel.Children.Remove(control);
            };

            ColumnCollapseStackPanel.Children.Add(control);
        }