Using a XAML file as a vector Image Source

后端 未结 3 1702
离开以前
离开以前 2020-12-03 03:24

I would like to be able to use vector graphics, preferably defined in XAML, as the Source of an Image control, just like I can currently use a raster image like a PNG. That

3条回答
  •  离开以前
    2020-12-03 04:03

    Embed the XAML resource (DrawingImage) with type 'Resource'. It is then not a separate file and can be directly referenced via a URI, as in your original example -- BUT the URI is non-trivial. You have to figure out Microsoft's "pack" URI syntax and use that.

提交回复
热议问题