【发布时间】:2020-05-17 05:06:59
【问题描述】:
是否可以在 WPF 应用程序中以某种方式向文本框添加自动完成建议? 就像我将建议绑定到数据表或字符串列表一样?这可以通过文本框实现吗?
<TextBox Text="{Binding InputText, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
VerticalContentAlignment="Center" >
<TextBox.InputBindings>
<KeyBinding Command="{Binding EnterKeyPressedCommand}" Key="Return" />
</TextBox.InputBindings>
</TextBox>
【问题讨论】:
-
Is it possible to add somehow autocomplete suggestions to textbox in a WPF application是。你能告诉我们你尝试了什么吗,上面的代码不能保证你在问什么。 -
我什么都没试过,只是做了一些研究,但我没有找到任何关于简单文本框的内容
-
i tried nothing yet,请在发帖前做。我们帮助解决特定问题的用户已经尝试过。现在的问题似乎是寻求更多的“为我编码”。 -
我尝试使用带有自动完成框的外部库,但不想为此购买许可证
-
你真的找到了nothing free? Nothing? Nothing at all?
标签: c# wpf xaml mvvm autocomplete