如何给图像作为边界? [英] How give an image as a border ?
本文介绍了如何给图像作为边界?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请任何人告诉我如何将图像作为边框控制的背景或
是否可以在WPF(C#)中将图像作为边框进行图像控制.
在Advance中感谢
Hi,
Please anyone tell me how to give the image as background for border control OR
Is it possible to give image as border for image control in WPF(C#).
Thanks in Advance
推荐答案
以下代码是更改WPF按钮的背景
the following code is to change the background for WPF button
<button content="Button" height="23" horizontalalignment="Left" margin="400,111,0,0" name="button1" verticalalignment="Top" width="75">
<Button.Background>
<imagebrush imagesource="/your Project;component/Images/BackGround.PNG" />
</Button.Background>
</Button></button>
希望这会有所帮助
Hope this will help
<Border BorderThickness="5">
<Border.BorderBrush>
<ImageBrush ImageSource="/WCF_TEST;component/Images/Tulips.jpg"/>
</Border.BorderBrush>
<Image x:Name="ImageControl" Source="/WCF_TEST;component/Images/Hydrangeas.jpg"/>
</Border>
这篇关于如何给图像作为边界?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文