I have userControl like this:
To achieve this task, one solution could be to declare a Dependency Property into your Control (which seems to be called "MyButton") code behind :
public string ButtonText
{
get { return (string )this.GetValue(ButtonTextProperty); }
set { this.SetValue(ButtonTextProperty, value); }
}
public static readonly DependencyProperty ButtonTextProperty = DependencyProperty.Register(
"ButtonText", typeof(string), typeof(MyButton),new PropertyMetadata(false));
Then you have to bind to it into your xaml code :
... // some xaml code
Finally, you are able to use your "MyButton" Control :