I have a ListView and I want to access TextBox's item name in a method to change its visibility on mouse click event. How can I do it? Because it is not accessible.
<ListView Name="currentTasks">
<ListView.ItemTemplate>
<DataTemplate>
<WrapPanel>
<TextBlock Text="{Binding Name}"/>
<TextBox Name="taskTextBox" Visibility="hidden"/>
</WrapPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
SOLUTION
Alright, I found out the solution. If you have similar problem then here is the link with the answer that helped me: https://stackoverflow.com/a/92765/17195987