It seems I’m trying to do something simple, and I’ve got this weird feeling I’m using some really strange methods to achieve this.
I’ve got a couple of Silverlight DataGrid objects with a lot of custom-generated columns. These columns are generated during one of the AutogenerateColumn events. After all the columns have been generated and displayed, I want to synchronize their width and order (in other words: I’m creating a few “linked” grids which display different data but in a very similar manner).
The problem I’m facing? DataGrid doesn’t seem to have an event that gets fired after all the data has been loaded and the columns have been drawn.
For the time being I’m using the LayoutUpdated event and check if the column count is what it should be. This works, but I can’t shake the feeling that this is an ugly workaround.
Is there any better way to do things as soon as all the columns have been created by the DataGrid?
I ended up using LayoutUpdate… sad, but there it is.