我有一个列表框,我在其中显示 Headers 列表 . 用户单击该行以选择填充更多文本框的项目 .
但是,我在列表框的每一行中使用的文本框都不可单击 - 光标将更改为文本选择光标 .
还有其他我应该使用的东西吗?
<ListBox ItemsSource="{DynamicResource products}" Width="319" x:Name="productsListBox" Height="300">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBox Text="{Binding Title}" BorderThickness="0" IsReadOnly="True"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
1 回答
readonly模板中的TextBox可以替换为TextBlock