Depedency属性未更新

时间:2018-02-02 09:23:31

标签: wpf dependency-properties

我的UserControl的依赖属性未触发。我在usercontrol中的属性名为"MultiColumnComboBox" =>

public readonly DependencyProperty ItemSourceValueProperty = DependencyProperty.Register("ItemSourceValue", typeof(List<EmployeeModel>), typeof(MultiColumnComboBox), new PropertyMetadata(new List<EmployeeModel>(),TargetPropertyChanged));
        public List<EmployeeModel> ItemSourceValue
        {
            get
            {
                return (List<EmployeeModel>)GetValue(ItemSourceValueProperty);
            }
            set
            {
                SetValue(ItemSourceValueProperty, value);
            }
        }   

private static void TargetPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {

        }

我的xaml =&gt;

<r:MultiColumnComboBox ItemSourceValue="{Binding EmployeeList}"
                                   Grid.Row="0"
                                   Grid.Column="1"
                                   Margin="2"/>

我已经查看了此链接=&gt; Link 1 Link 2,但这对我无效。

0 个答案:

没有答案