| By Miguel Katrib, Mario del Valle | Article Rating: |
|
| October 13, 2008 07:30 AM EDT | Reads: |
2,291 |
The Windows Presentation Foundation community is growing because WPF facilitates the development of better graphical user interfaces and graphical applications. But WPF's tri-dimensional resources are not developed compared to DirectX's capabilities and existing hardware potential. This article will explain how to develop panels to make it easier to lay out tri-dimensional figures in a Viewport3D.
The Bi-dimensional Hierarchy
In WPF the bi-dimensional world is hierarchically organized as shown in Figure 1. The type Visual is the base class of any element that can be shown in WPF, while its descendant UIElement defines the elements that can interact with the users through keyboard, mouse, and stylus events. FrameworkElement is the unique implementation of UIElement right now, so FrameworkElement is the actual base class for UI elements in WPF.
Shape is the representation of bi-dimensional geometric figures that can be used to build the appearance of windows and it is also useful as the main kind of artistic components in control templates.
Decorators (descendants from type Decorator) can decorate a contained element.
Controls are the main actors of the user interface. They can be seen through its control template that can be defined using any WPF element.
Panels are not properly "visible" objects because their function is to lay out a collection of elements in the bi-dimensional world.
Is the Tri-Dimensional World Organized As Well As the Bi-Dimensional?
Not yet! Unfortunately, there is no equivalent 3D hierarchy of types as in Figure 1. For example, there aren't basic 3D figures like spheres, cubes, planes, or cones. Nor is there a kind of Control3D or Panel3D hierarchy. The good news is that Microsoft's WPF team announced some tips about the future of this hierarchy in upcoming versions; the type UIElement3D in version 3.5 of the .NET Framework is so similar to UIElement that the coincidence is not by chance, and they are promising more for the next version. But while we wait for these things, this article will help you create a custom Panel3D so you can create some 3D distribution of the objects in your applications such as the familiar Windows Vista Switching (see Figure 2).
Building a Panel3D
Figure 3 shows the 3D hierarchy in the .NET Framework 3.5. The type Visual3D is the base class of all tri-dimensional elements that can be shown in a Viewport3D. ModelVisual3D is a container grouping of the elements of the 3D space. UIElement3D is the base class of those tri-dimensional elements having user interaction. Viewport2DVisual3D is the type for helping to set bi-dimensional elements as materials of the tri-dimensional figures, but keeping the interaction with the bi-dimensional elements. ContainerUIElement3D and ModelUIElement3D are two interesting classes derived from UIElement3D. The former is a group of UIElement3D objects, and the latter provides event-driven functionality to native types derived from Model3D.
Because ContainerUIElement3D and ModelVisual3D are both container elements, they could be used as a base class for our Panel3D. To obtain a 3D hierarchy similar to the bi-dimensional one shown in Figure 1, the suitable base type should be ContainerUIElement3D, but unfortunately that class is sealed, so we will use ModelVisual3D as the base class of the "panel" class.
Published October 13, 2008 Reads 2,291
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Miguel Katrib
Miguel Katrib is a PhD and a professor in the Computer Science Department at the University of Havana. He is also the head of the WEBOO group dedicated to Web and object-oriented technologies. Miguel is also a scientific advisor in .NET for the software enterprise CARE Technologies, Denia, Spain.
More Stories By Mario del Valle
Mario del Valle is working toward his MS at the Computer Science Department at the University of Havana, and is a software developer at the WEBOO group dedicated to Web and object-oriented technologies.
- The Top 150 Players in Cloud Computing
- SYS-CON.TV: Cloud Computing Expo Power Panel
- Why IBM’s Server Chief Got Busted
- SOA World Power Panel on SYS-CON.TV
- 1st Annual GovIT Expo: Letter from the Technical Chair
- Deputy CIO of the CIA to Keynote 1st Annual GovIT Expo
- Stock in Focus: Dragon Capital
- 1st Annual Government IT Conference & Expo: Themes & Topics
- CIA was Headed to an Enterprise Cloud All Along: Jill Tummler Singer
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- The Top 150 Players in Cloud Computing
- SOA in the Cloud - Monitoring and Management for Reliability
- How to Diagnose Java Resource Starvation
- SYS-CON.TV: Cloud Computing Expo Power Panel
- Software AG Named "Gold Sponsor" of SOA World Conference & Expo 2009 East
- Why IBM’s Server Chief Got Busted
- IBM & Cloud Computing: How "SOA in the Cloud" Can Produce Real Change
- SYS-CON's Cloud Expo Adds Two New Tracks
- SOA World Power Panel on SYS-CON.TV
- 1st Annual GovIT Expo: Letter from the Technical Chair
- The i-Technology Right Stuff
- Who Are The All-Time Heroes of i-Technology?
- Get the Message
- Where Are RIA Technologies Headed in 2008?
- Success, Arrogance, Rise and Fall
- i-Technology Viewpoint: Is Web 2.0 the Global SOA?
- i-Technology Viewpoint: Thinking Outside the VC Box
- ESB Myth Busters: 10 Enterprise Service Bus Myths Debunked
- i-Technology Viewpoint: When to Leave Your First IT Job
- SOA Web Services Edge Conference Coverage on SYS-CON.TV









The new widgetry features multi-cluster suppo...

























