Like another question , I would like to access the x: Name property of an object through code, hard in this case the object in question is not a FrameworkElement and therefore does not have a Name property. I also do not have access to the member variable.
In my situation, I have a ListView with named columns and would like to extend the ListView class so that it retains the layout of the column. For this function, I need named columns, and for me it would be advisable to reuse the x: Name property, which I need to set for other reasons, instead of adding the attached ColumnName property, for example.
My current "solution":
<GridViewColumn Header="X" localControls:ExtendedListView.ColumnName="iconColumn" />
Desired:
<GridViewColumn Header="X" x:Name="iconColumn" />
So is it possible to somehow get the value of "x: Name"?
floele
source share