我的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"/>