Quantcast
Channel: WPF and initial focus - Stack Overflow
Viewing all articles
Browse latest Browse all 13

Answer by Simon Gillbee for WPF and initial focus

$
0
0

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

<Window><DataGrid FocusManager.FocusedElement="{Binding RelativeSource={RelativeSource Self}}">     ...</DataGrid></Window>

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


Viewing all articles
Browse latest Browse all 13

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>