Đây là 2 ví dụ về bộ giãn (Expander) trong WPF.
<Window x:Class="ExpanderTest.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300"><Grid>
<Grid.ColumnDefinitions><ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Expander Grid.Column="0" IsExpanded="True" Header="Sample 1">
<ListBox>
<TextBlock>Item 1</TextBlock>
<TextBlock>Item 2</TextBlock>
</ListBox>
</Expander>
<Expander Grid.Column="1" IsExpanded="True" Header="Sample 2" FlowDirection="RightToLeft">
<ListBox>
<TextBlock>Item 1</TextBlock>
<TextBlock>Item 2</TextBlock>
</ListBox>
</Expander>
</Grid>
</Window>
Không có nhận xét nào:
Đăng nhận xét