Reputation: 12445
Sorry in advance for the absolutely beginner question, but I'm new in WS apps.
I want to create custom image in a XAML page, in which I decide color for every pixel (I want to reproduce a fractal).
Which class should I use and how can I link it to XAML in order to see the image into the page?
Upvotes: 0
Views: 106
Reputation: 31724
You should use a WriteableBitmap
. You can check this and that as a sample.
Basically you create a new WB, get access to the pixels stream using the AsStream()
extension method on the WriteableBitmap.PixelBuffer
property, then operate on the pixels in the stream. When done you Invalidate()
the WriteableBitmap
and the Image
control you use to display it gets updated.
Upvotes: 1