WPF is dead!


Thats what I was told when I announced my focus would be on WPF this year. It’s a sentiment shared by quite a few people it seems, but let’s take a look at some facts;

463ad4df-ab4c-457c-8b81-15dc98f9cebf

Some people feel that the demise of Silverlight means WPF is going the same way. I think it is important now more than ever that developers have a good grasp on the principles of WPF and a firm understanding of MVVM. Therefore I say “WPF is NOT dead”.

So what does that mean for the WinForms guy? and how do you get started with WPF? there are many questions that can be raised, and in some cases the answers raise more. But if you are anything like me, the minute you need a desktop application you reach for ‘old faithful’, the gun metal grey, proven event driven project we’ve come to love and trust.

Well friends, it’s time to move outside your and my comfort zone, it’s time to look at the next generation (yes, yes, I know it’s been around since 2006) of desktop development, it’s time to get started with WPF.

Over the next few months I’m going to be presenting a series of webinars on how to get started with WPF including; what are the benefits of using WPF?  what are the challenges?

Beginning this week with a two part primer explaining what it’s all about. Use this link to register and see what all the fuss is about!

.Net PDF Viewer Showdown – revisited


Sometime last year I wrote a post on PDF Viewers and the difficulty in choosing one that was inexpensive, easy to implement and performant. Since that time DevExpress released a PDF Viewer for WinForms, WPF and XAML, so I thought it time to add them into the equation.

– – – – – – – –

Ok, it was a simple enough feature to add. A viewer that would allow PDF’s to be shown on screen. Already in my toolkit I had the SyncFusion control, but after a couple of quick tests I found the speed to be woeful and thus started the painful process of looking for a control to use.

A number of vendors offer PDF creation, manipulation, annotations etc, but not viewing. I was most disappointed that DevExpress did not have anything in their swag, which means the project in question is now only 99% DX 😦 This is the cool part, the project can go back to 100% DX 🙂

The list came down to

– DevExpress (www.DevExpress.com)
– Gnostice (www.gnostice.com)
– Atalasoft (www.atalasoft.com)
– DynamicPDF (www.dynamicpdf.com)
– Aspose (www.aspose.com)
– ActivePDF (www.activepdf.com)
– Deaja (www.daeja.com)
– Snowbound Software (snowbound.com)
– Bluebeam Q (www.bluebeam.com)
– PDFTron (www.pdftron.com)
– GDPicture (www.gdpicture.com)
– SyncFusion (www.syncfusion.com)
– O2 Solutions (www.o2sol.com)

So what was I looking for ? a .Net Assembly that could be added to my project, capable of adding a control to a WinForm to display/interact/print existing PDF’s. It would be nice to add annotations and stamps to documents someday. Whilst price had to be balanced, licensing was important. Royalty Free distribution is a must.

How would I test? install a demo version of the product, create a viewer control on my form, set the properties, load a pdf, zoom and print. All the PDF’s tested would be live client data, the sort of thing that would be used in the final product, varying in size, content and properties. If the project could not be put together in 30minutes or less then the product was too complicated.

The litmus test is being able to do as much of the above as possible without referring to the documentation.

Round One::
Dismissed straight away because of what I thought were hideous websites were Deaja and Bluebeam. In the world of technology when your primary clients would be developers, you need something that is informative and stylish. Both these products would have been rejected on price/licensing if they had made it through round one, although to be fair, Bluebeam didn’t really fit the bill as far as a .Net library was concerned.

The list continued to get smaller as products whittled down…

Round Two::
: Snowbound – license pricing too high;
: PDFTron – restrictive licensing, too expensive;
: activePDF – confusing web site, licensing model complex and no pricing available
: DynamicPDF – restrictive licensing
: Atalasoft – PDF Reader SDK too expensive (price vs functionaltiy)

The following products made it through to testing

Round Three::
: Syncfusion – easy to implement, very slow in performance
This was the product that started me down the slippery slope of viewers, I was startled that with a $1700 price tag (for single product), the performance was dreadful.

: O2 Solutions – too hard to build a testing demo
After installing the product things look promising, until I tried to add some code. The documentation was poor, it was simply too hard to try and build the demo.

: Aspose – looked really promising, until you try and build a demo !
A single 10mb dll? I was a little surprised by how hard it was to try and create a viewer. There was nothing to add to the toolbox, the website is verbose and confusing, the forums turned up nothing. After 30minutes of trying to get something to happen I simply gave up and put it in the too hard basket.

: Gnostice – easy to implement, crashed in demo app and slow performance
The Gnostice library was easy to install and quick to implement in the project. The methods and properties were discoverable and the demo was built in a matter of minutes, unfortunately when opening one of the PDF’s we got booted with an exception, and other PDF’s were very slow.

: GdPicture – complex product matrix, confusing mix of sdk and plugins, but FAST !
GdPicture nearly got thrown out because of the complicated product matrix, I already had a partner license so I persevered – and glad I did. It looks confusing with the large number of options available, I wasn’t sure which product I needed, or plug-ins, but GdPicture has a royalty-free license, a major plus. GdPicture installed quickly, and a test app could be produced easily. Performance was fantastic. Best of all, it did not get in the way of our interface, a simple container that allowed me to add the buttons and functionality required on the form. If it’s just PDF viewing you want then the $950 license is one of the most economical on the market, if you want image manipulation as well as viewer then GdPicture still hold the lead, however,

The NEW Winner !

: DevExpress – as an existing DevExpress customer the PDF Viewer when released was automatically included in my subscription, however, for a WinForms implementation I would have had to pay just $899 which included a LOT of additional controls, not just PDF. At time of writing, the version of the PDF Viewer worked extremely well, it was faster than everyone tested except GdPicture, but the royalty free licensing makes it really attractive. I was able to drag the control onto my form and set a few properties, everything worked, but what was really cool, was the ability (from the SmartTag) to auto create either a Toolbar or Ribbon bar with file, navigation and zoom functionality.

– – – – – – – – –

In summary, the majority of vendors seem to favour a limited license instead of a royalty free one, which was disappointing, a number seemed to think that high pricing was the way to go. I still think for wanting a basic feature there are too many hoops to jump through, especially when you consider that PDF Viewing on OS X, iOS (iPhone/iPad) is native, no additional libraries or costs required. It also seems component vendors need to think about their web sites when offering some of this stuff, it is a jungle out there.

I do hope that DevExpress have a note on a story board somewhere that shows “create pdf viewer” !

It was really encouraging to see DevExpress enter the market with a viewer early 2013 (beta) and in less than 12 months deliver a low cost, powerful PDF Viewer.

110% DX ? DXTREME


Before everyone starts messaging me and telling me 110% is not possible, just listen !

For weeks I’ve been watching the countdown over at DevExpress promising to announce something cool.

Well tonight 6pm AEST all was revealed – DXTREME

In a nutshell, 3 tools in 1 – developing rich cross platform applications, and it looks amazing. Simplified codebase, clever wizards, deployment via QRCode (for testing)

There is no way I can do justice to what is being shown, so instead, head over to DXTREME and watch the announcement video.

I can’t wait to get my hands on the product to use a single environment to create my next iPad project that compliments my 100% DX WinForm app !

100% DX – SearchLookUpEdit, did YOU know it existed ?


Normally when I need to present a complex lookup I would spawn a new form have the user select a row from a carefully crafted UI and return the single value result back to a combo style element on my main form. When less complicated lookup’s are required a drop down list with concatenated fields may have sufficed, but not anymore…

In the midst of a recent sprint I found myself needing a little more. The task at hand was to provide an easy way to select a job from a collection (currently around 2000 entries and growing), the problem was not everyone would want to use a single field, they may not know the job name. Some users would be more comfortable with the claim number, or the client name. Enter the XtraEditors.SearchLookupEdit control.

I almost tripped over this control whilst trolling through the extensive collection of items in my toolbox. The name intrigued me so I decided to investigate a little further and was surprised at the power this little guy punched.

In a nutshell it is a container with a grid, text field and button, but don’t be fooled, I found it to be fast, quick to configure and simple to implement. For me the steps were;

1. Add SearchLookUpEdit control to form
2. Bind to existing datasource (and specify field as return value)
3. Adjust column properties (keeping UI noise to a minimum)
4. Tweak a few specific appearance properties (finding the drop down width was a pain)
5. Hookup an event
6. Test

Because you can control all aspects of appearance you can pretty much make the style fit any WinForm design.

The power comes from the ‘out-of-the-box’ features on the control, users can filter, search, group, select columns etc and all without chewing up valuable screen real-estate. I know that from now on I’ll be looking to use the SearchLookUpEdit control in more places, and it taught me not to undervalue some of the ‘smaller’ common controls at my disposal.

(Picture taken from DevExpress website, my use of the control contain confidential data).

.Net PDF Viewer showdown


Ok, it was a simple enough feature to add. A viewer that would allow PDF’s to be shown on screen. Already in my toolkit I had the SyncFusion control, but after a couple of quick tests I found the speed to be woeful and thus started the painful process of looking for a control to use.

A number of vendors offer PDF creation, manipulation, annotations etc, but not viewing. I was most disappointed that DevExpress did not have anything in their swag, which means the project in question is now only 99% DX 😦

The list came down to

– Gnostice (www.gnostice.com)
– Atalasoft (www.atalasoft.com)
– DynamicPDF (www.dynamicpdf.com)
– Aspose (www.aspose.com)
– ActivePDF (www.activepdf.com)
– Deaja (www.daeja.com)
– Snowbound Software (snowbound.com)
– Bluebeam Q (www.bluebeam.com)
– PDFTron (www.pdftron.com)
– GDPicture (www.gdpicture.com)
– SyncFusion (www.syncfusion.com)
– O2 Solutions (www.o2sol.com)

So what was I looking for ? a .Net Assembly that could be added to my project, capable of adding a control to a WinForm to display/interact/print existing PDF’s. It would be nice to add annotations and stamps to documents someday. Whilst price had to be balanced, licensing was important. Royalty Free distribution is a must.

How would I test ? install a demo version of the product, create a viewer control on my form, set the properties, load a pdf, zoom and print. All the PDF’s tested would be live client data, the sort of thing that would be used in the final product, varying in size, content and properties. If the project could not be put together in 30minutes or less then the product was too complicated.

The litmus test is being able to do as much of the above as possible without referring to the documentation.

Round One::
Dismissed straight away because of what I thought were hideous websites were Deaja and Bluebeam. In the world of technology when your primary clients would be developers, you need something that is informative and stylish. Both these products would have been rejected on price/licensing if they had made it through round one, although to be fair, Bluebeam didn’t really fit the bill as far as a .Net library was concerned.

The list continued to get smaller as products whittled down…

Round Two::
: Snowbound – license pricing too high;
: PDFTron – restrictive licensing, too expensive;
: activePDF – confusing web site, licensing model complex and no pricing available
: DynamicPDF – restrictive licensing
: Atalasoft – PDF Reader SDK too expensive (price vs functionaltiy)

The following products made it through to testing

Round Three::
: Syncfusion – easy to implement, very slow in performance
This was the product that started me down the slippery slope of viewers, I was startled that with a $1700 price tag (for single product), the performance was dreadful.

: O2 Solutions – too hard to build a testing demo
After installing the product things look promising, until I tried to add some code. The documentation was poor, it was simply too hard to try and build the demo.

: Aspose – looked really promising, until you try and build a demo !
A single 10mb dll? I was a little surprised by how hard it was to try and create a viewer. There was nothing to add to the toolbox, the website is verbose and confusing, the forums turned up nothing. After 30minutes of trying to get something to happen I simply gave up and put it in the too hard basket.

: Gnostice – easy to implement, crashed in demo app and slow performance
The Gnostice library was easy to install and quick to implement in the project. The methods and properties were discoverable and the demo was built in a matter of minutes, unfortunately when opening one of the PDF’s we got booted with an exception, and other PDF’s were very slow.

SO THE WINNER IS…..

: GdPicture – complex product matrix, confusing mix of sdk and plugins, but FAST !
GdPicture nearly got thrown out because of the complicated product matrix, I already had a partner license so I persevered – and glad I did. It looks confusing with the large number of options available, I wasn’t sure which product I needed, or plug-ins, but GdPicture has a royalty-free license, a major plus. GdPicture installed quickly, and a test app could be produced easily. Performance was fantastic. Best of all, it did not get in the way of our interface, a simple container that allowed me to add the buttons and functionality required on the form. If it’s just PDF viewing you want then the $950 license is one of the most economical on the market, if you want what seems to be one of the most powerful image manipulation toolkits around then the ‘Ultimate’ combination is by far the best value for money.

Edit: to be clear, for the need I had, the PDF Viewer component from GdPicture was outstanding, but GdPicture offers much more, with some other 90 formats supported.

In summary, the majority of vendors seem to favour a limited license instead of a royalty free one, which was disappointing, a number seemed to think that high pricing was the way to go. I still think for wanting a basic feature there are too many hoops to jump through, especially when you consider that PDF Viewing on OS X, iOS (iPhone/iPad) is native, no additional libraries or costs required. It also seems component vendors need to think about their web sites when offering some of this stuff, it is a jungle out there.

I do hope that DevExpress have a note on a story board somewhere that shows “create pdf viewer” !

100% DX – XtraReports : bye bye Crystal, sorry ActiveReports


What’s the first thing that comes to your mind when I mention reporting? Crystal? ActiveReports? I have used these and others on numerous projects, but then I learnt about Developer Express XtraReports, lets see if XtraReports can make it into the 100% DX range…

For a full run down on all the cool things you can achieve, check out the Developer Express web site, this post is about filling a need, quickly.

As part of the RetailOne Connect system, we needed to print a purchase order, nothing complex, just a nice looking report that can be updated from time to time. It was important to be able to export as a pdf, and generate the document quickly.

The report designer was just as friendly as expected, with a drag drop approach for fields, or a nice selection of other tools available in the toolbox,

Creating bands is a simple right click, inserting sub reports just as simple.

In the case of R1, I didn’t need any scripting or code behind, but I couldn’t help having a play first.

What really surprised me with the ease of implementing in the code:

A complete preview version of the order could be generated with as little as:

Dim report As PurchaseOrder = New PurchaseOrder()
report.DataSource = db.OrderSummaries.Where(Function(p) p.OrderID = OrderID)
report.ShowPreview()

The preview window has an amazing amount of options available, page layouts, colours, watermarks, export to PDF, JPG — you name it !

And a quick send order as PDF via email client was a matter of:

Create PDF from report:
Dim path As String = GetTempOrderPath()
Dim report As PurchaseOrder = New PurchaseOrder()
report.DataSource = db.OrderSummaries.Where(Function(p) p.OrderID = OrderID)
report.ExportToPdf(path)

Create Email with attachment:
Dim mail As SendFileTo.MAPI = New SendFileTo.MAPI
mail.AddAttachment(path)
mail.AddRecipientTo(Supplier.Contact, Supplier.Email)
mail.SendMailPopup(String.Format("Purchase Order {0}", OrderNumber), "Please find attached purchase order.")

For me there is no choice now, I will be sticking with XtraReports in all our projects. When I do a more complex layout or code behind I will do another post and report my findings.

My only complaint is that they don’t offer a version for Objective-C …. maybe in the future?