I am calling a method using delegate to show a color window but that window not getting focus,It is working fine with mouse but for touch it requires one extra click to get focus.
ColorPickerWindow colorPicker = new ColorPickerWindow ();
colorPicker.Owner = this;
colorPicker.ShowInTaskbar = false;
colorPicker.SetColor(MenuColor);
colorPicker.ShowDialog();
Just call Element.Focus() on the element you want to focus.
If you mean bring focus to the window try calling window.Activate()
Source : WPF Window set Focus
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With