|
2 | 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
5 |
| - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 |
| - xmlns:local="clr-namespace:MaterialDesignColors.WpfExample" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" |
7 | 7 | mc:Ignorable="d"
|
8 | 8 | d:DesignHeight="400" d:DesignWidth="600">
|
9 | 9 | <Grid>
|
| 10 | + <Grid.RowDefinitions> |
| 11 | + <RowDefinition Height="Auto" /> |
| 12 | + <RowDefinition Height="Auto" /> |
| 13 | + </Grid.RowDefinitions> |
10 | 14 | <Grid.ColumnDefinitions>
|
11 |
| - <ColumnDefinition Width="50*" /> |
12 |
| - <ColumnDefinition Width="50*" /> |
| 15 | + <ColumnDefinition Width="1*" /> |
| 16 | + <ColumnDefinition Width="1*" /> |
13 | 17 | </Grid.ColumnDefinitions>
|
14 |
| - <StackPanel HorizontalAlignment="Stretch" Margin="8" Orientation="Vertical" VerticalAlignment="Stretch"> |
15 |
| - <Expander IsExpanded="True" HorizontalAlignment="Stretch"> |
16 |
| - <Expander.Header> |
17 |
| - <TextBlock Text="Expander Example 1" /> |
18 |
| - </Expander.Header> |
19 |
| - <Border Background="{DynamicResource MaterialDesignBody}" |
20 |
| - CornerRadius="5" Padding="5"> |
| 18 | + <StackPanel> |
| 19 | + <Expander HorizontalAlignment="Stretch" |
| 20 | + Header="Expander Example 1a"> |
| 21 | + <StackPanel Orientation="Vertical" |
| 22 | + TextBlock.Foreground="{DynamicResource MaterialDesignBody}" |
| 23 | + Margin="16"> |
| 24 | + <TextBlock Text="Your Content" /> |
| 25 | + <TextBlock Opacity=".68" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." |
| 26 | + TextWrapping="Wrap"/> |
| 27 | + </StackPanel> |
| 28 | + </Expander> |
| 29 | + <Expander HorizontalAlignment="Stretch" |
| 30 | + Header="Expander Example 1b"> |
| 31 | + <StackPanel Orientation="Vertical" |
| 32 | + TextBlock.Foreground="{DynamicResource MaterialDesignBody}" |
| 33 | + Margin="16"> |
| 34 | + <TextBlock Text="Your Content" /> |
| 35 | + <TextBlock Opacity=".68" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." |
| 36 | + TextWrapping="Wrap"/> |
| 37 | + </StackPanel> |
| 38 | + </Expander> |
| 39 | + <Expander HorizontalAlignment="Stretch" |
| 40 | + Header="Expander Example 1c"> |
| 41 | + <StackPanel Orientation="Vertical" |
| 42 | + TextBlock.Foreground="{DynamicResource MaterialDesignBody}" |
| 43 | + Margin="16"> |
| 44 | + <TextBlock Text="Your Content" /> |
| 45 | + <TextBlock Opacity=".68" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." |
| 46 | + TextWrapping="Wrap"/> |
| 47 | + </StackPanel> |
| 48 | + </Expander> |
| 49 | + </StackPanel> |
| 50 | + <materialDesign:Card Grid.Row="1" Background="{DynamicResource MaterialDesignBackground}" |
| 51 | + Margin="0 24 0 0"> |
| 52 | + <StackPanel> |
| 53 | + <Expander HorizontalAlignment="Stretch" |
| 54 | + Header="Expander Example 2a"> |
| 55 | + <StackPanel Orientation="Vertical" |
| 56 | + TextBlock.Foreground="{DynamicResource MaterialDesignBody}" |
| 57 | + Margin="16"> |
| 58 | + <TextBlock Text="Your Content" /> |
| 59 | + <TextBlock Opacity=".68" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." |
| 60 | + TextWrapping="Wrap"/> |
| 61 | + </StackPanel> |
| 62 | + </Expander> |
| 63 | + <Expander HorizontalAlignment="Stretch" |
| 64 | + Header="Expander Example 2b"> |
21 | 65 | <StackPanel Orientation="Vertical"
|
22 |
| - TextBlock.Foreground="{DynamicResource MaterialDesignPaper}"> |
23 |
| - <TextBlock Text="A short text to proof functionality." /> |
24 |
| - <TextBlock Margin="0,50,0,0" Text="A short text to proof functionality." /> |
| 66 | + TextBlock.Foreground="{DynamicResource MaterialDesignBody}" |
| 67 | + Margin="16"> |
| 68 | + <TextBlock Text="Your Content" /> |
| 69 | + <TextBlock Opacity=".68" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." |
| 70 | + TextWrapping="Wrap"/> |
25 | 71 | </StackPanel>
|
26 |
| - </Border> |
| 72 | + </Expander> |
| 73 | + <Expander HorizontalAlignment="Stretch" |
| 74 | + Header="Expander Example 2c"> |
| 75 | + <StackPanel Orientation="Vertical" |
| 76 | + TextBlock.Foreground="{DynamicResource MaterialDesignBody}" |
| 77 | + Margin="16"> |
| 78 | + <TextBlock Text="Your Content" /> |
| 79 | + <TextBlock Opacity=".68" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." |
| 80 | + TextWrapping="Wrap"/> |
| 81 | + </StackPanel> |
| 82 | + </Expander> |
| 83 | + </StackPanel> |
| 84 | + </materialDesign:Card> |
| 85 | + <StackPanel Grid.Column="1" HorizontalAlignment="Left" Margin="8" Orientation="Horizontal" VerticalAlignment="Stretch" |
| 86 | + Grid.RowSpan="2"> |
| 87 | + <Expander ExpandDirection="Right"> |
| 88 | + <Expander.Header> |
| 89 | + <TextBlock Text="Expander Example 3a" RenderTransformOrigin=".5,.5"> |
| 90 | + <TextBlock.LayoutTransform> |
| 91 | + <RotateTransform Angle="90" /> |
| 92 | + </TextBlock.LayoutTransform> |
| 93 | + </TextBlock> |
| 94 | + </Expander.Header> |
| 95 | + <StackPanel Orientation="Vertical" |
| 96 | + TextBlock.Foreground="{DynamicResource MaterialDesignBody}" |
| 97 | + Margin="16"> |
| 98 | + <TextBlock Text="Your Content" /> |
| 99 | + <TextBlock Opacity=".68" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." |
| 100 | + MaxWidth="180" |
| 101 | + TextWrapping="Wrap"/> |
| 102 | + </StackPanel> |
27 | 103 | </Expander>
|
28 |
| - <TextBlock Text="Text after the expander." Margin="0,8,0,0" /> |
29 |
| - </StackPanel> |
30 |
| - <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="8" Orientation="Vertical" VerticalAlignment="Stretch"> |
31 |
| - <Expander IsExpanded="False" HorizontalAlignment="Stretch"> |
| 104 | + <Expander ExpandDirection="Right"> |
| 105 | + <Expander.Header> |
| 106 | + <TextBlock Text="Expander Example 3b" RenderTransformOrigin=".5,.5"> |
| 107 | + <TextBlock.LayoutTransform> |
| 108 | + <RotateTransform Angle="90" /> |
| 109 | + </TextBlock.LayoutTransform> |
| 110 | + </TextBlock> |
| 111 | + </Expander.Header> |
| 112 | + <StackPanel Orientation="Vertical" |
| 113 | + TextBlock.Foreground="{DynamicResource MaterialDesignBody}" |
| 114 | + Margin="16"> |
| 115 | + <TextBlock Text="Your Content" /> |
| 116 | + <TextBlock Opacity=".68" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." |
| 117 | + MaxWidth="180" |
| 118 | + TextWrapping="Wrap"/> |
| 119 | + </StackPanel> |
| 120 | + </Expander> |
| 121 | + <Expander ExpandDirection="Right"> |
32 | 122 | <Expander.Header>
|
33 |
| - <TextBlock Text="Expander Example 2" /> |
| 123 | + <TextBlock Text="Expander Example 3c" RenderTransformOrigin=".5,.5"> |
| 124 | + <TextBlock.LayoutTransform> |
| 125 | + <RotateTransform Angle="90" /> |
| 126 | + </TextBlock.LayoutTransform> |
| 127 | + </TextBlock> |
34 | 128 | </Expander.Header>
|
35 |
| - <StackPanel Orientation="Vertical" Margin="8"> |
36 |
| - <TextBlock Text="A short text to proof functionality." /> |
37 |
| - <TextBlock Margin="0,150,0,0" Text="A short text to proof functionality." /> |
| 129 | + <StackPanel Orientation="Vertical" |
| 130 | + TextBlock.Foreground="{DynamicResource MaterialDesignBody}" |
| 131 | + Margin="16"> |
| 132 | + <TextBlock Text="Your Content" /> |
| 133 | + <TextBlock Opacity=".68" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." |
| 134 | + MaxWidth="180" |
| 135 | + TextWrapping="Wrap"/> |
38 | 136 | </StackPanel>
|
39 | 137 | </Expander>
|
40 |
| - <TextBlock Text="Text after the expander." Margin="0,8,0,0" /> |
41 | 138 | </StackPanel>
|
42 | 139 | </Grid>
|
43 | 140 | </UserControl>
|
0 commit comments