Revit 2025 API
IDockable |
Interface that the Revit UI will call during initialization of the user interface to gather information about add-in dockable pane windows.
Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
The IDockablePaneProvider type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| SetupDockablePane | Method called during initialization of the user interface to gather information about a dockable pane window. |
// // Provider class called by Revit to provide information about the pane // to embed. // public class PaneProvider : IDockablePaneProvider { public void SetupDockablePane(DockablePaneProviderData data) { // // SetupDockablePane is called to collect the properties for your pane // including the WPF FrameworkElement used for your pane. // // You have 2 choices when specifying the UI. // The typical example is to create your element as part of this setup and pass it back as the "FrameworkElement" // property of the provider Data. Most any container control will work, but we // we generally suggest using a descendant of the Page class: data.FrameworkElement = new Page(); // // A more advanced mechanism is to provided a callback that creates the UI element on demand // each time the containing view is created. Generally, this approach is needed for UI Elements // that CANNOT be cached/reused due to some underlying dependancies. A good example of this // is the WebBrowser control that embeds a browser window, that itself is not reusable: data.FrameworkElement = null; // Set Cached element to null as we are specifying a creator. data.FrameworkElementCreator = new BrowserCreator(); // set a creator to call back into. } }
' ' Provider class called by Revit to provide information about the pane ' to embed. ' Public Class PaneProvider Implements IDockablePaneProvider Public Sub SetupDockablePane(data As DockablePaneProviderData) Implements IDockablePaneProvider.SetupDockablePane ' ' SetupDockablePane is called to collect the properties for your pane ' including the WPF FrameworkElement used for your pane. ' ' You have 2 choices when specifying the UI. ' The typical example is to create your element as part of this setup and pass it back as the "FrameworkElement" ' property of the provider Data. Most any container control will work, but we ' we generally suggest using a descendant of the Page class: data.FrameworkElement = New Page() ' ' A more advanced mechanism is to provided a callback that creates the UI element on demand ' each time the containing view is created. Generally, this approach is needed for UI Elements ' that CANNOT be cached/reused due to some underlying dependancies. A good example of this ' is the WebBrowser control that embeds a browser window, that itself is not reusable: data.FrameworkElement = Nothing ' Set Cached element to null as we are specifying a creator. data.FrameworkElementCreator = New BrowserCreator() ' set a creator to call back into. End Sub End Class
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also