How do I convert an Illustrator file to a path for WPF

前端 未结 4 1157
情话喂你
情话喂你 2021-01-02 02:59

Our graphics person uses Adobe Illustrator and we\'d like to use her images inside our WPF application as paths. Is there a way to do this?

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-02 03:41

    You can go from AI to SVG to XAML.

    1. From Adobe Illustrator: File -> Save As -> *.SVG.

      • SVG "Profile 1.1" seems to be sufficient.

      • Note that to preserve path/group names in XAML you should enable "Preserve Illustrator Editing Capabilities" (or at least as it's called in CS4).

    2. SharpVectors can convert SVG data to XAML data. This will produce a fragment of XAML with root .

    3. Do what you need to do to copy-paste and otherwise use the XAML, such as placing it into an Image like below. Named objects or groups in the AI file should still have their names in the XAML i.e. via x:Name="...".

    
      
        
          
            ...
          
        
      
    
    
    1. Coordinate systems can be a pain if you want to be animating things. There are some other posts such as this which may have insights.

提交回复
热议问题