Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# wpf无边界窗口焦点未触发_C#_Wpf - Fatal编程技术网

C# wpf无边界窗口焦点未触发

C# wpf无边界窗口焦点未触发,c#,wpf,C#,Wpf,我有下面的WPF窗口定义,但是当我离开应用程序单击时,焦点/失去焦点事件不会触发,有什么想法吗 <Window x:Class="BevaClient.windowMain" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:l="clr-namespace:Bev

我有下面的WPF窗口定义,但是当我离开应用程序单击时,焦点/失去焦点事件不会触发,有什么想法吗

<Window x:Class="BevaClient.windowMain"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:l="clr-namespace:BevaClient"
    xmlns:forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
    Title="VPN Tool" Height="500" Width="370"
    Focusable="True"
    WindowStyle="None"
    ResizeMode="NoResize"
    Topmost="True"
    Style="{StaticResource defaultWindow}"
    Loaded="Window_Loaded"
    GotFocus="Window_GotFocus"
    LostFocus="Window_LostFocus">

我曾尝试将topmost设置为false,以查看这是否是问题所在,但没有任何区别

如能就此问题提供任何建议,将不胜感激

谢谢


David

钩住
激活的
停用的
事件。

钩住
激活的
停用的
事件