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,
I looked at the sample application that you provided, but I couldn’t find an issue. I don’t understand what exactly doesn’t apply on the first item and what do you mean by the first item – the first field, field layout, record or something else?
Thanks,
Diyan Dimitrov
In the sample the field layout isn't being applied to the first record; but it is being applied to all subsequent records. I hope that clears it up.