Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

SearchPanel Close Functionality

$
0
0

I have an application that has two TextEditor panes in one AvalonDock. And I am able to install a seperate SearchPanel for each pane / window. But, I need to close one SearchPanel, if another SearchPanel is opened. I have added two RibbonButton items to a Ribbon that when pressed install and open a SearchPanel. But, we want to close whichever SearchPanel is not being used at the time if the user does not do it manually.

I have gotten how to "install" a SearchPanel for a TextEditor.TextArea, and I see that there is indeed a Close functionality. But, I have been unable to figure out how to use it, nor have I been able to find any examples of it being used by anyone to close the pane programmatically. 

The only way I could even get it to come up was appending it after the install on a command

SearchPanel.Install(CurrentView.textEditor.TextArea).Close();

Where CurrentView is my current TextView, and textEditor is the name of my TextEditor that I want to close. And, also felt like that is an awkward use of it in the first place. Just was not sure how to even get to the functionality otherwise.

It did not work to close the pane that way. So, I am at a loss for how I can programmatically close the SearchPanel. Can anyone help me figure out how I can close the SearchPanel using the Close() function? Or, does anyone know where I can locate code examples of installing, opening, and clossing SearchPanel programmatically? The forum(s) and/or help files do not seem to cover it thoroughly enough.

 


Viewing all articles
Browse latest Browse all 1764

Trending Articles