VSCT: Place Search Textbox below the toolwindow toolbar

82 views Asked by At

I have made a toolbar that has a Search Textbox, using the visual studio built in search for the toolwindowpane: https://learn.microsoft.com/pt-pt/previous-versions/visualstudio/visual-studio-2015/extensibility/adding-search-to-a-tool-window?view=vs-2015&redirectedfrom=MSDN

That is working just fine right now after overriding the methods, however i also added a toolbar to the toolwindow from the vsct file, however it is positioning the search and the toolbar in the same row:

enter image description here

Is there any way to position the search bar underneath the toolbar just like the solution explorer in visual studio? If not, is there a way to decrease the toolbar size so it uses the minimum space so it doesn't look weird like in the picture?

Thank you.

EDIT: Constructor of the class that inherits ToolWindowPane:

public CpcObjectsWindow() : base(null)
    {
        this.Caption = "CPC Objects";

        // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
        // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
        // the object returned by the Content property.
        this.Content = new CpcObjectsWindowControl();

        this.ToolBar = new CommandID(new Guid(CpcExtensionPackage.guidCpcExtensionPackageCmdSet), CpcExtensionPackage.cpcObjectsToolbar);
        this.ToolBarLocation = (int)VSTWT_LOCATION.VSTWT_TOP;
    }
1

There are 1 answers

1
Jingmiao Xu-MSFT On

I tried to add search to a tool window , a search control appears at the top of the tool window.

enter image description here

I tried to search form the ToolWindowPane Class but there is not any property can set the size of search bar. I think that you can submit a feature request on DC.