如何使用C#来设置背景图像上的网格中的WPF [英] how to set background image on grid in wpf using C#

查看:108
本文介绍了如何使用C#来设置背景图像上的网格中的WPF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好所有
我有一个问题:我想通过代码来设置网格我的形象背后。

hello all I have a problem: I want to set the image of my grid through code behind.

谁能告诉我该怎么做呢?

Can anybody tell me how to do this?

感谢

推荐答案

难道你忘了的背景属性。刷子应该是一个的ImageBrush它的ImageSource可以设置为你的图片路径。

Did you forget the Background Property. The brush should be an ImageBrush whose ImageSource could be set to your image path.

这篇关于如何使用C#来设置背景图像上的网格中的WPF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆