Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已将图像上传到 Visual Studio 解决方案中的图像文件夹。
如何使用 VB.net 代码隐藏而不是 XAML 将文本框的背景设置为此图像?
谢谢。
用这个 :
textbox.Background = New ImageBrush(New BitmapImage(New Uri("ImagePath", UriKind.Relative)))
替换ImagePath为图片的路径。
ImagePath