We are going to make some changes to the application. This time, we will show eight ghosts. We will configure some additional parameters to allow hardware acceleration for some operations and we will scale, rotate, and translate them. At the same time, we will be changing their opacity settings:
1. Stay in the
SilverlightMonster
project.2. Open the XAML code for
Ghost.xaml
. Remove only the following two lines that define aGrid
namedLayoutRoot
as we want the illustration to be a part of aCanvas
instead of aGrid
:<Grid x:Name="LayoutRoot"> </Grid>
3. Change the name of the main
Canvas
from"Layer_3"
to"LayoutRoot"
(the default value for the root element).4. Add the following lines after the first line that begins with the definition of the main
Canvas
. (We are assigning theBitmapCache
value to theCacheMode
property of theCanvas
that contains the ghost's paths.)<Canvas.CacheMode> <BitmapCache/> </Canvas.CacheMode...