WPF - Remove focus when clicking outside of a textbox

前端 未结 13 2143
粉色の甜心
粉色の甜心 2020-12-02 19:11

I have some textboxes where I would like focus to behave a little differently than normal for a WPF application. Basically, I would like them to behave more like a textbox b

13条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 19:35

    I'm not 100% sure, but if you set Focusable to true on the container element (Grid, StackPanel, etc) then it should take the focus away from the text box.

提交回复
热议问题