
|  | |
| | January 05, 2010 | | WPF is Microsoft's latest, greatest means for developing a graphical user interface for desktop applications, which is one reason to learn it, but in my initial research on the topic I came across a few others that are worth mentioning. Why learn WPF? - Broad integration - WPF makes it straightforward to work with 3D graphics, video, speech, rich document viewing, etc. all in one app.
- Resolution independence - if you have a graphics-heavy app, whether it be fancy backgrounds, skins, and buttons or lots of charts, graphs, or 3D modeling, you'll like WPF. It makes use of vector graphics, which means scaling for different screen resolutions becomes a non-issue.
- Hardware acceleration - WPF is built on top of Direct3D, so again, that's good for graphics.
- Declarative programming - The XAML language is nice for the developer, allowing you to quickly lay out an app and make changes to it.
- Rich composition and customization - The WPF model gives the developer a lot of control over the look and feel of just about every aspect of the GUI. It makes use of templates and chains of inheritance for styles, which makes it easy to change the look of an app or apply skins.
My current motivation for wanting to learn WPF is my search for a quicker way to put together apps for my engineering clients. For the most part, they request desktop apps that involve working with data that represents some physical phenomena, graphing the data in some form or another, querying the data, and performing calculations with the data. I feel as though the "hard" part of my clients' requests should be figuring out the calculations and coming up with clear, concise ways of presenting their data. But in reality, I spend a lot of time on the GUI, programming buttons and list views and tree views and the like. This takes time away from the "interesting" problems. I'm hoping that WPF will help me out a bit. So initially, I want to learn how to lay out a typical engineering app with WPF, figure out some of the graphics functionality, get started with Model-View-ViewModel architecture (because I've heard from my colleagues that this is the way to go when architecting a WPF app), and put together a basic toolbox that I can share with my clients when we start a new app from scratch.  | |
| | November 29, 2009 | | Step 1. Get a book I want to keep up with the times, and to that end I'm starting to learn Windows Presentation Foundation (WPF). But first, my UI history. For most of my career I was not a software developer per se, but rather an engineer who spent most of her time developing software tools to get the job done. Most engineers aren't terribly bothered by UIs. They either don't have a strong aesthetic streak or have been beaten down by stingy managers, and will accept a text-based shell interface as long as it spits out numbers that sort of look right. But so much of engineering is visual, so I always felt that if we're going to display graphical information, we might as well also incorporate a graphical user interface into the software. I always thought that it would be easier to use, and learn how to use, a piece of software if it has a graphical user interface (though in reality, this isn't always the case!). So I took the time to learn how to add a graphical user interface to the software I was developing. 1994 - Started to learn X Windows/Motif. I worked exclusively on Unix systems back then (SGI, Sun, and IBM RISC). I got pretty good at this. I also learned some OpenGL because my work was mostly in computational geometry. 2000 - The place that I worked at took away our SGI workstations, leaving us with PCs running Windows. Our team was forced to learn something new. How cruel. We looked for the closest thing to Motif, which was Win32. I got pretty good at this. I learned GDI, because I was still doing graphical stuff. I also learned the Cosmo VRML library, and learned how to do rudimentary GUIs in MATLAB. 2007 - I came to SRT and was finally forced into the 21st century; I started to do .NET and WinForms development. I've gotten pretty good at it. Along the way, occasionally a customer wants some data plotted on the screen, so I've learned a little Tee-Chart, ZedGraph, and Microsoft's .NET visualization library. 2009 - I am volunteering, yes volunteering, to learn WPF. No one has taken anything away. I don't currently have a client requesting WPF. I'm doing this so I can suggest WPF to clients if it seems appropriate. So how to learn WPF? On the suggestion of a couple of co-workers, I got the book: It has been a good starting point. I've also found a few series on CodeProject that have been helpful: Awhile back, when I first wanted to start learning WPF (I was distracted along the way), I read several of the So now onto the actual learning...  | |
| | June 18, 2009 | | I've been doing some more TeeChart work for a client, and ran into the following two issues. This is actually the second time I have gone through this pain, so I'm writing them down this time in the hopes that they become imprinted on my brain. NaN values in 3D surface plots When doing a 2D line plot in TeeChart, you can specify how you want to TeeChart to handle null or NaN values. TeeChart will set the point representing the NaN value to transparent, and will not attempt to draw a line two or from the point. With 3D surface plots, this functionality is not available. A work-around can be found at: http://www.teechart.net/support/viewtopic.php?f=4&t=6622&p=25500&hilit=NaN#p25500 Floating point values on the X- and Z-axes First I must point out that by default, TeeChart's convention is to treat the X- and Z-axes as the independent plot axes, and the Y-axis is the dependent value. The Z-axis is the depth axis (axis into the page). TeeChart by default assumes that your X- and Z-axis values are integer. If you want to use floating point values on these axes, you must set the IrregularGrid property on the series to true. Sure, you can have regularly spaced values along the X- and/or Z-axis, but if they're floating point values, TeeChart thinks of them as irregular :).  | |
|
|
|  |
| Monthly Archives |  | January, 2010 |  | November, 2009 |  | June, 2009 |  | May, 2009 |  | February, 2009 |  | January, 2009 |  | December, 2008 |  | November, 2008 |  | September, 2008 |  | August, 2008 |  | July, 2008 |  | June, 2008 |  | May, 2008 |  | April, 2008 |
|