Fix: XAML – The member Content is not recognized or is not accessible
I was looking into some third-party code, upgrading it from Silverlight 4.x and was getting error ‘The member "Content" is not recognized or is not accessible’ at the following code part:
Looking it up, found that you don’t need to bind the Content property of a ContentPresenter at all if you put it inside the ControlTemplate of a ContentControl (a Button is such too).
Quoting from:
When you put a ContentPresenter in the ControlTemplate of a ContentControl, it automatically displays the Content of the templated control. For example, if you put a ContentPresenter in a ControlTemplate of a Button, the Content property of the ContentPresenter is implicitly bound to the Content of the Button that uses the ControlTemplate.
It is introduced in this MSDN article and have a sample in it, http://msdn.microsoft.com/en-us/library/system.windows.controls.contentpresenter.content(v=vs.95).aspx