Exemple #1
0
        /// <summary>
        /// Method called when the remove column button is clicked.
        /// </summary>
        /// <param name="pSender">The button sender.</param>
        /// <param name="pEventArgs">The event arguments.</param>
        private void OnRemoveColumnButtonClick(object pSender, RoutedEventArgs pEventArgs)
        {
            TreeListViewColumn lColumn = this.ColumnsListBox.SelectedValue as TreeListViewColumn;

            if (lColumn != null)
            {
                this.TreeToTest.Columns.Remove(lColumn);
            }
        }
        /////////////////////////////////////////////////////////////////////////////////////////////////////
        // NON-PUBLIC PROCEDURES
        /////////////////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Initializes an additional column in the property grid.
        /// </summary>
        private void InitializeAdditionalColumn()
        {
            var column = new TreeListViewColumn();

            column.CellBorderThickness = new Thickness(0, 0, 1, 0);
            column.CellPadding         = new Thickness(3, 0, 3, 0);
            column.CellTemplate        = this.FindResource("IsModifiedTemplate") as DataTemplate;
            column.MinWidth            = 16;
            column.Width = GridLength.Auto;
            propGrid.Columns.Insert(1, column);
        }