WPF tutorial for creating a custom usercontrol
user-controls, visual-studio-2008, wpf
Solution
This looks like a good article that might help.
http://www.c-sharpcorner.com/uploadfile/mahesh/user-control-in-wpf/
In fact, it looks like he's doing exactly what you're trying to do. As for accessing the TextBox contents from outside the user control, create a public property as shown in the article.
public string FileName
{
get { return FBCTextBox.Text; }
set { FBCTextBox.Text = value; }
}
Problem
I'm looking for a tutorial that explains creating custom usercontrols in WPF. I want to have one control that combines a textblock, a textbox, and a button that launches a common fileopen dialog. I have the layout done and everything wired up. It's works but it's three independent controls. Hopefully there is a tutorial out there that explains how to turn this into one usercontrol and wire up everything so I can expose certain properties of the control, like the text in the textbox, to the rest of my WPF app.