Parameters
- id
- The DAML identifier.
Return Value
Returns the dock pane associated with the specified DAML ID.
// in order to find a dockpane you need to know its DAML id var pane = FrameworkApplication.DockPaneManager.Find(dockPaneID);
{
// in order to find a dockpane you need to know its DAML id
pane = FrameworkApplication.DockPaneManager.Find(dockPaneID);
// determine visibility
bool visible = pane.IsVisible;
// activate it
pane.Activate();
// determine dockpane state
DockPaneState state = pane.DockState;
// pin it
pane.Pin();
// hide it
pane.Hide();
}
{
// in order to find a dockpane you need to know its DAML id
pane = FrameworkApplication.DockPaneManager.Find(dockPaneID);
// get the undo stack
OperationManager manager = pane.OperationManager;
if (manager != null)
{
// undo an operation
// Use await with UndoAsync and RedoAsync
if (manager.CanUndo)
manager.UndoAsync().Wait();
// redo an operation
if (manager.CanRedo)
manager.RedoAsync().Wait();
// clear the undo and redo stack of operations of a particular category
manager.ClearUndoCategory("Some category");
manager.ClearRedoCategory("Some category");
}
}
{
// Here is a DAML example with a dockpane defined. Once you have found the dockpane you can cast it
// to the dockpane viewModel which is defined by the className attribute.
//
//<dockPanes>
// <dockPane id="MySample_Dockpane" caption="Dockpane 1" className="Dockpane1ViewModel" dock="bottom" height="5">
// <content className="Dockpane1View" />
// </dockPane>
//</dockPanes>
DockpaneViewModel vm = FrameworkApplication.DockPaneManager.Find(dockPaneID) as DockpaneViewModel;
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)