I have a UserControl that add a DependencyProperty for it .
public const string TextValuePropertyName = "TextValue";
public string TextValue
{
get
{
return (string)GetValue(TextValueProperty);
}
set
{
SetValue(TextValueProperty, value);
}
}
public static readonly DependencyProperty TextValueProperty = DependencyProperty.Register(
TextValuePropertyName,
typeof(string),
typeof(FormatUserControl),
new UIPropertyMetadata());
and use it in another Usercontrol
<local:FormatUserControl TextValue="{Binding Subject,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
When i use this don't set value for this property when i change Subject value?