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
535
restore style after floating
posted

Hi there,

I’m trying to implement your xamDockManager in our application but I stumbled over the behavior that a floating pane will be removed from the xamDockManager controls visual tree.

But first a short introduction of my implementation. At first I implemented the behavior that allows me to bind to a collection, which represents my views (http://ko.infragistics.com/community/blogs/blagunas/archive/2013/09/24/xamdockmanager-data-binding-contentpanes-with-mvvm.aspx). In the panes I show a xamDataGrid with the ability to dynamically add/remove columns from the grid and I give every column its own style, depending on various cases. So most of my UnboundFields have an own unique style.

But because of the above mentioned behavior I’m facing now the problem that all my column-styles are gone and no values are shown anymore when I move the tab. So obvious I need a solution that allows me to keep my styles without rebuilding them and also save my position of my selected or focused row/column.

I read in several posts/documentation that I should use the ToolWindowLoad/ToolWindowUnload event to set my styles, but at the moment I’m not really sure how I can achieve this.

I created a small example of my current implementation.

 

BR

Andreas Hensel

XamDockManagerTesting.zip
Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Andreas,

    Thank you for your post!

    I have been investigating into the sample project that you have sent, and I have reproduced this behavior that you are seeing. When a pane is floated in the XamDockManager, it gets recreated into a new pane with a new instance of the content that was inside of it, but it is strange that only the Id column seems to be showing up, as the Loaded event for the grid is still being fired. It seems to me that the ItemTemplates defined for the data types O1 and O2 in your project are being persisted to show only what is in the XAML of your corresponding user control, even though the Loaded events of the grids in those user controls are hit when the pane is floated, and so the columns should be getting added. However, when viewing the visual tree, it does not appear that those columns are added to the floated pane's grid.

    I am going to continue to investigate this, and I will have more information for you on this matter soon. Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

Children