Introduction to Acropolis Layouts

Once you start an Acropolis applicaiton, you can see in the Acropolis Wizard, the fourth page allows you to select a "Layout" from the drop down box.

Acropolis Wizard Layout Selection

"What exactly am I selecting?" you might be thinking... so each of these selection correspond to an UI element that Acropolis provides. (All of which lives in the Microsoft.Acropolis.Windows namespace)

"Default Layout" aka PartPane

When you select this option, the Acropolis Wizard automatically generate this line of code in Window1.xaml if “Single Item” was chosen in the Navigation Page:

<Awx:PartPane Part="{Binding Part.NavigationManager.ActivePart}" Grid.Row="2"/>

A PartPane is an Acropolis UI object that hosts the selected the active UI (aka “View”) of the specified Acropolis Part. In the pre-generated code, we automatically set this to the only active component (since this is a single item navigation) of the application’s navigation model (aka NavigationManager).

This is a pretty basic control. It can only host one Acropolis Part and its View at a time. The interesting thing that this Acropolis control provides is its native understanding of Acropolis navigation model and on top of it, it contains many useful features. (That I will discuss in a separate and much more detail post J )

Note: If “Multiple Item” was chosen instead, the PartPane.Part property will not automatically be set, because it is not obvious which part the developer would like to host.

"Split Layout" aka SplitLayout

When you select this option, the Acropolis Wizard automatically generate this line of code in Window1.xaml if “Multiple Item” was chosen in the Navigation Page:

<Awx:SplitLayoutPane Parts="{Binding Part.NavigationManager.ActiveParts}" Grid.Row="2"/>

A SplitLayout is an Acropolis UI object that hosts the selected active UI (aka “View”) of all active Acropolis Part from the host part. In the pre-generated code, we automatically set the code up for the user, and the control is automatically linked to the application’s navigation model (aka NavigationManager)

This control is somewhat similar to the Windows Forms Panel control, except you can host more than 2 panels. It can be layout horizontally and vertically, and can switch with one property. (Now… try doing this in WPF with the grid control. J ) However, this control is based on WPF, and it hosts parts and the view you selected instead of just UI components. Ok.. maybe they are not that similar…. The goal of this control is to illustrate what Acropolis wants to provide. WPF is a highly flexible UI framework (and I personally love it), but we know sometimes “simple” things are not as easy to do. Acropolis wants to improve developer’s productivity by prepackaging common scenarios targeted for our line of business developers.

Note: If “Single Item” was chosen instead, the SplitLayout.Parts property will not automatically be set.

"Tabbed Layout" aka TabLayout

When you select this option, the Acropolis Wizard automatically generate this line of code in Window1.xaml if “Multiple Item” was chosen in the Navigation Page:

<Awx:TabLayoutPane Parts="{Binding Part.NavigationManager.ActiveParts}" Grid.Row="2"/>

A TabLayout is an Acropolis UI object that hosts the selected active UI (aka “View”) of all active Acropolis Part from the host part. In the pre-generated code, we automatically set the code up for the user, and the control is automatically linked to the application’s navigation model (aka NavigationManager).

There are actually a lot of cool features with the TabLayoutPane that I will start blogging about in coming weeks.

Note: If “Single Item” was chosen instead, the TabLayout.Parts property will not automatically be set.