|
|
|
@ -11,6 +11,9 @@ using System.Collections.ObjectModel;
@@ -11,6 +11,9 @@ using System.Collections.ObjectModel;
|
|
|
|
|
using System.Collections; |
|
|
|
|
using ICSharpCode.WpfDesign.Designer; |
|
|
|
|
using ICSharpCode.WpfDesign.XamlDom; |
|
|
|
|
using System.Windows; |
|
|
|
|
using System.Windows.Controls; |
|
|
|
|
using System.Windows.Input; |
|
|
|
|
|
|
|
|
|
namespace ICSharpCode.WpfDesign.Designer.OutlineView |
|
|
|
|
{ |
|
|
|
@ -41,6 +44,12 @@ namespace ICSharpCode.WpfDesign.Designer.OutlineView
@@ -41,6 +44,12 @@ namespace ICSharpCode.WpfDesign.Designer.OutlineView
|
|
|
|
|
DesignItem = designItem; |
|
|
|
|
UpdateChildren(); |
|
|
|
|
|
|
|
|
|
var hidden = designItem.Properties.GetAttachedProperty(DesignTimeProperties.IsHiddenProperty).ValueOnInstance; |
|
|
|
|
if (hidden != null && (bool) hidden == true) { |
|
|
|
|
this._isDesignTimeVisible = false; |
|
|
|
|
((FrameworkElement) this.DesignItem.Component).Visibility = Visibility.Hidden; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//TODO
|
|
|
|
|
DesignItem.NameChanged += new EventHandler(DesignItem_NameChanged); |
|
|
|
|
DesignItem.PropertyChanged += new PropertyChangedEventHandler(DesignItem_PropertyChanged); |
|
|
|
@ -80,6 +89,28 @@ namespace ICSharpCode.WpfDesign.Designer.OutlineView
@@ -80,6 +89,28 @@ namespace ICSharpCode.WpfDesign.Designer.OutlineView
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool _isDesignTimeVisible = true; |
|
|
|
|
|
|
|
|
|
public bool IsDesignTimeVisible |
|
|
|
|
{ |
|
|
|
|
get { |
|
|
|
|
return _isDesignTimeVisible; |
|
|
|
|
} |
|
|
|
|
set { |
|
|
|
|
_isDesignTimeVisible = value; |
|
|
|
|
var ctl = DesignItem.Component as UIElement; |
|
|
|
|
ctl.Visibility = _isDesignTimeVisible ? Visibility.Visible : Visibility.Hidden; |
|
|
|
|
|
|
|
|
|
RaisePropertyChanged("IsDesignTimeVisible"); |
|
|
|
|
|
|
|
|
|
if (!value) |
|
|
|
|
DesignItem.Properties.GetAttachedProperty(DesignTimeProperties.IsHiddenProperty).SetValue(true); |
|
|
|
|
else |
|
|
|
|
DesignItem.Properties.GetAttachedProperty(DesignTimeProperties.IsHiddenProperty).Reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ObservableCollection<OutlineNode> children = new ObservableCollection<OutlineNode>(); |
|
|
|
|
|
|
|
|
|