Click here to Skip to main content
15,892,746 members
Articles / Desktop Programming / WPF

Layout Manager for Prism v2

Rate me:
Please Sign up or sign in to vote.
4.96/5 (18 votes)
24 Apr 2009CPOL5 min read 79.1K   1.4K   57  
Provides layout management for Composite WPF (Prism) applications
<UserControl x:Class="LayoutManager.Layout.LayoutControls.ThirdLayout"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:cal="http://www.codeplex.com/CompositeWPF">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="9" />
            <RowDefinition  Height="2*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*" />
            <ColumnDefinition Width="9" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <ItemsControl Grid.Column="0"
                      Grid.Row="0"
                      Grid.ColumnSpan="3"
                      cal:RegionManager.RegionName="Menu">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <DockPanel LastChildFill="True" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
        <ItemsControl Grid.Column="0"
                      Grid.Row="1"
                      cal:RegionManager.RegionName="TopLeft">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <DockPanel LastChildFill="True" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
        <GridSplitter Grid.Column="0"
                      Grid.Row="2"
                      VerticalAlignment="Center"
                      HorizontalAlignment="Stretch"
                      Height="5"
                      Opacity="0.25" />
        <ItemsControl Grid.Column="0"
                      Grid.Row="3"
                      cal:RegionManager.RegionName="BottomLeft">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <DockPanel LastChildFill="True" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
        <GridSplitter Grid.Column="1"
                      Grid.Row="1"
                      Grid.RowSpan="3"
                      VerticalAlignment="Stretch"
                      HorizontalAlignment="Center"
                      Width="5"
                      Opacity="0.25" />
        <ItemsControl Grid.Column="2"
                      Grid.Row="1"
                      Grid.RowSpan="3"
                      cal:RegionManager.RegionName="Right">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <DockPanel LastChildFill="True" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
    </Grid>
</UserControl>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
I'm a software developer living in Northampton, UK, and enjoy working with the latest .Net technologies.

Comments and Discussions