-2
    let image = WriteableBitmap(100, 100, 300.0, 300.0, Media.PixelFormats.Bgra32, null);
            let pixel = image.Pixels

Error 2 The field, constructor or member 'Pixels' is not defined

WriteableBitmap.Pixels Property MSDN

Why not defined?

Is this a framework issue? or ... scope? or ?

Thanks

Art Scott
  • 193
  • 1
  • 2
  • 8

1 Answers1

2

Pixels is a property of the System.Windows.Media.Imaging.WriteableBitmap class for Silverlight, that is different than the System.Windows.Media.Imaging.WriteableBitmap class of the standard framework.

You should reference the Silverlight version of the framework to use the first class - and have the Pixels property - but then you will be writing a Silverlight application, not a standard Windows one.

To access the pixel values using the standard framework you can use the CopyPixels methods

MiMo
  • 11,793
  • 1
  • 33
  • 48
  • Thanks. Playing with circa 2009-ish fsharp Silverlight raytracer samples. Not sure what current fsharp SL status/situation is. – Art Scott Apr 18 '13 at 22:19