Search code examples
silverlight-4.0pathexpression-blend

Creating compound path from multiple paths in Silverlight


I have following piece of markup :


                
                 


There is a need to create one compound path that looks exactly the same. In general, i would use Create Compound Path on group of paths, but what to do with filled circle? Any workarounds maybe? Adding Fill property doesn't help.
Also, it would be nice to have an instrument to do such operation programmatically in Silverlight.


Solution

  • There's a way to do this using Expression Design. If you have it, do the following:

    1. Create a new empty document
    2. Paste the paths into the empty canvas
    3. Then select all (you can use the mouse to select everything or hit CTRL-A)
    4. Then right-click on your selected paths
    5. Click "Make Compound Path", the will merge everything into one layer
    6. Hit CTRL-E to export Silverlight/WPF XAML

    The generated file will have a single Path element with the exact shape you're asking for.

    At the moment, there's no way to do it programmatically or by using Blend. It must be done in Expression Design.