Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Hide close button
posted

Hi,

Please see related post "How do I add a close button to the header of a ContentPane":

http://es.infragistics.com/community/forums/t/17769.aspx

I would also like to hide/collapse the custom delete button on items which is not allowed to close, meaning where the AllowClose parameter is set to False.

I've tried to modify your code in the related post with a MultiTrigger, but the close button is still visible on items where AllowClose = False.

<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="igDock:XamDockManager.PaneLocation" Value="Document" />
<Condition Property="igDock:ContentPane.AllowClose" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="closeBtn" Property="Visibility" Value="Visible" />
</MultiTrigger>

Do you have any suggestions?

Parents
No Data
Reply
  • 22015
    Verified Answer
    posted

    Hello asle,

     

    Thank you for your post!

     

    I have been looking into it and have created a small sample application for you.

     

    In the application I am using the DataTemplate for the close button from the mentioned forum thread. For the MultiTrigger you have to use the PaneTabItem and its property AllowClosing instead of the ContentPane.

    When you strat the application the AllowClosing property of the PaneTabItem is not set. This is why I have handled the Loaded event of the XamDockManager. In the handler of the event I am getting the PaneTabItem, that corresponds to a ContentPane and set the AllowClosing property of the PaneTabItem to the AllowClose of the ContentPane.

    This way the AllowClosing property is set to the value of the AllowClose property of the ContentPane.

     

    Then I have added a simple DataTrigger and bind to the PaneTabItem and its AllowClosing property. Depentding on it I set the Visibility of the closeBtn to Collapsed.

     

    Please find the sample application attached and feel free to let me know if you have any further questions on this matter.

    DockManager_ClosingButtonInPanes_Visibility.zip
Children