Пример #1
0
        /// <summary>
        ///     Disables the DataGrid making it read-only.
        /// </summary>
        /// <param name="control">The control that will be worked with.</param>
        public static void Disable(this DataGrid control)
        {
            if (!control.Dispatcher.CheckAccess())
            {
                control.Dispatcher.Invoke(() => { control.Disable(); });
                return;
            }

            DataGridPrep(ref control, false);
        }