I have dockable pane with DockPosition=Rigth and MinWidth=300. When pane is attached to Revit everything fine, but when i move it using mouse and DockPosition is changed to Floating , the panel do not react for MinWidth and change width to ~100.
Asked
Active
Viewed 374 times
1 Answers
0
How do you register the panel? You can try to register the panel after application is initialized if you haven't already tried that.
UIControlledApplication _uiControlledApplication = null;
public Result OnStartup(UIControlledApplication application)
{
_uiControlledApplication = application;
application.ControlledApplication.ApplicationInitialized += OnApplicationInitialized;
return Result.Succeeded;
}
private void OnApplicationInitialized(object sender, EventArgs e)
{
RegisterDockableWindow(_uiControlledApplication);
}
private void RegisterDockableWindow(UIControlledApplication app)
{
//app.RegisterDockablePane(....)
}

Marek Trawczynski
- 61
- 5
-
Yeah my panel already registered, one problem with width when user move panel from docked position to floating. – cowor12 Apr 15 '21 at 17:07
-
What I meant is that if you slow down panel registration until the moment when application is initialized then it is possible that minimum height and width will be successfully approved by revit UI. I'm aware that you successfully registered the panel. I also observed that initial panel size only works on the first specific dockpanel guid registration. When you close and open revit the default panel size will be set to previously used values. – Marek Trawczynski Apr 20 '21 at 14:41