//xaml <Window x:Class="WpfApp1.MainWindow" 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/markup-compatibility/2006" xmlns:local="clr-namespace:WpfApp1" mc:Ignorable="d" WindowState="Maximized" Title="MainWindow" Height="450" Width="800"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition/> </Grid.RowDefinitions> <Button HorizontalAlignment="Center" Margin="4" Padding="6"> <StackPanel Orientation="Horizontal"> <Image Source="/LibraryResource;component/Images/324.jpg" Width="1000" Height="500"/> <TextBlock VerticalAlignment="Center" FontSize="20" Text="Click me!" Margin="10,0,0,0"/> </StackPanel> </Button> </Grid> </Window>
Add reference,choose project
标签:reference,xaml,project,Add,choose,WPF From: https://www.cnblogs.com/Fred1987/p/18278895