Пример #1
0
        private static void HideColumnsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            LMGridView view = d as LMGridView;

            if (!view._updatingHideCols)
            {
                // HideColumns might be updated from a Column Visible property changing; in which case
                // there's no reason to loop through all the columns again.
                view.SetHiddenColumns((List <string>)e.NewValue);
            }
        }
Пример #2
0
        /// <summary>
        /// Property to automatically generate column ContextMenu items has changed.
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void AutoMenuChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            LMGridView grid = d as LMGridView;

            if ((bool)e.NewValue == true)
            {
                grid.BuildColumnMenu();
            }
            else
            {
                grid.RemoveColumnMenu();
            }
        }