Exemplo n.º 1
0
        static void OnValBindingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            FvCell cell = (FvCell)d;

            if (cell._isLoaded)
            {
                Binding bind = (Binding)e.NewValue;
                if (bind != null && bind.Source != null)
                {
                    if (cell._panel != null && cell._panel.Child != null)
                    {
                        cell._panel.Child.ClearValue(VisibilityProperty);
                    }

                    if (cell.ValConverter != null)
                    {
                        bind.Converter = cell.ValConverter;
                    }
                    cell.SetValBinding();
                }
                else if (cell._panel != null && cell._panel.Child != null)
                {
                    // 未设置数据源时隐藏编辑器
                    cell._panel.Child.Visibility = Visibility.Collapsed;
                }
            }
        }
Exemplo n.º 2
0
        static void OnIsVerticalTitleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            FvCell cell = (FvCell)d;

            if (cell._panel != null)
            {
                cell._panel.OnIsVerticalTitleChanged();
            }
        }
Exemplo n.º 3
0
        static void OnIsReadOnlyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            FvCell cell = (FvCell)d;

            if (cell._isLoaded)
            {
                cell.ApplyIsReadOnly();
            }
        }
Exemplo n.º 4
0
        static void OnInvalidatePanel(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            FvCell cell = (FvCell)d;

            if (cell._panel != null)
            {
                cell._panel.InvalidateMeasure();
            }
        }