Hey all... I posted this in the vs.net ide group too, but people are not answering, so I figured that it might be more appropriate here. I'm not sure if I'm adding a designer to my code properly. I'm only adding it to the tree node, where each custom tree node is then added to a normal tree control
I'm trying to get an add-in to interact with the property window in VS.Net. Basically, I created a tool window containing a custom tree control. When the user clicks on a tree node, I want certain properties to show up in the property window. My understanding is that I need to create a designer for the component, and override the prefilterproperties method. The problem right now is that when I use clicks a node, I get no update to the property window. Do I need to hook an event to notify the property window that the tree node was clicked? Documentation on this seems sort of sparse, so any help would greatly be appreciated.
Also, I've seen this article: http://www.msdn.microsoft.com/librar...dsgnrdotnet.as
Thank
Ji
Here are some snippets of what I already have
[Designer(typeof(MyTreeNodeDesigner))]
public class MyTreeNode : TreeNod
private XmlNode _xmlNode
private string _type = String.Empty
/// <summary
/// Represents the xml fragment for this My objec
/// </summary
public XmlNode XmlNod
get { return this._xmlNode;
set { this._xmlNode = value;
/// <summary
/// Represents the <see cref="IMyObject"/> type nam
/// </summary
public string Typ
get { return this._type;
set { this._type = value;
public MyTreeNode(string nodeName
this.Text = nodeName
public MyTreeNode(string nodeName, string name
this.Text = nodeName + " - '" + name + "'"
public class MyTreeNodeDesigner : System.Windows.Forms.Design.ControlDesigne
bool locked
private bool Locked
get
return locked
set
locked = value;
public MyTreeNodeDesigner(
protected override void PreFilterProperties(IDictionary properties
base.PreFilterProperties(properties)
properties["Locked"] = TypeDescriptor.CreateProperty
typeof(MyTreeNode),
"Locked",
typeof(bool), new Attribute[0])