Exemplo n.º 1
0
		Category PickCategory(PropertyNode node)
		{
			if (Metadata.IsPopularProperty(node.FirstProperty)) return popularCategory;
			if (node.FirstProperty.Name.Contains(".")) return attachedCategory;
			var typeName = node.FirstProperty.DeclaringType.FullName;
			if (typeName.StartsWith("System.Windows.") || typeName.StartsWith("ICSharpCode.WpfDesign.Designer.Controls."))
				return otherCategory;
			return specialCategory;
		}
Exemplo n.º 2
0
		void AddNode(MemberDescriptor md)
		{
			var designProperties = SelectedItems.Select(item => item.Properties[md.Name]).ToArray();
			if (!Metadata.IsBrowsable(designProperties[0])) return;

			PropertyNode node;
			if (nodeFromDescriptor.TryGetValue(md, out node)) {
				node.Load(designProperties);
			} else {
				node = new PropertyNode();
				node.Load(designProperties);
				if (node.IsEvent) {
					Events.AddSorted(node);
				} else {
					var cat = PickCategory(node);
					cat.Properties.AddSorted(node);
					node.Category = cat;
				}
				nodeFromDescriptor[md] = node;
			}
			node.IsVisible = true;
			if (node.Category != null)
				node.Category.IsVisible = true;
		}
		public ChooseImageDialog(PropertyNode node)
		{
			this._node=node;
			this._data=new List<ImageData>();
			InitializeComponent();
		}
Exemplo n.º 4
0
		PropertyNode(DesignItemProperty[] properties, PropertyNode parent) : this()
		{
			this.Parent = parent;
			this.Level = parent == null ? 0 : parent.Level + 1;
			Load(properties);
		}
Exemplo n.º 5
0
		PropertyNode(DesignItemProperty[] properties, PropertyNode parent) : this()
		{
			this.Parent = parent;
			this.Level = parent == null ? 0 : parent.Level + 1;
			Load(properties);
		}