简体   繁体   English

为wp8添加透明图像的背景色

[英]Adding background color for transparent images for wp8

I have a transparent images with a shape in the middle, in which i want the transparent areas to be black(or other). 我有一个中间形状的透明图像,其中我希望透明区域为黑色(或其他)。 Is there any way to do this dynamically? 有没有办法动态地做到这一点? It will be very helpful if any samples available. 如果有任何样品,这将非常有帮助。 Thanks in advance. 提前致谢。

You can nest the image in a content control and set its background. 您可以将图像嵌套在内容控件中并设置其背景。 For instance: 例如:

<Grid Background="Black"> 
    <Image .../>
</Grid>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM