954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

WPF/C# Binding

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

CrazyProgrammer
Light Poster
29 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

Never mind Worked it out

CrazyProgrammer
Light Poster
29 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: