问题描述
全部,
我正在研究mvvm应用程序。我很高兴能与mvvm应用程序一起工作。
可以告诉你如何在加载usercontrol时将焦点设置在文本框上。
提前感谢
我尝试过什么:
< grid x:name =LayoutRootxmlns:x =#unknown>
FocusManager .FocusedElement ={Binding
ElementName = myInitialFocusedTextBox}>
...
< textbox name =myInitialFocusedTextBox>
...
hell all,
i am working on mvvm applicaion. and i am totally new to work with mvvm application.
can any one tell how to set focus on textbox when usercontrol in loaded.
thanks in advance
What I have tried:
<grid x:name="LayoutRoot" xmlns:x="#unknown">
FocusManager.FocusedElement="{Binding
ElementName=myInitialFocusedTextBox}">
...
<textbox name="myInitialFocusedTextBox">
...
这篇关于如何在MVVM应用程序的usercontrol中的文本框上设置默认焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!