How can I access x:Name from Code Behind?

Posted by viky on Stack Overflow See other posts from Stack Overflow or by viky
Published on 2009-11-18T13:42:36Z Indexed on 2010/03/19 22:11 UTC
Read the original article Hit count: 276

Filed under:
|
|

I have a datagrid in which I am using DataGridTemplateColumn and DataGridTextColumn. I want to access these columns at runtime so I have assigned x:Name property to them. But I was not getting that value in code behind, so I looked for DataGrid and then read objects by iterating through DataGrid.Columns. How can I read x:Name property from that object in C#?

I need this to perform some specific operations with particular columns at runtime.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about name