In Windows Vista and Windows 7, my column's labels are truncated when they look just fine in XP.
Here is the grid in XP. Note that the Dose, Unite and Lait(h) columns are displayed correctly.
Here is the exact same grid, on a Vista PC:
What can I do about that?
You suggest that I add some padding on the right of the LabelPresenter? I'm trying to make my columns as narrow as possible. Adding a Margin would make the colums wider. Anyway, it won't solve the problem. I added a Margin="0,0,0,10" and made the columns larger by 10 in my test app and here's the result:
XP:
Vista:
Ain't it a bug in the grid? Can you reproduce that bug? What can I do to prevent the grid from using the Aero theme?
Hello,
This could be because of the windows theme (for example Aero). What you can do is create a padding for the content of the LabelPresenter, like this :
<Style TargetType="{x:Type igDP:LabelPresenter}">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<ContentPresenter Content="{Binding}" Margin="5" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
Just to reduce the variable count, I created a simple test project. Same result:
Is it a xamDataGrid limitation?