Microsoft Cloud Authors: Lori MacVittie, Elizabeth White, Yeshim Deniz, Serafima Al, Janakiram MSV

Related Topics: Microsoft Cloud

Microsoft Cloud: Article

Dare to Use the Current Capabilities of Windows Presentation Foundation

And get 3D layout effects

But What Is a Panel?
Before thinking in a 3D panel it's important to review the main issues solved by the bi-dimensional panels.

If we only have a Canvas to arrange controls in the bi-dimensional space, we will need to calculate and recalculate formulas using the Left and Top properties and the size of the controls. To avoid the repetition of some recalculation patterns, WPF includes some specialized panels for the bi-dimensional world: StackPanel, Grid, etc. A common goal of all these panels is the ability to position their contained elements in a bi-dimensional area.

In addition to the above positioning functionality, according to its kind of distribution logic the panels should decide the final size to visualize each element contained inside of them.

Arrange and Measure
The type Panel is the main class in the WPF bi-dimensional layout system. Panel and its descendant types solve the positioning and resizing problems using the Arrange and Measure methods of each contained UIElement. Measure finds the desired size requested by each contained element and Arrange is called to place and resize them according to the desired size obtained from the property DesiredSize (which is calculated by each call to Measure).

Unfortunately till now UIElement3D didn't have analogous methods for the 3D world as can be seen in the note in Figure 4.

Unhappily it seems that the 3D world won't have these essential methods then. However, the good news is that at least there is a feature (Transformations) that could help to mitigate the problem of positioning 3D elements without recalculating their placements.

Tri-Dimensional Transformations
As in the bi-dimensional space there are linear-transformations for the tri-dimensional world. These transformations can be applied to any element of type Visual3D or Model3D, and to the Camera. The 3D elements can be rotated, scaled, and translated throughout the RotateTransform3D, ScaleTransform3D, and TranslateTransform3D transformations. There is also a special transformation called Transform3DGroup that can be used to group and apply more than one transformation over the same element. In Listing 1 we use these transformations to place the models according to the layout logic.

Definition of the Panel3D
Listing 1 shows an approach to implementing a Panel3D. The default value for the property Transform of a Visual3D is MatrixTransform3D.Identity; that's why the method Move in Listing 1 asks for this value to know if the Transform property isn't explicitly set yet. The function of this Move method is to support moving elements according to the parameter offset using the transformations TranslateTransform3D and Transformation3DGroup.

The method OnVisualChildrenChanged calls the corresponding method of the base class ModelVisual3D and invokes the Arrange method when a new element is added to the panel. This Arrange method is abstract and must be implemented by the concrete descendants of Panel3D as we will see in the following case of a CubePanel.

Definition of a CubePanel
A CubePanel will be a sort of tri-dimensional grid that can be defined as a descendant of the type Panel3D overriding the Arrange method, as shown in Listing 2. A Grid in WPF allows elements to be added in a plane area, aligning them in rows and columns. The goal of a CubePanel is to add a third dimension so that if you want to put an element in some row and column, you can use YIndex instead of Row, XIndex instead of Column, with the ability to send the element back or bring it to the front with very realistic depth perspective using a ZIndex attached property. These indices refer to one of the coordinate descriptions declared in the collections XCoord and YCoord (equivalent to ColumnDescriptions and RowDescriptions of the Grid type) and the newest ZCoord. Accordingly, the SizeX, SizeY, and SizeZ properties define the dimensions of the whole CubePanel (see Listing 2).

A Pawn on the Chess Table
Listing 3 illustrates an application example of this CubePanel. The XAML code is used to place five planes, one sphere, and one cone as shown in Figure 5. The types SphereBuilder, PlaneBuilder, and ConeBuilder are essentially used to build the mesh of these figures. Their property Geometry returns a MeshGeometry3D bound to the Geometry property of the GeometryModel3D to get the result in Figure 5. We could discuss these types further but won't for want of space.

The WPF team is working hard to increment the primitives and basic capabilities of the API 3D. This article invites readers to dare to use the current capabilities of WPF to obtain 3D layout effects while waiting for the next generation of WPF 3D. Enjoy it!


  • Natham, A. (2007). Windows Presentation Foundation Unleashed. SAMS Publications.
  • Griffiths, I., and Sells, C. (2005). Programming Windows Presentation Foundation. O'Reilly.
  • Petzold, C. (2006). Applications = Code + Markup: A Guide to the Microsoft Windows Presentation Foundation. Microsoft Press.

More about panels in WPF can be found in the following Spanish publications of the authors:

  • Del Valle, M.; Sierra, I.; Hernández, Y.; and Katrib, M. "Cómo definir nuestros propios paneles personalizados en WPF." DotNetmanía No 35. Marzo 2007.
  • Katrib, M.; Del Valle, M.; Sierra, I.; and Hernández, Y. "Windows Presentation Foundation." DotNetManía Cuaderno Técnico No 7. Netalia 2007.
  • Del Valle, M.; Sierra, I.;Yamil Hernández, Y.; and Katrib, M. "Entrando en la tercera dimensión." DotNetmanía No 37. Mayo 2007.

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.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

@ThingsExpo Stories
In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
DXWorldEXPO LLC announced today that the upcoming DXWorldEXPO | CloudEXPO New York event will feature 10 companies from Poland to participate at the "Poland Digital Transformation Pavilion" on November 12-13, 2018.
Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
The best way to leverage your CloudEXPO | DXWorldEXPO presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering CloudEXPO | DXWorldEXPO will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at CloudEXPO. Product announcements during our show provide your company with the most reach through our targeted audienc...
JETRO showcased Japan Digital Transformation Pavilion at SYS-CON's 21st International Cloud Expo® at the Santa Clara Convention Center in Santa Clara, CA. The Japan External Trade Organization (JETRO) is a non-profit organization that provides business support services to companies expanding to Japan. With the support of JETRO's dedicated staff, clients can incorporate their business; receive visa, immigration, and HR support; find dedicated office space; identify local government subsidies; get...
DXWorldEXPO LLC announced today that All in Mobile, a mobile app development company from Poland, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. All In Mobile is a mobile app development company from Poland. Since 2014, they maintain passion for developing mobile applications for enterprises and startups worldwide.
@DevOpsSummit at Cloud Expo, taking place November 12-13 in New York City, NY, is co-located with 22nd international CloudEXPO | first international DXWorldEXPO and will feature technical sessions from a rock star conference faculty and the leading industry players in the world.
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
As data explodes in quantity, importance and from new sources, the need for managing and protecting data residing across physical, virtual, and cloud environments grow with it. Managing data includes protecting it, indexing and classifying it for true, long-term management, compliance and E-Discovery. Commvault can ensure this with a single pane of glass solution – whether in a private cloud, a Service Provider delivered public cloud or a hybrid cloud environment – across the heterogeneous enter...
DXWorldEXPO LLC announced today that ICC-USA, a computer systems integrator and server manufacturing company focused on developing products and product appliances, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City. ICC is a computer systems integrator and server manufacturing company focused on developing products and product appliances to meet a wide range of ...
More and more brands have jumped on the IoT bandwagon. We have an excess of wearables – activity trackers, smartwatches, smart glasses and sneakers, and more that track seemingly endless datapoints. However, most consumers have no idea what “IoT” means. Creating more wearables that track data shouldn't be the aim of brands; delivering meaningful, tangible relevance to their users should be. We're in a period in which the IoT pendulum is still swinging. Initially, it swung toward "smart for smart...
Headquartered in Plainsboro, NJ, Synametrics Technologies has provided IT professionals and computer systems developers since 1997. Based on the success of their initial product offerings (WinSQL and DeltaCopy), the company continues to create and hone innovative products that help its customers get more from their computer applications, databases and infrastructure. To date, over one million users around the world have chosen Synametrics solutions to help power their accelerated business or per...
Founded in 2000, Chetu Inc. is a global provider of customized software development solutions and IT staff augmentation services for software technology providers. By providing clients with unparalleled niche technology expertise and industry experience, Chetu has become the premiere long-term, back-end software development partner for start-ups, SMBs, and Fortune 500 companies. Chetu is headquartered in Plantation, Florida, with thirteen offices throughout the U.S. and abroad.
In an era of historic innovation fueled by unprecedented access to data and technology, the low cost and risk of entering new markets has leveled the playing field for business. Today, any ambitious innovator can easily introduce a new application or product that can reinvent business models and transform the client experience. In their Day 2 Keynote at 19th Cloud Expo, Mercer Rowe, IBM Vice President of Strategic Alliances, and Raejeanne Skillern, Intel Vice President of Data Center Group and ...
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
"We are a well-established player in the application life cycle management market and we also have a very strong version control product," stated Flint Brenton, CEO of CollabNet,, in this SYS-CON.tv interview at 18th Cloud Expo at the Javits Center in New York City, NY.
It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
Most people haven’t heard the word, “gamification,” even though they probably, and perhaps unwittingly, participate in it every day. Gamification is “the process of adding games or game-like elements to something (as a task) so as to encourage participation.” Further, gamification is about bringing game mechanics – rules, constructs, processes, and methods – into the real world in an effort to engage people. In his session at @ThingsExpo, Robert Endo, owner and engagement manager of Intrepid D...
Recently, WebRTC has a lot of eyes from market. The use cases of WebRTC are expanding - video chat, online education, online health care etc. Not only for human-to-human communication, but also IoT use cases such as machine to human use cases can be seen recently. One of the typical use-case is remote camera monitoring. With WebRTC, people can have interoperability and flexibility for deploying monitoring service. However, the benefit of WebRTC for IoT is not only its convenience and interopera...