My question is a simple one how do I bind a passwordBox defined in code ie:

public PasswordBox Password
            get { return m_pwd; }

to a contentpresenter in wpf
considering that the datacontext of the usercontrol is already set to the .cs file that contains the PasswordBox.
Any Ideas? I've done what i thought would work but that didnt work which was setting something like:

<contentpresenter content="{Binding Path=Password}" />

Or if no in the content presenter then where?
Thanks All.
~A programmer slowly Getting Annoyed at MVVM

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.