KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a ListBox showing items using the following DataTemplate: <DataTemplate x:Key="PersonTemplate" DataType="{x:Type DAL:ResultItem}" > <StackPanel Width="280" > <TextBox BorderThickness="0" IsReadOnly="True" Background="Transparent" Text="{Binding FullName1, Mode=OneWay}"/> ... </StackPanel> </DataTemplate> I am using a transparent, read-only, borderless TextBox as opposed to a TextBlock because I want users to be able to select the text for copying. Should I do it differently? How can I write this so that when the user clicks on the TextBox, the ListBoxItem gets selected as well? Thanks!
Tags (comma-separated)
Save Edits
Cancel