UWP ListView SelectionChanged on a TextBox

Paul Ryan 331 Reputation points
2023-01-05T10:03:20.757+00:00

in Listview I have a data template where I have textboxes
Is there way to have SelectionChanged trigger on a textbox

thanks

<TextBlock Grid.Column="0"
Text="{x:Bind Path=TimeOfAppointment}"
Margin="24,12,0,0" />
<TextBox Grid.Column="1" Tag="0"
Margin="12,12,0,0"
Text="{x:Bind Path=Rooms[0].PatientName,Mode=TwoWay}"
Visibility="{x:Bind Path=Rooms[0].Vis, Mode=OneWay}"
MinWidth="150" />
<TextBox Grid.Column="2"
Text="{x:Bind Path=Rooms[1].PatientName,Mode=TwoWay}"
Visibility="{x:Bind Path=Rooms[1].Vis, Mode=OneWay}"
Margin="12,12,0,0" MinWidth="150" />
<TextBox Grid.Column="3"
Text="{x:Bind Path=Rooms[2].PatientName,Mode=TwoWay}"
Visibility="{x:Bind Path=Rooms[2].Vis, Mode=OneWay}"
Margin="12,12,0,0" MinWidth="150" />
<TextBox Grid.Column="4"
Text="{x:Bind Path=Rooms[3].PatientName,Mode=TwoWay}"
Visibility="{x:Bind Path=Rooms[3].Vis, Mode=OneWay}"
Margin="12,12,0,0" MinWidth="150" />

<ListView
ItemsSource="{x:Bind Path=aTimes }"
SelectionChanged="SelectionChanged"
ItemTemplate="{StaticResource DataTemplate_TimeLine}"
SelectionMode="Single"
Background="{StaticResource MonthDayBackground}" />

Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.