Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation
-
Upload
goodfriday -
Category
Technology
-
view
1.053 -
download
1
description
Transcript of Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation
Lessons Learned: Designer/Developer Productivity in Windows Presentation FoundationJonathan Russ and Josh WagonerIdentityMine, Inc.
IdentityMineWho are we?
User Experience Design and Development
WPF
We love software
IdentityMineWhat have we done?
Lessons Learned
Real world application design and development has taught us a lot…
And we like to share.
Workflow
Design Develop
Integrate
Designer
True Graphics Designer
Microsoft Expression Design, Adobe Illustrator, Macromedia Fireworks, 3D Modeling Tools
Owns the design assets
Developer
Software Engineer
Microsoft Visual Studio 2005
Owns the code
Integrator
Part Designer, Part Developer. Coordinator.
Microsoft Expression Blend, Microsoft Visual Studio 2005
Owns the XAML
The DynaViz App
Jonathan RussDirector of R & D
4½ years – WPF 13 years – Software18 years – Industry26 years – Hobbyist
36 years – Coexisting
Microsoft Dynamics Sure Step Business Modeler
demo
a.k.a., Dynamics Visualization Applicationa.k.a., DynaViz
Object Lifetime
Event handlers keep objects alive
WPF registers a Changed handler for DPs of type Freezable
Set to null prior to releasing the object
MyRect.Fill = null;
MyRect = null;
Object Lifetime (continued…)
There’s Strength in Weakness
Follow the weak event pattern
Use weak references
Object Lifetime (still living…)
Cache and Re-use Objects
Working with Images
Cache Images
Working with Images (continued…)
Decode images to their required sizes
BitmapImage.DecodePixelWidth BitmapImage.DecodePixelHeight
Keyboard Access
Use Commands
KeyBinding
Best if stored in a common location
Keyboard Navigation
Focusability
Focusable PropertyIsTabStop Property
Keyboard Navigation (continued…)
Visual Cues
FocusVisualStyle Property
Keyboard Navigation (continued…)
Control Behaviors
IsMouseOver PropertyIsKeyboardFocusWithin Property
Keyboard Navigation (continued…)
Tracking Focus
Snoop FocusManager
Blendables™ in DynaViz(from the Essentials Mix)
ChromelessWindow
ElementSnapshot
DragAndDrop
OSChecker
Zoombox
Blendables™ in DynaViz(from future mixes)
TreeGraph
RadialPanel
ForceDirectedRadialPanel
CommandTextBox
EditModeTextBlock
ImageCache
Taking XAML Farther
demo
SimpleBinding and EvalBinding(available in all Blendables™ mixes)
Accruent Data Visualization
Real Estate Performance Management
Optimize the impact of real estate on company performance
Accruent
demo
Areas of Interest
Development Workflow
WPF 3D
Real-world Data Sources
Team
Designers: 1
Integrators: 1
Developers: 1-2
Workflow
Designer: Comps. 3D Models.
Integrator: Styles. Templates. 2D Animations. Design Integration.
Developer: Controls. 3D Interaction Code. Intergration of Data Services. Code Behinds.
Workflow Challanges
Feature differences between WPF 2D and 3D
Less Designer and Integrator input than other WPF projects
WPF 3D
Building 3D applications with WPF can be much easier than other technologies, but…
It's still hard.
Developers: Understand 3D
Make sure you have a good understand of 3D concepts and terminology.
If you don't have the knowledge now, don't be afraid of 3D. Read a book.
Designers and 3D
Designers should be familiar with 3D Modeling tools.
ElectricRain's Zam3D
Workflow: Export developer friendly models.
Users and 3D
Most users are not familiar with navigating 3D UI
Contrained movement to allow users easily acclimate to the environment
2D UI to allow user to control 3D world
Developing 3D Interaction
Input Events… or lack thereof
Hit Testing in 3D
ModelVisual3D
ModelVisual3D is the most functional class in 3D
Most similar to the 2D Visual class
No support for Styles, Templates, Routed Events.
Input Events
3D models do not raise events as 2D controls do
No MouseEnter, No MouseExit, No MouseButtonDown, etc.
Hit testing in 3D
A UIElement is needed to raise input events. This could be the Viewport3D itself or an element on
top of the Viewport3D
VisualTreeHelper provides support for hit testing into 3D
Models intersected by hit test are returned
Improving Hit Testing Dev Experience
We created a hit manager class that handles all hit testing
Hit manager dispatches events to the models hit
Now we could add event handlers directly to the models when the model is added to scene for a more productive and consistent development
model
No ItemsControl in 3D
Data in the Accruent application cried out for ItemsControl functionality.
List of data objects are returned from most service calls.
We leveraged the Blendables™ Brand ItemsContainer3D and Carousel3D controls
Carousel3D
demo
Building a data bound video carousel entirely in markup.
2D on 3D
3DTools project on codeplex.com
Source released by Microsoft with controls enabling interactive 2D content on 3D
The Interactive3DDecorator is the control that sits on top of the Viewport3D in the Accruent
application
Performance
Avoid TileBrushes whenever possible in your 3D scene
When a model with a TileBrush in its material is not visible remove it form the scene
RenderOptions.CachingHint attached property
Data
Real world data sources can be slow
Waiting on data can freeze ambient animations and result in a poor user experience
Dispatcher
Dispatcher.Invoke
Dispatcher.BeginInvoke
Do processing on background threads and update dependency properties
IdentityMine Team
Q & A
Please fill out your eval
evaluation
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions,
it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.