Ok, the only solving that I've found is to remove DependencyProperty
and create a normal Property for my ObservateCollection<UIElement>
and use INotifyPropertyChanged
.
题
I'm trying to clone UIElement
. Everything seems to be ok, but my DependencyProperties
also copy to a new element as in:
var newEl = new MyElement();
And because one of my DependencyProperties
is also a UIElement
and it's already bound onto window error occurs that element is already in use. So I even can't create new element.
What is the problem?
解决方案
不隶属于 StackOverflow