4
votes

Does anyone know what the background colour is for the jetpack theme??

http://www.silverlight.net/content/samples/sl4/themes/jetpack.html

We're using the theme, but I can't see that light silver background colour which has a gradient through it.

2

2 Answers

4
votes

Actually if you create a new project based on the JetPack theme, you will see there is a user control called TiledBackground which does the repeating effect for you.

However, the dependency property ResourceUri of this user control is binding to a wrong image file by default, I believe, and that's why you only see a light colored background.

To have the same background as in the demo, you simply need to replace the image backgroundtexture.png in the Images folder with the image file that Joe has provided. Then in the MainPage.xaml, you need to make sure the SourceUri is binding to this image.

For example, I have replaced with Joe's image and still named it backgroundtexture.png, and my project name is JetPack.

<controls:TiledBackground SourceUri="/JetPack;component/Images/backgroundtexture.png" />

Then you should see the dark background as expected. :)

3
votes

It's actually an image that is repeated. To get the same effect you'll have to write a custom control or effect that tiles the image. Here's the image.

alt text

And here's a sample of tiling an image.

http://nokola.com/blog/post/2009/12/22/Fast-Tile-Brush-in-Silverlight-And-Easiest-Way-to-Shader-Effects.aspx