Bind xaml vector images dynamically
Posted
by Carl
on Stack Overflow
See other posts from Stack Overflow
or by Carl
Published on 2010-05-10T02:15:31Z
Indexed on
2010/05/10
2:18 UTC
Read the original article
Hit count: 297
I'm looking for a way to bind xaml images dynamically in code.
There are lots of examples online to show how to bind png or xaml images in the window's xaml, or to load png files in code.
But I have found no examples for xaml files with build action=page. XmlReader can't handle them since they are compiled to baml.
LoadComponent(new Uri("...filename.xaml") will apparently load the baml but what kind of image class do I load this into? BitmapImage(new Uri("...filename.xaml") does not seem to work, probably because it's not a bitmap.
Thanks in advance.
© Stack Overflow or respective owner