I have a MyTextBox class that comes from the default text field in Silverlight. This class does not currently contain additional code.
I set the binding in xaml to bind the Text-Property of MyTextbox to another text box to reflect the input made in the text box. The effect is that MyTextBox does not update or display the text of another text field.
Additionally, I made equal binding for a regular text field. And it works.
Here is the XAML for bindings.
<UserControl x:Class="Silverlight.Sample.Dummy"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:my="clr-namespace:Sample"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<StackPanel x:Name="LayoutRoot" Background="White">
<TextBox Height="23" x:Name="textBox2" Width="120" />
<TextBox Text="{Binding ElementName=textBox2, Path=Text, Mode=TwoWay}" Width="120" />
<my:NumberTextBox Width="120" Text="{Binding ElementName=textBox2, Path=Text, Mode=OneWay}" />
</StackPanel>
Is there anything special to bind when I get the control.
PS: INotifyPropertyChanged DataContext . , , .