I am attempting to get the pinned status of a pane in the ultradockmanager when the user is closing the app. It is clearly available in the watch window or when I check the pane in the immediate window. However, when I extend the immediate window to include the proerty itself it fails. What am I missing.
?ultraDockManagerACM.DockAreas[0].DockAreaPane.Panes[0]{DockableControlPane (ultraExplorerBarMenus) [Unpinned]} ActualMaximumSize: {Width = 0 Height = 0} ActualMinimumSize: {Width = 0 Height = 0} ActualSize: {Width = 189 Height = 548} Closed: false ContainingControl: {Infragistics.Win.UltraWinDock.DockableWindow} ContentsMargins: {Infragistics.Win.UltraWinDock.Margins} Control: {Infragistics.Win.UltraWinExplorerBar.UltraExplorerBar} DefaultPaneSize: {Width = 100 Height = 100} DisplaySize: {Width = 189 Height = 548} Disposed: false DockAreaPane: {DockAreaPane - DockedLeft} DockedState: Docked Element: {Infragistics.Win.UltraWinDock.PaneUIElement} FlyoutSize: {Width = 189 Height = -1} ForceApplyResources: null HasSettings: true Index: 0 InternalId: {ce4a04d3-22a5-4a76-9760-0cc5c2f7215a} IsActive: false IsFlyoutPaneDisplayed: false IsInView: false IsInitialized: true IsLayoutSuspended: false IsMdiChild: false IsSelectedTab: false IsUnpinned: true IsVisible: false Key: "" KeyLowercaseInterned: "" Manager: { [Infragistics.Win.UltraWinDock.UltraDockManager]} Maximized: false MaximizedResolved: false MaximumSize: {Width = 0 Height = 0} MaximumSizeResolved: {Width = 0 Height = 0} MdiChildIcon: null Metrics: {Infragistics.Win.UltraWinDock.DockablePaneBase.PaneMetrics} Minimized: false MinimizedResolved: false MinimumSize: {Width = 0 Height = 0} MinimumSizeResolved: {Width = 0 Height = 21} NestDepth: 1 OriginalControlBounds: {X = 80 Y = 40 Width = 200 Height = 365} Parent: {DockAreaPane - DockedLeft} ParentDocked: {DockAreaPane - DockedLeft} ParentFloating: null ParentGroupSettingsResolved: {Infragistics.Win.UltraWinDock.GroupSettingsResolved} Pinned: false PrimaryCollection: {Infragistics.Win.UltraWinDock.DockablePanesCollection} Settings: {Infragistics.Win.UltraWinDock.PaneSettings} SettingsResolved: {Infragistics.Win.UltraWinDock.PaneSettingsResolved} Size: {Width = 100 Height = 100} SubObjectPropChangeHandler: {Method = {Void OnSubObjectPropChanged(Infragistics.Shared.PropChangeInfo)}} Tag: null Text: "Menus" TextTab: null TextTabResolved: "Menus" ToolTipCaption: "" ToolTipTab: null UIRole: {Infragistics.Win.AppStyling.UIRole} UIRoleContentArea: {Infragistics.Win.AppStyling.UIRole} tagValue: null
?ultraDockManagerACM.DockAreas[0].DockAreaPane.Panes[0].Pinnederror CS1061: 'DockablePaneBase' does not contain a definition for 'Pinned' and no accessible extension method 'Pinned' accepting a first argument of type 'DockablePaneBase' could be found (are you missing a using directive or an assembly reference?)
Hello Paul,
I have been looking into your question. I assume the reason for the exception is that the pane is from type DockablePaneBase. However, Pinned property requires DockableControlPane type. My suggestion to resolve the issue is to cast the pane type to DockableControlPane and after that to call the Pinned property:
var isPinned = ((DockableControlPane)pane).Pinned;
I have attached a sample application where I have three panes: TreeView, ListView and RichTextBox. The first two of them are pinned and the last one is not. In the FormClosing event handler I got the TreeView pane, cast it to DockableControlPane, check whether it is pinned and show the result in MessageBox before closing. You could store this information in file or somewhere else in order to be visible after the form is closed.
Please test it on your side and let me know if I may be of any further assistance.
Sincerely, Teodosia Hristodorova Associate Software Develope
3107.IsPinned_Pane.zip
thanks you Teodosia. This is my first experience with the UltraDockManager. Your information is exactly what I needed.
I am glad that you find my suggestion helpful.
Thank you for using Infragistics components.
Sincerely,Teodosia HristodorovaAssociate Software Developer