WPF Editable Combobox IsFocused问题 [英] WPF Editable Combobox IsFocused problem
问题描述
我正在通过修改 ComboBox
ControlTemplate $ c>开发水印
ComboBox
$ c>。一切都很好当 ComboBox
不是在可编辑模式,但当我将编辑模式更改为True时, IsFocused
属性永远不会设置为True。这是因为在编辑模式下, ComboBox
正在使用 TextBox
。这是此 StackOverflow的精确副本问题:。没有对这个问题的答复。
I am developing a Watermarked ComboBox
by modifying the ComboBox
ControlTemplate
. Everything is fine when the ComboBox
is not in an editable mode, but when I change the edit mode to True, the IsFocused
property is never set to True. This is because in edit mode, the ComboBox
is using a TextBox
. This is an exact copy of this StackOverflow question: . There are no responses to that question.
如果您知道如何解决这个问题,请放置一行,或者请指向提供水印 ComboBox
实现。
谢谢,
Rey。
Please drop a line if you know how to solve this, or please point me to links that provide a Watermark ComboBox
implementation.
Thanks,
Rey.
推荐答案
您可以尝试使用 IsKeyboardFocused
或 IsKeyboardFocusWithin
You could try to use the IsKeyboardFocused
or IsKeyboardFocusWithin
instead
这篇关于WPF Editable Combobox IsFocused问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!