-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataGrid Cell Padding not being applied #977
Comments
I am not sure if this is by design. Could you show us a picture showing the behavior? |
@jimbobsmith here is an example after #1393 <Style x:Key="CellStyleWithPadding"
TargetType="DataGridCell"
BasedOn="{StaticResource MetroDataGridCell}">
<Setter Property="Padding"
Value="10" />
</Style>
<DataGrid x:Name="DataGrid"
AutoGenerateColumns="False"
MinRowHeight="25"
RowHeight="NaN"
CellStyle="{StaticResource CellStyleWithPadding}">
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Binding="{Binding Name}"/>
<DataGridTextColumn Header="Last Name" Binding="{Binding LastName}"/>
<DataGridTextColumn Header="Age" Binding="{Binding Age}"/>
</DataGrid.Columns>
</DataGrid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. I've noticed when creating a cell style, the padding property is not being applied. If this is by design, please delete this ticket. Otherwise, to do this I simply template bound the ContentPresenter's margin to padding.
MOD EDIT: Please surround code in ```s. ~@Amrykid
The text was updated successfully, but these errors were encountered: