WPF and initial focus

后端 未结 12 2181
鱼传尺愫
鱼传尺愫 2020-11-29 15:59

It seems that when a WPF application starts, nothing has focus.

This is really weird. Every other framework I\'ve used does just what you\'d expect: puts initial foc

12条回答
  •  隐瞒了意图╮
    2020-11-29 16:25

    You can easily have the control set itself as the focused element in XAML.

    
       
         ...
       
    
    

    I've never tried setting this in a usercontrol and seeing if this works, but it may.

提交回复
热议问题