public UIElement() { VisualChildrean = new ReadOnlyObservableCollection <UIElement>(this.visualChildrean); LogicalChildrean = new ReadOnlyObservableCollection <UIElement>(this.logicalChildrean); if (this is RootWindow) { RootWindow = this as RootWindow; } DepthProperty.Bind(this, VisualParentProperty.Of(this).Over(DepthProperty).ConvertOneWay(toConvert => toConvert + 1)); }
set => SetValue(DepthProperty, value);