|
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:local="using:DevWinUI"> |
5 | | - |
6 | 5 | <DataTemplate x:Key="ControlItemTemplate" |
7 | 6 | x:DataType="local:DataItem"> |
8 | | - <UserControl> |
9 | | - <Grid x:Name="controlRoot" |
10 | | - Width="360" |
11 | | - Height="90" |
12 | | - Padding="8" |
13 | | - HorizontalAlignment="Stretch" |
14 | | - Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" |
15 | | - BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
16 | | - BorderThickness="1" |
17 | | - CornerRadius="{StaticResource ControlCornerRadius}"> |
| 7 | + <Grid x:Name="controlRoot" |
| 8 | + Width="360" |
| 9 | + Height="86" |
| 10 | + Padding="8" |
| 11 | + HorizontalAlignment="Stretch" |
| 12 | + Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" |
| 13 | + BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
| 14 | + BorderThickness="1" |
| 15 | + ColumnSpacing="16" |
| 16 | + CornerRadius="{StaticResource OverlayCornerRadius}"> |
| 17 | + <VisualStateManager.VisualStateGroups> |
| 18 | + <VisualStateGroup x:Name="LayoutVisualStates"> |
| 19 | + <VisualState x:Name="WideLayout"> |
| 20 | + <VisualState.StateTriggers> |
| 21 | + <AdaptiveTrigger MinWindowWidth="{StaticResource Breakpoint640Plus}" /> |
| 22 | + </VisualState.StateTriggers> |
| 23 | + <VisualState.Setters /> |
| 24 | + </VisualState> |
| 25 | + <VisualState x:Name="NarrowLayout"> |
| 26 | + <VisualState.StateTriggers> |
| 27 | + <AdaptiveTrigger MinWindowWidth="0" /> |
| 28 | + </VisualState.StateTriggers> |
| 29 | + <VisualState.Setters> |
| 30 | + <Setter Target="controlRoot.Width" Value="Auto" /> |
| 31 | + <Setter Target="controlRoot.Height" Value="120" /> |
| 32 | + </VisualState.Setters> |
| 33 | + </VisualState> |
| 34 | + </VisualStateGroup> |
| 35 | + </VisualStateManager.VisualStateGroups> |
| 36 | + <Grid> |
18 | 37 | <Grid.ColumnDefinitions> |
19 | 38 | <ColumnDefinition Width="Auto" /> |
20 | 39 | <ColumnDefinition Width="*" /> |
21 | 40 | <ColumnDefinition Width="Auto" /> |
22 | 41 | </Grid.ColumnDefinitions> |
23 | | - |
24 | | - <VisualStateManager.VisualStateGroups> |
25 | | - <VisualStateGroup x:Name="LayoutVisualStates"> |
26 | | - <VisualState x:Name="WideLayout"> |
27 | | - <VisualState.StateTriggers> |
28 | | - <AdaptiveTrigger MinWindowWidth="{StaticResource Breakpoint640Plus}" /> |
29 | | - </VisualState.StateTriggers> |
30 | | - <VisualState.Setters /> |
31 | | - </VisualState> |
32 | | - <VisualState x:Name="NarrowLayout"> |
33 | | - <VisualState.StateTriggers> |
34 | | - <AdaptiveTrigger MinWindowWidth="0" /> |
35 | | - </VisualState.StateTriggers> |
36 | | - <VisualState.Setters> |
37 | | - <Setter Target="controlRoot.Width" Value="Auto" /> |
38 | | - <Setter Target="controlRoot.Height" Value="120" /> |
39 | | - </VisualState.Setters> |
40 | | - </VisualState> |
41 | | - </VisualStateGroup> |
42 | | - </VisualStateManager.VisualStateGroups> |
43 | | - |
44 | | - <Grid Width="72" |
45 | | - CornerRadius="{ThemeResource ControlCornerRadius}"> |
46 | | - <local:ImageEx x:Name="gridImage" |
47 | | - Width="48" |
48 | | - VerticalAlignment="Center" |
49 | | - AutomationProperties.Name="{x:Bind Title}" |
50 | | - Source="{x:Bind ImagePath}" |
51 | | - Stretch="Uniform" /> |
52 | | - </Grid> |
53 | | - <StackPanel Grid.Column="1" |
54 | | - Grid.ColumnSpan="2" |
55 | | - Margin="16,0,0,0" |
56 | | - VerticalAlignment="Center" |
57 | | - Orientation="Vertical" |
58 | | - Spacing="2"> |
59 | | - <TextBlock x:Name="titleText" |
60 | | - FontFamily="{ThemeResource ContentControlThemeFontFamily}" |
61 | | - FontSize="{ThemeResource LandingItemTitleFontSize}" |
62 | | - Style="{StaticResource BodyStrongTextBlockStyle}" |
63 | | - Text="{x:Bind Title}" |
64 | | - TextLineBounds="TrimToCapHeight" |
65 | | - TextWrapping="NoWrap" /> |
66 | | - <TextBlock FontFamily="{ThemeResource ContentControlThemeFontFamily}" |
67 | | - FontSize="{ThemeResource LandingItemSubtitleFontSize}" |
68 | | - Foreground="{ThemeResource TextFillColorSecondaryBrush}" |
69 | | - RelativePanel.Below="titleText" |
70 | | - Style="{StaticResource CaptionTextBlockStyle}" |
71 | | - Text="{x:Bind Subtitle}" |
72 | | - TextTrimming="CharacterEllipsis" /> |
73 | | - </StackPanel> |
74 | | - |
| 42 | + <Grid.RowDefinitions> |
| 43 | + <RowDefinition Height="Auto" /> |
| 44 | + <RowDefinition Height="*" /> |
| 45 | + </Grid.RowDefinitions> |
| 46 | + <local:ImageEx x:Name="gridImage" |
| 47 | + Grid.RowSpan="2" |
| 48 | + Width="48" |
| 49 | + Margin="8,0,16,0" |
| 50 | + VerticalAlignment="Center" |
| 51 | + AutomationProperties.Name="{x:Bind Title}" |
| 52 | + Source="{x:Bind ImagePath}" |
| 53 | + Stretch="Uniform" /> |
| 54 | + <TextBlock x:Name="titleText" |
| 55 | + Grid.Column="1" |
| 56 | + Margin="0,12,0,0" |
| 57 | + VerticalAlignment="Bottom" |
| 58 | + FontFamily="{ThemeResource ContentControlThemeFontFamily}" |
| 59 | + FontSize="{ThemeResource LandingItemTitleFontSize}" |
| 60 | + Style="{StaticResource BodyStrongTextBlockStyle}" |
| 61 | + Text="{x:Bind Title}" |
| 62 | + TextLineBounds="TrimToCapHeight" |
| 63 | + TextWrapping="NoWrap" /> |
| 64 | + <TextBlock Grid.Row="1" |
| 65 | + Grid.Column="1" |
| 66 | + FontFamily="{ThemeResource ContentControlThemeFontFamily}" |
| 67 | + FontSize="{ThemeResource LandingItemSubtitleFontSize}" |
| 68 | + Foreground="{ThemeResource TextFillColorSecondaryBrush}" |
| 69 | + RelativePanel.Below="titleText" |
| 70 | + Style="{StaticResource CaptionTextBlockStyle}" |
| 71 | + Text="{x:Bind Subtitle}" |
| 72 | + TextTrimming="CharacterEllipsis" /> |
75 | 73 | <InfoBadge Grid.Column="2" |
76 | | - Width="10" |
77 | | - Margin="4" |
78 | 74 | VerticalAlignment="Top" |
79 | | - FontFamily="{ThemeResource ContentControlThemeFontFamily}" |
80 | 75 | Style="{StaticResource AttentionIconInfoBadgeStyle}" |
81 | 76 | Visibility="{x:Bind BadgeString, Converter={StaticResource NullToVisibilityConverter}}" /> |
82 | 77 | </Grid> |
83 | | - </UserControl> |
| 78 | + </Grid> |
84 | 79 | </DataTemplate> |
85 | | - |
86 | 80 | </ResourceDictionary> |
0 commit comments