1.创建一个最简单的TestWpf项目,什么代码都不写,如下图所示:
2.接下来我们通过逆向分析等手段,深入理解以下几句代码的含义:
1.<Window x:Class="TestWpf.MainWindow" 2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 6. xmlns:local="clr-namespace:TestWpf" 7. mc:Ignorable="d" 8. Title="MainWindow" Height="450" Width="800"> 9. <Grid> 10. </Grid> 11.</Window>
3.首先来