Select to view content in your preferred language

Mailing Labels

4204
13
04-05-2011 05:21 AM
JayKappy
Frequent Contributor
Has anyone out there done mailing labels through Silverlight?
Anyone maybe have an example?

I have the spatial query workign that is returning results to a datagrid fine...now just need to get them to format in IE or something to print to an Avery type mailing label format...

Thanks
0 Kudos
13 Replies
PatrickBrooke
Emerging Contributor
It is kind of alot. 😄 A good part of that code is data manipulation that is unique to our environment. I create the custom class so this I can format each buffer item the way I like, after I get the data form the query. Are the other ways to do it...likely, but I like this way, it is pretty easy and clean. They buffer items class defines what the datagrid looks like, since it is a List<_bufferItems> that I send to the datagrid - "dgReport.ItemSource = _bufferList".

Does that answer your question?

 public class _bufferItems
        {
            public string Name { get; set; }
            public string Address { get; set; }
            public string City { get; set; }
            public string State { get; set; }
            public string Zip { get; set; }
        }
0 Kudos
JayKappy
Frequent Contributor
.................................................................
0 Kudos
JayKappy
Frequent Contributor
Thanks Patrick....going to give this a whirl when I have a bit more free time....but a great start....

Thats all thats in the _bufferItems class?  why do you need an entire class for that?

Thanks Again
0 Kudos
PatrickBrooke
Emerging Contributor
I suppose you don't have to create a class just for that, but I did. This way I can make a bufferItems type for a list. It was preference, plus creating the class is not a high cost in memory or code. This way I have a type for my report.
0 Kudos