完整代码:
<Window x:Class="WpfDemo.WindowIconAndBackground.WindowIconAndBackgroundDemo" 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:WpfDemo.WindowIconAndBackground" mc:Ignorable="d" Icon="Images/icon.jpg" Title="WindowIconAndBackgroundDemo" Height="350" Width="600"> <Window.Background> <ImageBrush ImageSource="Images/background.jpg"></ImageBrush> </Window.Background> <Grid> </Grid> </Window>https://github.com/zLulus/NotePractice/tree/dev3/WPF/WpfDemo/WindowIconAndBackground
转载于:https://www.cnblogs.com/Lulus/p/8158376.html