Unofficial Content
  • This documentation is valid for:

To add a node in the ToolWindow Preferences section; add a class inheriting from AbstractPackageUI and overide the GetPreferencesNodes() method; for example:

public override IEnumerable<IModelTreeNode> GetPreferencesNodes()
{
	yield return new MyPreferencesNode();
}

Then, you need to implement the IModelTreeNode interface to create your own node preferences; to make it easier you can inherit directly from AbstractNode or VirtualNode: for example:

public class MyPreferencesNode: VirtualNode
{
	public MyPreferencesNode()
	: base("Icon text", Resources.SelectedIcon, Resources.UnselectedIcon, false)) // Last parameter (false) details if it is a subnode container
	{
	}
	public override void DoDefaultAction()
	{
		// Show your own Tool Window using the UIService
                try
                {
                    UIServices.ToolWindows.FocusToolWindow(new Guid("your Tool Window GUID"));
                }
                catch (Exception e)
                {
                    // TODO
                }
	}
}

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant