I want to manipulate a visual element in an adorner so that it is always lined up vertically with a column header in the grid. I'm subscribing to xamDataGrid_FieldPositionChanged to get notifications when the columns are re-ordered, and at that point I need to move the element to the same x-coordinate on screen as the column. I can get the order of the column using Field.ActualPosition.Column, but not the screen location which its at. I could loop through all columns to the left and add all their resolved widths, but there's got to be better built-in functionality!Neil
Hello Neil,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Thank you for your post. I have been looking into and I created a sample project for you with the functionality you want. Basically I created a Style for the LabelPresenter and handled its Loaded event. In the handler I get the instance of the Field that I want to track and then in the FieldPositionChanged event I use to PointToScreen method to get the Field’s position. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.