Ejemplo n.º 1
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;
            }
        }
Ejemplo n.º 2
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;
            }
        }
Ejemplo n.º 3
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();
            }
        }