我愿着重谈谈具体的<代码>Text Box,并只有在用户发布一些关键(1,2,3等)时,才接受关键媒体。
Senario:
我有<代码>ListView(反映一种习俗观点)。 名单见Text Box
。
请允许我说,
Now when I press a number key, lets say Key 3
, the following action should occur:
- Focus that Specific
TextBox
- Append the
TextBox
text with the number input - Select the item in the
ListView
with the same number asTextBox.Text
has
My Xaml for what I tried
<ListView Name="lv"
Grid.Row="1"
ItemsSource="{Binding}"
View="{Binding Path=SelectedItem,
ElementName=viewComboBox}" DisplayMemberPath="Name" IsTextSearchEnabled="True" TextSearch.TextPath="{Binding Path=Person.Name}"/>
<TextBox Grid.Row="2" Text="{Binding Path=TextSearch.Text,ElementName=lv}"></TextBox>
<代码>TextBox没有显示任何情况,我不知道如何处理数字关键新闻。
I need this and its bewildering using MVVM...
在这方面,任何帮助都是巨大的。 使用守则的某些指导甚至更好...... ......