Hello,
I would like to control the dimension of my dockablepane from a button inside. So the dockable pane is already register and showing.
I would like to try something like that but I can't figured out how to get DockablePaneProviderData :
DockablePane dp = application.GetDockablePane(new DockablePaneId(new Guid("{72D8323C-1A97-4C4A-BE99-5D7CE3098B57}"))));
//How to get DockablePaneProviderData from DockablePane
DockablePaneProviderData data = ???
Autodesk.Revit.DB.Rectangle rect = new Autodesk.Revit.DB.Rectangle(200, 200, 500, 1100);
data.InitialState.SetFloatingRectangle(rect);
Also do I need to use an event to call this code?
Thanks a lot!
André
Hello,
I would like to control the dimension of my dockablepane from a button inside. So the dockable pane is already register and showing.
I would like to try something like that but I can't figured out how to get DockablePaneProviderData :
DockablePane dp = application.GetDockablePane(new DockablePaneId(new Guid("{72D8323C-1A97-4C4A-BE99-5D7CE3098B57}"))));
//How to get DockablePaneProviderData from DockablePane
DockablePaneProviderData data = ???
Autodesk.Revit.DB.Rectangle rect = new Autodesk.Revit.DB.Rectangle(200, 200, 500, 1100);
data.InitialState.SetFloatingRectangle(rect);
Also do I need to use an event to call this code?
Thanks a lot!
André
I cannot see any way to achieve that either, so I asked the development team for you.
I cannot see any way to achieve that either, so I asked the development team for you.
Thank you Jeremy!
The DockablePaneProviderData is from the interface IDockablePaneProvider.
public void SetupDockablePane(DockablePaneProviderData data)
{
data.FrameworkElement = this;
data.InitialState = new DockablePaneState
{
DockPosition = DockPosition.Tabbed,
};
}
The last time I tried to use SetFloatingRectangle was really bad, If you have two screens is hard to set in the middle or something. And that floating rectangle only gonna happen one time, after that Revit gonna remember where the user put the DockablePane.
The DockablePaneProviderData is from the interface IDockablePaneProvider.
public void SetupDockablePane(DockablePaneProviderData data)
{
data.FrameworkElement = this;
data.InitialState = new DockablePaneState
{
DockPosition = DockPosition.Tabbed,
};
}
The last time I tried to use SetFloatingRectangle was really bad, If you have two screens is hard to set in the middle or something. And that floating rectangle only gonna happen one time, after that Revit gonna remember where the user put the DockablePane.
Thank you!
It's a request from my client but I know it's not simple and I know Revit remembered the last position. But I tried to please my client.
André.
Thank you!
It's a request from my client but I know it's not simple and I know Revit remembered the last position. But I tried to please my client.
André.
Can't find what you're looking for? Ask the community or share your knowledge.