public HResult CreateToolWindow(INiWindowPane windowPane, NiDockStyle dockStyle, NiToolWindowOrientation toolWindowOrientation, out INiWindowFrame toolWindow)
{
toolWindow = null;
try
{
if (windowPane == null)
throw new ArgumentNullException("windowPane");
var dockContent = new DockContent(windowPane, dockStyle, toolWindowOrientation)
{
Site = new SiteProxy(this)
};
dockContent.Disposed += dockContent_Disposed;
_dockContents.Add(windowPane, dockContent);
toolWindow = dockContent.GetProxy();
return HResult.OK;
}
catch (Exception ex)
{
return ErrorUtil.GetHResult(ex);
}
}