Uses the supplied image to draw an area based upon the mode set.
The various ways in which the picture can be used as a brush.
The default mode is Pad.
Draws the picture in the upper-left corner then extends the pixels at the right and bottom sides to the right and bottom sides of the graphics area. Not supported for MacOS or iOS.
Repeats the picture over and over in rows and columns.
Like Tile, except that each image is a horizontal mirror of the previous and alternating rows are vertical mirror of the previous rows. Not supported for MacOS or iOS.
Image As Picture
The Picture to be used as a brush.
Mode As Modes
The mode to be used when drawing the Image in the drawing.
Not all modes are supported on all platforms. See the Modes enumeration for details.
Setting this property to a mode that is not supported on the OS upon which the app is running will result in an UnsupportedFormatException occurring.
Var pb As New PictureBrush
pb.Image = Moon
pb.Mode = PictureBrush.Modes.Tile
Creates a PictureBrush from the parameters passed.
Not all draw modes are supported on all platforms. See the Modes property for details.
This example draws a picture (a project item named "Moon") into a rectangle the size of the a Canvas using the Tile mode:
Var pbrush As New PictureBrush
pbrush.Image = Moon
pbrush.Mode = PictureBrush.Modes.Tile
g.Brush = pbrush
g.FillRectangle(0, 0, g.Width, g.Height)
All project types on all supported operating systems.