如何在Expression Blend中平铺图像? [英] How to tile an image in Expression Blend?
问题描述
我已经搜索了好几个小时,却找不到任何能解释它的信息.似乎有点傻.我有一个可以平铺的图像,我想在窗口背景上平铺图像-但我不能.我选择瓷砖刷,将 ImageSource 设置为我的图片"bakcground.png",然后选择 TileMode>平铺-什么也没有.图像未平铺,仅位于中间.如果我选择 Stretch>填充,它可以正常工作,图像被拉伸以填充窗口,但这看起来很糟糕.我想自动平铺图像,无论窗口大小如何,在正常使用情况下调整窗口大小时都可以.
我是傻子,只是想念什么吗?还是真的那么复杂?
在此先感谢您的帮助.
我是Blend,WPF和一般编程人员的新手.
Hi,
I''ve been googling this for hours and hours and can''t find anything that explains it. Seems kinda silly. I have a perfectly tile-able image, which I want to tile on my window background - but I''m not able to. I choose Tile brush , set ImageSource to my image "bakcground.png", select TileMode > Tile - and nothing. The image is not tiled, it just sits there in a middle. If I choose Stretch > Fill, it works, image gets stretched, to fill the window, but that looks bad. I want to auto-tile the image, whatever the size window gets, when the window gets resized on normal use.
Am I daft and simply missing something? Or is this really that complicated?
Thanks in advance for any help.
I''m totally new to Blend, WPF and programming in general.
推荐答案
是否执行 ^ ]帮助?我用谷歌搜索"wpf背景图像图块",并将其作为第一个结果.它指向获取您想要的东西的两个不同方向.
Does any of this[^] help? I googled "wpf background image tile" and got that as the first result. It points in a couple of different directions for getting what you want.
谢谢.
我当时在Blend中工作,所以我一直在寻找混合砖,混合砖等.正如我所说,我不是程序员,只是作为一种业余爱好而学习.因此,与编写xaml相比,显然Blend的图形化方法来制作GUI非常吸引人.我想只是去告诉你. :)
对于其他人想知道的.我在XAML中设置Tile的属性.重要的是:
视口 ="0,0,25,25"
ViewportUnits =绝对"
信息在这里: TileBrush.Viewport属性 [ ^ ]
向下滚动到相对和绝对ViewportUnits".
出于好奇,如果有可能的话,我该如何在纯属性类"混合中做到这一点?
Thank You.
I was working in Blend, so I was looking for blend tile this, blend tile that, etc. As I said, I''m not a programmer, just learning as a hobby. So obviously Blend''s graphical approach to making GUIs is very appealing, compared to writing xaml. Just goes to show you, I guess. :)
For anyone else wondering. I set the properties for Tile in XAML. The important ones:
Viewport="0,0,25,25"
ViewportUnits="Absolute"
The info is here: TileBrush.Viewport Property[^]
Scroll down to "Relative and absolute ViewportUnits".
Just out of curiosity, how the hell do I do that in "pure properties-like" blend, if it''s even possible?
这篇关于如何在Expression Blend中平铺图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!