Main Site Documentation

Confused with Microsoft.SPOT.Presentation.Controls


#1

I am trying to learn the LCD on my FEZ Cobra.
Demos working just fine, but i want to change the background color.
So i went here to see what options are for it.
http://msdn.microsoft.com/en-us/library/ee432104.aspx

So in there i see that one of the classes is canvas.

so i have
Panel panel = new Panel();

yet when i type panel then “.” there is no option for canvas. Why ?


#2

I’m not sure what you are trying to do and I will also throw in that while I know .NET I am less familar with .NETMF. That said…

Panel doesn’t have a property or method called canvas. Canvas is a subclass of Panel.

Typically, you create a class that inherits the Window class and create it in the start up code. Window has a property call Child. Note the singular designation in that you can have only one. However, if you create a Panel and make it the one and only Child, the Panel class has a property called Children so you can add multiple objects to form a UI. Since Canvas subclasses Panel, you could use it in place of the Panel as the single child of the Window.


#3

Try glide. Much easier

Search forum for glide


#4

i have looked at that a few days ago. Was unable to get the examples working.
Sent a message to them about that, said they fixed it and updated it.

Just tried it again with the demo "Using your own custom keyboard"
but again, could not get it to work.


#5

seulater:

Glide is the way to go.

If you are having troubles with Glide, read the release notes. In an earlier release, there were some namespace changes. Some of the examples have not been updated with the namespace changes yet.

Also, if you have a problem with Glide, post a message on the Glide forum. Glide is still in beta, and the more feedback you give Josh the better the final product.

I do lots of .NET Forms work. Learning MF WPF was a time committment for me. I was able to use Glide within hours.

BTW: In the screen shot you posted, it appears that you have not include the required bitmaps as a resource in your project.


#6

[quote]i have looked at that a few days ago. Was unable to get the examples working.
Sent a message to them about that, said they fixed it and updated it.

Just tried it again with the demo "Using your own custom keyboard"
but again, could not get it to work.[/quote]

All examples should be up to date. Please start with new project and follow the instructions, if still having problems then please reply to the glide thread on beta board.

There are many people using glide now (including GHI internally) so it should be very close to a RC.


#7

The custom keyboard example works. The problem in your screenshot usually involves a namespace issue. Since your project is named Test it’s not the culprit. Did you add the resources through the resources panel? If you right-clicked the Resources folder and added the images that way then you’ll get that error.

Double-click Resources.resx
Select Add Resource > Add Existing File…
Navigate to the folder containing the keyboard images, select them all, and click Open. Since images are already in your Resource folder it may ask for each file if you’d like to replace it-- click Yes for every one.

I also updated the example to include the steps: http://www.ghielectronics.com/glide/example/6/


#8

On wiki http://wiki.tinyclr.com/index.php?title=Loading_Resources


#9

Thanks guys. the problem was the way i added the keyboard files
i right clicked on the Folder “Resources” then add existing item.
when i deleted them and did it the ways GUS explained

Double-click Resources.resx
Select Add Resource > Add Existing File…

it worked just fine.