I am trying to set the x:Name attribute to the definition of a UserControl to use it for internal bindings later on:
The XAML-MSBuild task is confusing your type ElementManager with the namespace of the same name. Give your type ElementManager another name than its surrounding namespace.
ElementManager