TemplateBinding not working for textbox text
I have a custom control called EnhancedTextBox which is a UserControl that has a TextBox and a Button . To the consumer I want it to mostly look like a TextBox, so I did the following: <UserControl.Template> <ControlTemplate TargetType="textBoxes:EnhancedTextBox"> ... <TextBox Text="{TemplateBinding Text}"... And in EnhancedTextBox I have public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof (String), typeof (EnhancedTextBox)); public String Text { get { return (String) GetValue(TextProperty); } set { SetValue(TextProperty, value); } } Yet, when I