Skip to content

How to extend behavior of Templated Control with children #18186

Answered by maxkatz6
asmirnov82 asked this question in Q&A
Discussion options

You must be logged in to vote

x:DataType is implicitly assumed from the DataGrid.ItemsSource thanks to this attribute defined on the base column class: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Controls.DataGrid/DataGridBoundColumn.cs#L28

It seems compiled doesn't respect AncestorType-delivered types and only expects exact match.
As a workaround, I would recommend explicitly setting x:DataType on these columns.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@maxkatz6
Comment options

@maxkatz6
Comment options

@asmirnov82
Comment options

Answer selected by asmirnov82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants