Hey Guys,
I am using a XamDataGrid and i am trying to Sync mein Field with, which works perfectly as i want it to.
To Sync my Field With I listen to the Size Change Event from the LabelPresenter
private void EventSetter_OnHandler(object sender, SizeChangedEventArgs e) { var lp = sender as LabelPresenter; if (lp != null) { if (lp.Parent is VirtualizingDataRecordCellPanel && e.PreviousSize.Width != 0) { var layout = (lp.Parent as VirtualizingDataRecordCellPanel).DataContext as FieldLayout; foreach (var field in layout.Fields) { if (field.Name.Contains("Result")) { field.Width = new FieldLength(lp.Field.CellWidthResolved); } } } } }
The Problem is when i scroll the Grid Horizontally the Size Changed event occurs. Actually i understand why this is happening but how can i handle this problem so my Labels wont change their size when scrolling?
Markus
-closed-
Hello joerg_neumann,
Thank you for your post!
From your most recent reply to this post, I am under the impression that you have resolved this issue you are seeing. If my impression is incorrect, please let me know and I will be happy to assist you on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support