Hello,
I have attached a sample that displays a problem a full project I have been working on is exhibiting. I'm using an attached property behavior to set custom field layouts. It gets applied... but only to the second and subsequent items. It does not apply to the first item!
If I change "LabelLocation" to "InCell", all of them display the correct for that style, but this is not desired behavior for the full program (where there's about 20 fields with sub-layouts as well).
I'm also placing this grid inside a XamTabControl and getting an exception of "FieldLayout can not be moved to another DataPresenterBase." when it hits "target.FieldLayouts.Add( layout );" but I think I need instead to bind to FieldLayoutInitializing in there, so that is a problem I can investigate myself for now.
I look forward to any assistance you might be able to provide, thank you!
Hi there, just checking to see if you've had any more chance to examine this.
In doing some testing of my own I have found that by inspecting the rendered WPF the first cell does not have the field layouts applied to it; that every other cell does. By this; the DataRecordPresenter has its own FieldLayout set in its FieldLayout collection. The remaining different fields between a properly rendered DataRecordPresenter and non-properly rendered one are elements such as HasChildren, Cells, ChildRecords, etc. that I assume are not being set due to the improper field layout.
I'm trying to have this solved by Monday; as this product is due to be demoed at that time and would like to see if this can be solved by then. If not it's not the end of the world, but it would help, thank you!
Please let me know if I can provide any more information or if the provided sample was not enough.
I've updated the sample to more closely reflect the program's usage of the grid (The only major difference is instead of Window we use XamRibbonWindow) and this updated sample reflects the problem in runtime now accurately as well.
Sorry this is proving so tricky!
The sample runtime displays correctly after I cleaned/rebuilt it, even though the designer displays improperly. I've tested in the full application however (which is a bit more complex in terms of display elements) and it still shows those however. Some fields are expanded with custom field layouts, some will be hidden, but here's a better view.
I tried it with 1002 and runtime I still don’t see the issue, but I succeed to reproduce it in the design mode using both builds 1002 and 2053. Can you confirm that runtime the grid is displayed the same way as you see it design time?
Thanks,
Diyan Dimitrov
If that's from 2053, then I may need to upgrade. The current version of the tools we are using is 11.1.20111.1002.