I believe I have found a bug in the way the DataGrid from the WPF Toolkit handles resizing when using RowDetailTemplates.
More specifically, I use a RowDetailTemplate that contains content aligned to the right (originally, it was a textbox that was supposed to fill all the space, but for the purpose of reporting this issue, it is simpler to demonstrate with a right-aligned
When the width of the datagrid is increased (window is made wider), the width of the RowDetail-area is also increased, which is fine.
If, then, the width is decreased again, the RowDetail area stays wide, which means right-aligned contents disappears.
Here is a minimal demonstrator:
Title="Window1" Height="300" Width="300">
<toolkit:DataGrid AutoGenerateColumns="False" SelectionUnit="FullRow"
<toolkit:DataGridTextColumn Header="Sample column - click empty row" Width="*"></toolkit:DataGridTextColumn>
<TextBlock Grid.Column="1">move right window border further right and then left again - behold, this text disappears!</TextBlock>
Code-behind is not necessary for this example. To make the problem appear, make the window first wider and then narrow again.
Is this a known problem? It poses a severe problem in a project I am working on, so any hints or suggestions regarding possible workarounds will be more than welcome.
Jun 26, 2009 at 11:45 AM
Edited Jun 26, 2009 at 11:47 AM
The problem still exists in the June 2009 version of the WPF Toolkit. I created issue