Click here to Skip to main content
15,890,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.
Posted

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.
 
Share this answer
 
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?
 
Share this answer
 
v2
Comments
André Kraak 27-Sep-11 15:01pm    
If you have a question about or comment on the given solution use the "Have a Question or Comment?" option beneath the solution. When using this option the person who gave the solution gets an e-mail message and knows you placed a comment and can respond if he/she wants.

Please move the content of this solution to the solution you are commenting on and remove the solution. Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900