WPF应用程序顶级标签一定是Window吗?
原文: WPF应用程序顶级标签一定是Window吗? WPF应用程序顶级标签一定是Window吗?很多人误以为是。可是,答案却是否定的。我们不妨来测试一下。 首先使用顶级标签为Window,这是最普通、也是最常见的情况。新建一个WPF应用程序,名称为Window1,利用工具箱在窗口中拖入一个按钮(Button)。我们发现Window1中将得到类似如下内容:// Window1.xaml<Window x:Class="LogicalOverrideApp.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> <Button Height="23" Margin="96,33,107,0" Name="button1" VerticalAlignment="T...