Drawing Objects in Expression Blend

For this blog post I want to have another look at Expression Blend.

Expression Blend offers standard vector drawing capabilities, so that I can draw shapes, paths and masks. Just like in any vector graphics program.

A Drawing Object describes visible content, such as shape, bitmap, video or text. Different types of Drawings describe different types of content. The following types are supported in WPF (WPF = graphical subsystem for rendering user interfaces in Windows-based applications):

ImageDrawing          –         Draws an image

GlyphRunDrawing    –         Draws text

DrawingGroup          –         Draws other Drawings

(used to combine other drawings into a single composite drawing)

VideoDrawing           –         Plays an audio file or a video file

GeometryDrawing     –         Draws a shape

Its Geometry property describes the shape to draw, its Brush property describes how the

interior should be painted and its Pen property describes how its outline should be drawn.

Shape objects are UIElements and can be used inside Panel elements and most controls.

All Shape objects inherit from the Shape class. Available Shape objects include Ellipse, Line, Path, Polygon, Polyline and Rectangle. Shape objects share the common properties. Any object can have these properties defined through the Properties panel and the Appearance panel in Expression Blend.

Ok, let’s look at some properties:

Stroke: Describes how the shape’s outline is painted:

StrokeThickness: Describes the thickness of the shape’s outline:

Fill: Describes how the shape’s interior is painted:

Opacity Masks: An opacity mask can be a path or a shape that is applied to another object. The transparent portions of the path represent areas where the underlying image is hidden, and the opacity mask indicates where the masked object is allowed to show through:

Compare that to setting the opacity to 30%:

I think that Expression Blend is much easier than I initially thought it would be.

When I started this blog I didn´t know anything about programming at all. I am pretty sure though, if I would have started with Expression Blend, then I would not have learned how to write code. Because it is just so easy to draw or add behaviors in Expression Blend. I probably would have just stayed with it.

But I actually like coding. So, for me Expression Blend is just a nice addition. I am going to look into Expression Blend a little more in the upcoming blog posts, but I for myself will continue writing my apps in Visual Studio.


To be continued…

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: