O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tile Brushes

The remaining brushes are tile brushes, because they derive from a TileBrush base class. In WPF, you can specify the brush’s content as infinitely repeating tiles and configure the tiling pattern in a number of different ways. In the other XAML-based UI Frameworks, however, none of these options exist. Instead, the way to think about a tile brush is a brush that contains bitmap-based content.

ImageBrush

ImageBrush enables you to use the contents of an image file. This is demonstrated with the following XAML:

<Ellipse Width="400" Height="100">  <Ellipse.Fill>    <ImageBrush ImageSource="Assets/flower.jpg"/>   </Ellipse.Fill></Ellipse>

The flower.jpg image file is shown in Figure 7.24, and the rendered ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required