WPF 窗体关闭事件触发不了, 始终进不了处理函数private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/up-compatibility/2006" mc:Ignorable="d"
x:Class="netradio.Window1"
x:Name="Window"
Title="netradio"
xmlns:local="clr-namespace:netradio"
AllowsTransparency="false" WindowStyle="None"
Foreground="{x:Null}" Background="#FF626060"
Width="400" Height="613" AllowDrop="True" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna" Loaded="Window_Loaded" Closing="Window_Closing" BorderThickness="2" WindowState="Normal"> private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if (!windowQuit)
e.Cancel = true;
}
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/up-compatibility/2006" mc:Ignorable="d"
x:Class="netradio.Window1"
x:Name="Window"
Title="netradio"
xmlns:local="clr-namespace:netradio"
AllowsTransparency="false" WindowStyle="None"
Foreground="{x:Null}" Background="#FF626060"
Width="400" Height="613" AllowDrop="True" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna" Loaded="Window_Loaded" Closing="Window_Closing" BorderThickness="2" WindowState="Normal"> private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if (!windowQuit)
e.Cancel = true;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货