

Adding a ScaleTransform within the RenderTransform element on your image and setting the ScaleY property to minus one (-1) causes the image to flip upside down. One of the neat things you can do with XAML is to flip an image completely upside down by using a RenderTransform. Through the “magic” of XAML you can make this image a little more interesting. The buttons at the top of the page are just to navigate between the different samples in this article. Sure, it does the job, but the image looks flat and uninteresting. The sample in Figure 1 is an example of a simple, utilitarian screen.
#Silverlight image tools code#
As an example, the following code will produce the image shown in Figure 1. In addition, you may size or stretch the image to fill up the space allocated to that image. That image is displayed within that image control in the location you specified on your User Control. You simply add an Image control to a User Control or Window and set the Source property to the path where your image is located. A Simple Image Is BoringĪdding an image is very easy to do in Silverlight and WPF. In this article I will provide you with a couple of very easy XAML tips that you can use right away to spice up the images in your Silverlight and WPF applications. However, with just a few little XAML tricks, you can make your Silverlight or WPF applications look like an artist had a hand in their creation. We are great at creating functionality that makes the application do exactly what the user wants, but many applications often look very utilitarian.

Most programmers have a hard time making applications that look interesting and fun.
