So I've got some code:
var columnHeader = (e.OriginalSource as GridViewColumnHeader);
var temp = columnHeader.Template.FindName("Up");
When I click my GridViewColumnHeader I run this code. But the line columnHeader.Template.FindName("Up")
is raising the error:
No overload for method 'FindName' takes 1 arguments
But what makes this different from any other question is the Microsoft documentation for FrameworkElement.FindName clearly shows a method that takes one argument:
public Object FindName( string name )
Parameters name Type: System.String
The name of the requested element.
Return Value Type: System.Object
The requested element. This can be null if no matching element was found.
So why does my compiler raise this error?
GridViewColumnHeader.Template
is aControlTemplate
, which inherits fromFrameworkTemplate
, notFrameworkElement
:From MSDN: