Topic Author
Posts: 66
Joined: 16 Jan 2015, 17:46

Creating ImageSource at runtime

25 Apr 2016, 16:39

Hi everyone,

I'd like to have an ImageSource as a member of a data model and I'd like to create that ImageSource as I create my data model. I've had a look at the BitmapSource API and it requires an Drawing::Image, but I can't find that class in the headers, so I guess I cannot use it.

I've found a way to do it in regular WPF (, is there an equivalent in the C++ API?

Many thanks,
User avatar
Site Admin
Posts: 3058
Joined: 20 Jan 2012, 17:18

Re: Creating ImageSource at runtime

27 Apr 2016, 11:13

As explained in the Image Tutorial, you must use a TextureSource for runtime images. You can construct it using a path, as shown in the DataBinding C++ sample or using a native texture handle. In that case, you are in charge of loading the texture.

BitmapSource is deprecated. It will be removed in 1.2.6.

Who is online

Users browsing this forum: No registered users and 2 guests