Showing posts with label WPF. Show all posts
Showing posts with label WPF. Show all posts

Sunday, June 21, 2009

Quest Log: Item Dissection

Nearly everything is a process and designing the items (ListBoxItems) in the Quiz Generator is no exception. These items are the pivot to the user interaction and overall experience with the application. Consequently they are vital to the overall success of the application and must be good!



This item represents what question banks, subjects, levels, annotations, and templates. As you can see there are several components that make up a single item. There are 3 buttons on all items. The large + button adds the item to the current quiz. The hammer button next to it is the Edit Button that allows the user to edit the item. The third button is the delete button which deletes the item permanently (there is a prompt window to avoid accidental deletions). There is one additional button on Question Banks when they or any items within have been edited since saved last (not shown). This button is directly to the right of the Edit Button.

Everything else is fairly self-explanatory. Moving from left to right, there is a icon and some text representing the item type. Next is the title, "Aerial Sample", and subtitle "test" of the item. Last there are 2-3 items giving details on the item; author, total question, and just question banks have the third item is Last Revised.



Editing an item is very straightforward and fast. This is what an item looks like in edit mode. It simple changes to text entry fields. Originally I had a window pop up to edit the item but that was inconvenient for such simple changes. Questions on the other hand have a separate window for editing. I will go over this on a later date.



Questions are a little different from all of the other items, but not too much. Instead of displaying information about the question, it only displays what the user going to care 95% of the time - the actual question. Because of this, going through a question bank and selecting appropriate items for a quiz is both easy and fast!


Last of all are the items in the quiz. Similar to the other items, they have buttons and vital text. You are already familiar with two of the buttons (edit and delete buttons). The third button, the most left button, is the Unlock button. The function of this button will be described in detail on my next post. Besides these buttons are two pieces of text; the question number on the top and then the actual question in full directly below it. This is RichText and is displayed exactly as it will on the printed quiz (WYSIWYG).

Overall the items are fairly basic. They only display the essential information to keep things clean and elegant. I am very pleased with how they turned out.

*saved game*

Tuesday, June 16, 2009

Quest Log: Skinning the Beast

As you read this post keep in mind that I am a perfectionist. Because of this, I have so often found myself restarting a project or a portion of a project over and over again - always trying to improve what I have. This has been a major cause for why I have so few completed projects. Fortunately, I have been able to tame this in some respect but for the most part I have learned to work around it. One example of this taming/work around is the visual aspect of the Quiz Generator.

Throughout the course of the project I have been tempted several times to scheme up a "skin" for the application. However, each time I would take a deep breath, suppress the temptation and pressed onward with development. Because I knew that it is hard to please me when it comes to a GUI and I would redo it several times if I allowed myself. So it was until I had finished the major functionality of the Quiz Generator (slayed the beast) that I decided it would be a good time to finally do the skinning.

I found myself chanting a mantra throughout this process, "Simple Simple Simple". Keeping the user interface and experience as simple as possible was key. At the same time I was constantly pushing for a rich user interface and experience, which is one of the major improvements I wanted to make from the predecessor. Fortunately, simple and a rich UI/UX are strongly correlated and I was able to accomplish this after much Consideration, Implementation, and Alteration (CIA... yeah, I'm not going to lie. I made this up...).

Moving along, I would like to first show off the face of the application. Prepare yourself!


  1. This is the Browser section of the application. The user searches through the question banks here.
  2. A beautiful breadcrumb navigation strip that functions very similar to the Vista breadcrumb navigation. With this navigating the browser is easy and the user always knows exactly where they are at.
  3. This is basically a toolbar. It provides the user with quick access to the browser's features. This includes basic navigation, searching and adding a new item.
  4. Contains the question banks (navigational), Annotations and Templates (will be discussed in a future post).
  5. This can be many things depending upon what tab is selected in #4 as well as where the user is located inside of a question bank - Question Bank, Subject, Level, Question, Annotation, Template.
  6. This is the Quiz section of the application. The user is able to manage their quizzes in this.
  7. This is an item inside of a quiz. Quiz items are either a question or annotation (simply text).
In case you are wondering at this point. I did everything except for the little question icon (and other items icons), which my wonderful wife made. Everything besides the item icons were made using Microsoft Expression Blend. This is a very powerful tool that I have come to love as a developer.


Blend is a GUI development tool, which basically allows developers to work on the visual aspect of an application without getting their hands dirty with code. The user is able to arrange and modify the elements and XAML code is generated. This can be extremely useful; however, I find that since I worked with writing XAML code by hand for so long before using Blend that while I use Blend I am writing and editing the XAML code by hand more than using the code generation. Blend is undoubtedly useful nontheless.


In my next few posts I will go into more detail on the ListBox Items (Browser and Quiz Items) as well as go over the different elements of the Quiz Generator and much much more!

*saved game*

Tuesday, June 9, 2009

Quest Log: Redesign

If there was ever an incarnation of WPF it would probably be a beautiful and graceful ballerina. ...ironically this ballerina would have absolutely no clue what WPF is actually. Also like a ballerina, WPF is very flexible. Because of this flexibility, I decided I would do some tweaking to enhance the UIX (User Interface and experience. I made this up) of my application. (You can refer to the basic design in this post.)

First of all I thought it would be cool to have a Breadcrumb navigation for the Browser section of the application. This would make navigating much easier. If you don't know how breadcrumbs work, then you can read about them here. Here is what it looked like.


One of the desired features for this application was to have basic text editing for the questions. So I designed a window that would be used for editing questions - this includes the actual question, the answer to the question and the "details". Here is a screenshot of what I had come up with.


One of the major issues with the original design of this application as well as the predecessor is that you could not see the content of a question without selecting it. Using WPFs powerful Data Templates and Control Templates, I redesigned the items in both the browser and quiz to solve this issue. They take up a little more room, but contain much more information. Here is an early prototype of what a question bank would look like.


A question itself would have a preview of the actual question - Ingenious! So this solved the issue and has a much cleaner feel to it. In both the browser and quiz the items are stacked vertically. The user is able to scroll through the items by double clicking to explore the content of question banks, subjects and levels (all of these are folder type items) and double clicking on a question opens up the question editing window.

Soon after the above screenshot was taken I decided to add buttons onto the individual items for saving, editing and deleting the item. In a few posts I will show a screenshot.

I was finally beginning to be pleased with how things were turning out. It was starting to look nice and it was even working!

*saved game*

Friday, June 5, 2009

Quest Log: Power Overwhelming

The moment I took WPF up in hand, I was hit with a surge of power. Once I gained some control I realized there was much much more to WPF than I had initially thought. Not to mention that I also moved to .NET 3.5 SP1 which had a number of new things as well.

I had never used Routed Commands. Never heard of Dependency Properties. Had no concept of Data Templates, Control Templates, and Styles! Bindings? I will admit it was fairly difficult to completely grasp everything and I am actually still learning.

I definitely would have not been able to do it without the help of fellow bloggers, miscellaneous forum posts and one of my new favorite sites, StackOverflow. Unfortunately I do not have everything bookmarked, but here are some of the sites that were very useful.

StackOverflow

This has been the most helpful site for me. It is basically a website were users can post questions and answer questions. That's it!

Dr. WPF - Items Control Series

A blog series by Dr. WPF. It was what really helped me start to learn how WPF actually works and was the inspiration for some of the UI.

Bea Stollnitz Blog
This blog wasn't as helpful to me as some other blogs because of what I was doing, but it definitely has HQ Content (High Quality).

Official Microsoft WinForms and WPF Website
Very useful. I watched many of the videos on the site and plan to watch some more.

Some Site
I don't remember how much I used of this site, but I had it bookmarked and it looks pretty good...

The weekend I made the switch to WPF I did some major grinding. I would say that I was at it for almost 40 hours in the three days. (I had Fridays off... yes, heroes get days off.) Once I returned to the town "SJSU", I couldn't help but to walk up to all of the NPCs and tell them about WPF. But still they all repeated the same thing they always say. I suppose that should have been expected.

Needless to say, I gained a lot of XP from this...

Level Up!
Jasson grows to Level 8 Programmer.
Jasson's HP increases by 1...
Jasson's STR increases by -5... >.>;
Jasson learns skill "Basic WPF"

*saved game*

Tuesday, June 2, 2009

Quest Log: Weapon of Choice

I was pleased with the UX for the most part but not the UI. One thing about me is that I expect only the best from myself and wont settle for anything less. Such as when I am developing software, I constantly strive for a professional level regardless if it is an application or game.

As I began to push WinForms in attempt to create a rich UI/UX, I realized that maybe WinForms did not have the stats I needed for this project. Thus I began to consider alternatives. The two alternatives I considered were...
  1. Qt
  2. Windows Presentation Foundation (WPF)
I had heard of Qt through some job searching and had researched it some. So one day I set out to test the strength of Qt. I started off with some easy low level monsters - probably slimes. Before I had gather much XP (experience points) with Qt, I remembered hearing of something called 'WPF'.

I had heard of WPF a few times before while talking to NPCs but had never seen what it could do. After a little researching, I saw that WPF has some amazing power and versatility when it comes to creating a good UI/UX. Here are a few screenshots of WPF applications that I found on the web.

Screenshot 1

Screenshot 2

With WPF I would be able to continue development with C#, Visual Studio, and of course the .NET Framework, but I would have a more flexible UI. This was exactly what I was looking for! Needless to say, I quickly cast aside WinForms and decided to take up this new found power. Now all I had to do was learn how to wield it...

*saved game*