我必须使用文本框制作列表框......它必须是动态的.我在后面的代码中有可观察的集合,我想为listbox绑定它.我想要动态列表框,这个列表中应该有可编辑的文本框.所以,基本上我想从列表框中绑定multiplr文本框.任何帮助,将不胜感激
<ListBox HorizontalAlignment="Left" Name="ListTwo" Height="100" Margin="286.769,165.499,0,0" VerticalAlignment="Top" Width="100" ItemsSource="{Binding Source=obs}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBox Name="TextBoxList"></TextBox>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Run Code Online (Sandbox Code Playgroud)
通过这样做,我有一些文本框与可观察集合中的项目相同,但文本框的文本未设置.