【发布时间】:2016-07-11 23:55:17
【问题描述】:
不知何故,这在运行时不起作用(但它正在编译):
public static readonly DependencyProperty SelectedVideoFileNamesProperty =
DependencyProperty.Register("SelectedVideoFileNames", typeof(ObservableCollection<ObservableCollection<string>>), typeof(CMiX_UI),
new PropertyMetadata(new[]{new ObservableCollection<string>(),
new ObservableCollection<string>(),
new ObservableCollection<string>(),
new ObservableCollection<string>(),
new ObservableCollection<string>(),
new ObservableCollection<string>()}));
[Bindable(true)]
public ObservableCollection<ObservableCollection<string>> SelectedVideoFileNames
{
get { return (ObservableCollection<ObservableCollection<string>>)this.GetValue(SelectedVideoFileNamesProperty); }
set { this.SetValue(SelectedVideoFileNamesProperty, value); }
}
为什么?谢谢你
【问题讨论】:
标签: c# wpf observablecollection dependency-properties