is it possible in wpf to access the header of a gridviewcolumn as gridviewcolumnheader?
I have an object:
GridViewColumn column;
But the "Header" property just returns a string (header text) not the "real" header object.
Can anyone help my?
I am myself very inexperianced with WPF... however it appears that that if you you do not define a GridViewColumnHeader, then you will not be given one when accessing .Header.
That is to say, if you define your GridViewColumn as:
<GridViewColumn x:Name="stringColumn">
stringColumn.Header will return a string
</GridViewColumn>
Then calling stringColumn.Header will return a string... however if you define it as say:
<GridViewColumn x:Name="gridViewColumnHeaderColumn1">
<GridViewColumnHeader>
gridViewColumnHeaderColumn.Header will return a GridViewColumnHeaderColumn
</GridViewColumnHeader>
</GridViewColumn>
Then checking gridViewColumnHeaderColumn.Header will return a GridViewColumnHeaderColumn
I've summarized different ways to find GridViewColumnHeader from GridViewColumn here: http://apaers.com/wpf-listview-access-gridviewcolumnheader-from-gridviewcolumn/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With