|
|
|
There is
support for bitmap images in both element and brush form. The Image and
MediaElement types allow images and video clips to be integrated as features
in your UI. These are FrameworkElements like any other – they participate in
layout, data binding, event handling, transformations, and all the other
things you would expect any other UI element to do.
|
|
|
|
You can
also incorporate both images and video into brushes, which can then be used
to paint other items. This lets you use bitmaps or video to paint any shape
you like. You can even paint 3D surfaces!
|
|
|
|
With
video, you need to use a VisualBrush in order to paint shapes with a video.
Images can also use VisualBrush, but there is a special ImageBrush type,
which has lower overhead than the VisualBrush.
|
|
|
|
There is
a considerable amount of support for working with images from code. This is a
pretty large topic on its own, so we don’t have time to look at it here. The
System.Windows.Media.Imaging namespace is the place to look.
|