Main Site Documentation

SimpleGraphics and WPFWindow together...possible?


#1

In one of my projects, I was writing out status messages to the T35 using display.SimpleGraphics and I needed to add a couple of buttons, and since I don’t see any way of handling touch in SimpleGraphics, and I didn’t feel like taking the time to put together a UI in Glide, I tried adding a button using an image and WPFWindow’s Canvas, borrowing some code from the FlipbookMaker project.

Unfortunately, it looks like both SimpleGraphics and WPFWindow want to own the entire UI.

Can anyone confirm if that’s the case?

If so, I’ll probably end up dropping back and using Glide, since it’s pretty easy to get the UI looking the way I want.


#2

SimpleGraphics is basically a wrapper around the Bitmap object. If you’re using SimpleGraphics it does grab the whole display. If you’re using full WPF, you can draw SimpleGraphics-style onto a Bitmap and paint that bitmap onto a control. The Bitmap API doesn’t have all of the convenience functions that SimpleGraphics does, but those are easy to grab from the SimpleGraphicsInterface implementation in $\Main\GadgeteerCore\Gadgeteer\Modules\DisplayModule.cs.


#3

Thanks, Kerry.

I’ll look into that. May be fastest for me to whip up a Glide GUI.

This is for the project we discussed by email…trying to get it a little more polished before I send you the code. :slight_smile:


#4

Awesome! Can’t wait :slight_smile: