Inheritance: System.Windows.Controls.Border
示例#1
0
        private static void OnIsRowSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (d == null || e.NewValue == null)
            {
                return;
            }

            DsxCellBase _context  = (DsxCellBase)d;
            bool        _newValue = (bool)e.NewValue;
            bool        _oldValue = (bool)e.OldValue;

            if (_newValue != _oldValue)
            {
                _context.Background  = (_newValue ? Brushes.Transparent : _context.CellBackground);
                _context.BorderBrush = _context.Background;
            }
        }
示例#2
0
        private static void OnCellVBorderIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (d == null || e.NewValue == null)
            {
                return;
            }

            DsxCellBase _context  = (DsxCellBase)d;
            bool?       _newValue = (bool?)e.NewValue;
            bool?       _oldValue = (bool?)e.OldValue;

            if (_newValue != _oldValue)
            {
                _context.Margin = ((bool)_newValue) && !_context.IsDecorator ? _context.m_vBorderMargin : _context.m_defaultMargin;
                _context.CreateVBorderVisual();
            }
        }
示例#3
0
        private static void OnCellBackgroundChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (d == null || e.NewValue == null)
            {
                return;
            }

            DsxCellBase _context  = (DsxCellBase)d;
            Brush       _newValue = (Brush)e.NewValue;
            Brush       _oldValue = (Brush)e.OldValue;

            if (_newValue != _oldValue)
            {
                _context.Background  = _newValue;
                _context.BorderBrush = _newValue;
            }
        }
示例#4
0
        internal void ToggleCheck(DsxCellBase curCell)
        {
            DsxRowCell <CheckBox> _checkCell = curCell as DsxRowCell <CheckBox>;

            if (_checkCell != null)
            {
                bool _newValue = (bool)_checkCell.IsChecked;
                _newValue = !_newValue;

                System.Diagnostics.Debug.WriteLine("ToggleCheck {0}", _newValue);

                _checkCell.Dispatcher.BeginInvoke(new Action(delegate
                {
                    _checkCell.IsChecked = _newValue;
                }),
                                                  DispatcherPriority.Input);
            }
        }