Can a ToolbarPluginWpfUserControl close itself?

We have implemented a ToolbarPluginWpfUserControl that shows in response to a toolbar button click, and see that it is easily dismissed by clicking somewhere outside the the ToolbarPluginWpfUserControl.

However, we would like to be able to dismiss the user control ourselves, in response to the user taking some action the user control that should automatically dismiss it.

Trying a workaround like

Window.GetWindow(this).Close()

seems to exit SmartClient itself.

There is a close method - https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_client_1_1_toolbar_plugin_wpf_user_control.html&tree=tree_search.html?search=toolbarpluginwpfusercontrol

Calling that should close. I have a feeling this might not be what you are asking for and if there is more to it please elaborate on your question.

Unfortunately it doesn’t. The ToolbarPluginWpfUserControl.Close() method is only a callback from SmartClient that is called when the user control has been closed. Calling it ourselves has no effect.

With the current implementation this is unfortunately not supported.

Thanks, Bo. Could this functionality please be considered for a future release?