首页 > 其他 > 详细

窗口图标与背景

时间:2017-12-31 20:51:55      阅读:218      评论:0      收藏:0      [点我收藏+]

 

技术分享图片
 

图标Icon

Icon="Images/icon.jpg"

背景图Background

<Window.Background>
    <ImageBrush ImageSource="Images/background.jpg"></ImageBrush>
</Window.Background>

完整代码:

<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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!