Click here to Skip to main content
15,906,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi ,as a test I am adding as background of a Grid column a DrawingBrush element which using PElipseGeometry draws something similar a strech ellipse.Here is the code:

<!--Ship shape as a background-->
  <DrawingBrush x:Key="ShipShapeBackgroundBrush" >
        <GeometryDrawing Brush="#D8D8D8">
            <RectangleGeometry Rect="0,0,50,85" />
          <EllipseGeometry Center="25,50" RadiusX="22" RadiusY="50" />

I would like to draw a figure that looks as a very simple ship map. I want to do it like in the previous code but using this time a Path Geometry to draw a figure more in detail. I checked documentation like this[^]:
but what I don't know is how to draw my figure and tranlsate to path language (F0 M10,100 L100,100 100,50Z).

I saw examples already done where they draw nice plane shape with path geometry. How can I do it?
Tomas Takac 28-Oct-14 14:07pm    
here[^] the path geometry is explained. And here[^] is a short explanation how it is translated to mini-language.

1 solution

Make you map using Adobe Illustrator or Photoshop. Then import the file into Blend. When it is imported you will see all the Path Objects with data. Copy these into you XAML file and use them.

I do this when adding glyphs to my buttons.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900