Quantcast
Channel: WriteableBitmapEx
Viewing all articles
Browse latest Browse all 360

New Post: Invalidate not present in WPF

$
0
0
You would need to dispose the context. In WPF the bitmap is invalidated when its unlocked. In WBX the this is done in the dispose call. Use it like this:
        wbmp = BitmapFactory.New(300, 300);
        IMG1.Source = wbmp;
        using(BitmapContext bmpc = wbmp.GetBitmapContext())
        {
            // Clear the WriteableBitmap with white color
            wbmp.Clear(Colors.Red);

            wbmp.DrawLine(0, 0, 1000, 1000, Colors.Black);
        }

Viewing all articles
Browse latest Browse all 360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>