views:

154

answers:

2

I need to design a simple label designer that could print labels for shelf items, just like in a grocery store. The requirements are that the label shall contain a name, a barcode (e.g. Code39 symbology), price and room for some extra text.

Where do I begin?

Guys/gals, give me some ideas how to accomplish it. Is there anything of the sort available anywhere as open source?

I need to do it in VB.NET. I have checked following thread already, but it does not give me much of an idea on how to go about it. http://stackoverflow.com/questions/1756311/creating-a-label-designer-in-c

A: 

As answered in that one question already, I think WPF is the way to go.

Gerrie Schenck
I think what i am confused about is what controls i need to use for preview purposes, where user could see what a printed label would look like. any thoughts on that
Xience
+1  A: 

I would start by writing a UserControl that can be given a symbology and string, and is able to do data validation against the string and then display it. I've done this only in MFC before, but would highly recommend using WPF for this now. I think you could go with a Canvas for the UserControl's base class as a solution. You could then draw Rectangles to handle the bars.

Since Canvas allows specific placement of the Rectangles for the barcode control, the label could also be implemented as a Canvas. You'd then add instances of your barcode UserControl to this Canvas and specify their X,Y position, probably using tips from the link you have already posted.

If you want to be able to scale the preview and preserve aspect ratio, then put everything above into a ViewBox, which will deal with the scaling for you automatically. Just set its Height and Width so the aspect ratio matches that of your label, and you should be good to go.

Dave