I have looked into below article , there is a zip code attached within same.
www.infragistics.com/.../itemssource-for-xamdockmanager-elements
I want the close button to be disabled or removed
Also, when we right click on pane header it shows option for 'close', I want this to be disabled/removed.
Please refer to below code within article sample attached within which I need above metioned funtionality
<igDock:DocumentContentHost igExtensions:ContentPaneFactory.InitializeContentPane="DocumentContentHost_InitializeContentPane"> <igExtensions:ContentPaneFactory.PaneFactory> <!-- Binds to the Documents property of the DataContext. The Content property of the generated ContentPane will be bound to the dataitem itself. In this case there is a DataTemplate defined for Person above. --> <igExtensions:ContentPaneFactory ItemsSource="{Binding Documents}" HeaderPath="Name" ContentPath="." /> </igExtensions:ContentPaneFactory.PaneFactory> </igDock:DocumentContentHost>
Hello Richa,
In order to hide the close button on the ContentPanes when using the ContentPaneFactory solution at the linked blog post, I would recommend navigating to the PrepareContainerForItem method of the ContentPaneFactory class. In this method, the ContentPane is created on around line 110 of the ContentPaneFactory class.
In order to hide the close button and the close context menu options, I would recommend setting the AllowClose and CloseButtonVisibility properties to false and Visibility.Collapsed on this ContentPane, respectively. Using the project from the blog-post, this would look like the following:
ContentPane pane = container as ContentPane; pane.AllowClose = false; pane.CloseButtonVisibility = Visibility.Collapsed;
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
It would be great if you can please update the recommended solution within attached sample code and provide me with working code.
Thanks
I am attaching an updated version of the sample project in the linked blog post with the change mentioned above.
4774.DockManagerBindingSample.zip