This demo was presented at the Microsoft Professional Developers Conference in September 2005 by Rob Relyea as part of the Lap Around Windows Presentation Foundation ("Avalon") talk. [PRS305]
http://robrelyea.com/events/pdc2005/ will be maintained with any updates, pointers to slides, recordings, etc...
To Build and Run
Use Visual Studio or msbuild from the command line to build.
File Descriptions for the Lap Around
WPF Demo
Window1.xaml
User interface description for primary window of this application.
In the live demo of this, data was embedded
into this file directly with <my:Patient /> tags.
In this version of the demo, I created a PatientCollection class that was used as
the ItemsSource of the ListBox (it had some hard coded patients added in the constructor
of the collection.)
Window1.xaml.cs
Event handling logic for Window1.xaml.
It has event handlers for the "Add New Patient" button, zoom level slider, and window
resize.
PatientPhotos\*.jpg
Photos for each patient. In a non-demo, clearly these data images wouldn't
be hard coded into the application itself. They would likely be used from a server,
or perhaps downloaded and cached on the client.
Images\
contoso.jpg - image that was eventually in the application. At the end
of the application, it was not used.
contoso.ico - icon for title bar of application's window.
BusinessObjects\patient.cs
Patient class - Business object representing a Patient.
PatientCollection class - Collection of patients. Subclasses observableCollection
so that databinding gets automatic knowledge of changes to the collection.
Diagnoses\*.xaml
FlowDocuments that are displayed when the "Diagnosis Detail" hyperlink is clicked.
Dictionaries\Vectors.xaml
PDC CTP is the first time we have support for merging dictionaries into normal
resource resolution path. MyApp.xaml includes Vectors.xaml into its ResourceDictionary.
There are a few options of how to include a vector image into your xaml files in
the PDC release:
PatientDetail
The Chart
control used in this user control is ChartFX from SoftwareFX.
Treatment of Colors
This demo code has too many hard coded colors, which makes accessibility more difficult. I will be pointing to guidelines on how to avoid that soon. Stay tuned to the website.
Animation
This demo should be enhanced to check the capabilities of the system before doing the 3d animation.
Occassionally the animation appears to stick at the end of the flip. I've tried to work around that issue with some success. It is caused by a bug in the WPF September 2005 CTP.