3

So I've been looking around and I can't find a Tilebrush or similar feature in Silverlight 4. Chatter on the internet seems to indicate that there is nothing built in. I am hoping that someone is going to show me the hidden camera, or let me know that it is some kind of sick joke. Is there really no Tilebrush or similar feature?!

A.R.
  • 15,405
  • 19
  • 77
  • 123
  • Thanks for the responses folks.... just when I was starting to take Silverlight seriously..... – A.R. Oct 12 '11 at 17:45
  • Silverlight does okay. It's far from the worst sandboxed platform I've used. The wide and easy distribution makes up for this crap, IMHO. – Bryan Legend Oct 12 '11 at 17:56
  • Yeah, it is really nice for intranet stuff, but sometimes what seems like an obvious feature just goes missing. =P – A.R. Oct 12 '11 at 18:02
  • Yeah. Like double clicking. Finally coming in SL5. – Bryan Legend Oct 12 '11 at 18:03
  • @Lone: Yeah I think Silverlight should have the full .NET API, work not only on Windows and Mac but also on all flavors of Linux and still be only a small 5MB download possible less. – AnthonyWJones Oct 12 '11 at 21:25
  • The answer you accepted isn't really helpful as the shader-based approaches don't work as I would expect a tiler to work (try to tile an area with an 5x5 image I dare you). The correct answer is the one made by Xin. The TileBackground control works fine and as expected. – John Sep 22 '12 at 18:55
  • @John: It's really helpful because there is relevant to the the question, and contains links to source code and other materials as well. Xin's answer on the other hand points me to a theme I don't want and leaves it up to me to hunting for what I wanted in the first place. Meanwhile, take the code from the accepted and answer and tweak it to meet your needs if it doesn't work as expected. – A.R. Sep 25 '12 at 13:05
  • @A.R. I wouldn't know how to make them work as expected. The shader-based tilers take a number of duplications (and an offset) as an input - but that's not what you want. You have the source image and destination area dimensions. From that you could of course calculate the tiler's duplication count input but that equation won't solve as a rational number, ie. you get rounding problems. I've yet to see those tilers just do a normal tiling job as is standard for html jobs. I believe it's because it doesn't work. – John Sep 25 '12 at 13:47
  • @A.R. And the tiler in Xin's answer comes in a single, isolated file. You can take that file only, you don't have to use the theme (I don't either). – John Sep 25 '12 at 13:48
  • @John: Don't care, it's not a reasonable answer, hence no green check mark. – A.R. Sep 26 '12 at 12:31

3 Answers3

2

It's not a sick joke. There really isn't a tilebrush. From what I've heard it's not yet in the new WinRT either.

Apparently it's a bit difficult to do with the way the silverlight internals are setup.

There are third party controls that let you do a tiled background. Here's one of them: http://nokola.com/blog/post/2009/12/22/Fast-Tile-Brush-in-Silverlight-And-Easiest-Way-to-Shader-Effects.aspx

Bryan Legend
  • 6,790
  • 1
  • 59
  • 60
2

If you have this silverilght template (JetPack) installed, create a new project based on this temlate and you will see there is a TiledBackground built-in with it. Pretty handy. :)

Justin XL
  • 38,763
  • 7
  • 88
  • 133
1

No hidden camera... :(

  1. A solution using a pixelshader

  2. Discussion

Emond
  • 50,210
  • 11
  • 84
  • 115