Browse Source

Outline Node.

Show Children of for Example AvalonDock2 in Outline Node
pull/72/head
jkuehner 12 years ago
parent
commit
d267d43428
  1. 27
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/OutlineView/OutlineNode.cs

27
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/OutlineView/OutlineNode.cs

@ -54,7 +54,7 @@ namespace ICSharpCode.WpfDesign.Designer.OutlineView
var locked = designItem.Properties.GetAttachedProperty(DesignTimeProperties.IsLockedProperty).ValueOnInstance; var locked = designItem.Properties.GetAttachedProperty(DesignTimeProperties.IsLockedProperty).ValueOnInstance;
if (locked != null && (bool) locked == true) { if (locked != null && (bool) locked == true) {
this._isDesignTimeLocked = true; this._isDesignTimeLocked = true;
} }
//TODO //TODO
@ -94,15 +94,15 @@ namespace ICSharpCode.WpfDesign.Designer.OutlineView
value ? SelectionTypes.Add : SelectionTypes.Remove); value ? SelectionTypes.Add : SelectionTypes.Remove);
RaisePropertyChanged("IsSelected"); RaisePropertyChanged("IsSelected");
} }
} }
} }
bool _isDesignTimeVisible = true; bool _isDesignTimeVisible = true;
public bool IsDesignTimeVisible public bool IsDesignTimeVisible
{ {
get { get {
return _isDesignTimeVisible; return _isDesignTimeVisible;
} }
set { set {
_isDesignTimeVisible = value; _isDesignTimeVisible = value;
@ -122,8 +122,8 @@ namespace ICSharpCode.WpfDesign.Designer.OutlineView
public bool IsDesignTimeLocked public bool IsDesignTimeLocked
{ {
get { get {
return _isDesignTimeLocked; return _isDesignTimeLocked;
} }
set { set {
_isDesignTimeLocked = value; _isDesignTimeLocked = value;
@ -194,6 +194,21 @@ namespace ICSharpCode.WpfDesign.Designer.OutlineView
var node = OutlineNode.Create(item); var node = OutlineNode.Create(item);
Children.Add(node); Children.Add(node);
} }
else
{
var content = item.ContentProperty;
if (content != null)
{
if (content.IsCollection) {
UpdateChildrenCore(content.CollectionElements);
}
else {
if (content.Value != null) {
UpdateChildrenCore(new[] { content.Value });
}
}
}
}
} }
} }

Loading…
Cancel
Save