I’m using the combobox and binding through List values as like below
<ComboBox ItemsSource="{Binding}" Name="testCombo" Margin="67,48,184,204">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBox Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType=ComboBox},Mode=OneWay,Path=SelectedItem}" Width="100" Height="50" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
binding data like below in c#
IList<string> objLoadData = new List<String> { "Ramesh", "Suresh" };
testCombo.DataContext = objLoadData;
I tried to bind the data into textbox, but I couldn’t. How do bind datas to textbox?
Try this;
Inside constuctor
In XAML