We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
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
I tried to center header a checkbox custom but it can't same align with cell value
Example :
<DataGrid.Columns> <!-- <DataGridCheckBoxColumn Binding="{Binding IsSelected}" Header="Check" /> --> <DataGridTemplateColumn> <DataGridTemplateColumn.Header> <CheckBox HorizontalAlignment="Center" HorizontalContentAlignment="Center"> <i:Interaction.Behaviors> <EventTriggerBehavior EventName="Click"> <InvokeCommandAction Command="{Binding CheckAllCommand}" /> </EventTriggerBehavior> </i:Interaction.Behaviors> </CheckBox> </DataGridTemplateColumn.Header> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <CheckBox HorizontalAlignment="Center" Click="CheckList_click" IsChecked="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> </DataGrid.Columns>
I hope align will be same
11.2.3
macOS
No response
The text was updated successfully, but these errors were encountered:
Use DevTools F12.to check is CheckBox has a MinWidth or Margin set
Sorry, something went wrong.
Hi @timunie , MinWidth = 0 and Margin is 0,0,0,0, any help ?
Ah wait the header has a reserved space for SortIcon. You need to override this. Looking up the Theme for DataGridColumnHeader should help you.
No branches or pull requests
Describe the bug
I tried to center header a checkbox custom but it can't same align with cell value
![image](https://private-user-images.githubusercontent.com/31106432/399722524-d56f3491-96e2-448a-ae33-9628289d9fc5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTA1ODcsIm5iZiI6MTczODkxMDI4NywicGF0aCI6Ii8zMTEwNjQzMi8zOTk3MjI1MjQtZDU2ZjM0OTEtOTZlMi00NDhhLWFlMzMtOTYyODI4OWQ5ZmM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDA2MzgwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhY2Q3YzIyZTE5MmYwMTRhMGNkNjZmY2Q5ZjdjNjM4MjA0YWEyOTU0YTcyM2MzM2JjZmQwMDUyZjQwMzhlMmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.jywQOtrSOs0oIkaDiTqWdcuQkGTwmP8AckIIy6SEvvM)
To Reproduce
Example :
Expected behavior
I hope align will be same
Avalonia version
11.2.3
OS
macOS
Additional context
No response
The text was updated successfully, but these errors were encountered: