Example #1
0
        static void OnMaxColCountChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Fv fv = (Fv)d;

            if (fv._isLoaded)
            {
                fv._panel.InvalidateMeasure();
            }
        }
Example #2
0
        static void OnIsReadOnlyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Fv fv = (Fv)d;

            if (fv._isLoaded)
            {
                foreach (FvCell cell in fv.IDCells)
                {
                    cell.ApplyIsReadOnly();
                }
            }
        }
Example #3
0
        static void OnDataChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Fv fv = (Fv)d;

            // 未显示前不处理
            if (fv._isLoaded)
            {
                if (e.OldValue != null)
                {
                    // 移除旧数据事件
                    if (e.OldValue is Row row)
                    {
                        row.Changed -= fv.OnCellValueChanged;
                    }
                    else if (fv.DataView != null)
                    {
                        fv.DataView.Changed -= fv.OnPropertyValueChanged;
                    }
                }
                fv.OnDataChanged();
            }
        }