Example E2260
Visible to All Users

WPF Flow Layout Control - Arrange Items Vertically and Enable Maximize Option

This example creates a WPF Flow Layout Control. The form layout has four groups. Each group contains a TextBlock control.

WPF Flow Layout Control - Arrange Items Vertically and Enable Maximize Option

Enable Maximize Option

Use the FlowLayoutControl.MaximizedElement property to maximize the specified group (in this example this is the first group):

XAML
<lc:FlowLayoutControl Orientation="Vertical" Background="#FFFAFAFA" BreakFlowToFit="True" MaximizedElementPosition="Right" MaximizedElement="{Binding ElementName=groupBox1}"> <lc:GroupBox x:Name="groupBox1" Header="Group 1" Style="{StaticResource myGroupBoxStyle}"> <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed molestie porttitor congue..."/> </lc:GroupBox> ... </lc:FlowLayoutControl>

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

Example Code

FlowLayoutControl_GroupBox/MainWindow.xaml
XAML
<Window x:Class="FlowLayoutControl_GroupBox.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:lc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <Style x:Key="myGroupBoxStyle" TargetType="lc:GroupBox"> <Setter Property="MaximizeElementVisibility" Value="Visible"/> <Setter Property="MinimizeElementVisibility" Value="Visible"/> <Setter Property="Width" Value="150"/> </Style> </Window.Resources> <Grid x:Name="LayoutRoot" Background="White"> <lc:FlowLayoutControl Orientation="Vertical" Background="#FFFAFAFA" BreakFlowToFit="True" MaximizedElementPosition="Right" MaximizedElement="{Binding ElementName=groupBox1}"> <lc:GroupBox x:Name="groupBox1" Header="Group 1" Style="{StaticResource myGroupBoxStyle}"> <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed molestie porttitor congue..."/> </lc:GroupBox> <lc:GroupBox Header="Group 2" Style="{StaticResource myGroupBoxStyle}"> <TextBlock TextWrapping="Wrap" Text="Ut sagittis urna et lorem..."/> </lc:GroupBox> <lc:GroupBox Header="Group 3" Style="{StaticResource myGroupBoxStyle}"> <TextBlock TextWrapping="Wrap" Text="Nunc diam justo, tempus sit amet..."/> </lc:GroupBox> <lc:GroupBox Header="Group 4" Style="{StaticResource myGroupBoxStyle}"> <TextBlock TextWrapping="Wrap" Text="Quisque iaculis, risus ac bibendum ornare..."/> </lc:GroupBox> </lc:FlowLayoutControl> </Grid> </Window>

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.