|
49 | 49 |
|
50 | 50 | <ListBox.Styles>
|
51 | 51 |
|
52 |
| - <Style Selector="ListBoxItem /template/ ContentPresenter#PART_ContentPresenter"> |
53 |
| - <Setter Property="RenderTransform" Value="scale(1,1)"/> |
54 |
| - <Setter Property="Transitions"> |
55 |
| - <Setter.Value> |
56 |
| - <Transitions> |
57 |
| - <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.1"/> |
58 |
| - </Transitions> |
59 |
| - </Setter.Value> |
60 |
| - </Setter> |
61 |
| - </Style> |
62 |
| - |
63 |
| - <Style Selector="ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter"> |
64 |
| - <Setter Property="Background" Value=""/> |
65 |
| - <Setter Property="RenderTransform" Value="scale(1.05)"/> |
66 |
| - </Style> |
| 52 | + <Style Selector="ListBoxItem"> |
| 53 | + <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> |
| 54 | + <Setter Property="Background" Value=""/> |
| 55 | + <Setter Property="RenderTransform" Value="scale(0.92)"/> |
| 56 | + <Setter Property="Transitions"> |
| 57 | + <Setter.Value> |
| 58 | + <Transitions> |
| 59 | + <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.1"/> |
| 60 | + </Transitions> |
| 61 | + </Setter.Value> |
| 62 | + </Setter> |
| 63 | + </Style> |
| 64 | + |
| 65 | + <Style Selector="^ Image#HightlightOverlay"> |
| 66 | + <Setter Property="Opacity" Value="0.00"/> |
| 67 | + <Setter Property="Transitions"> |
| 68 | + <Setter.Value> |
| 69 | + <Transitions> |
| 70 | + <DoubleTransition Property="Opacity" Duration="0:0:0.5"/> |
| 71 | + </Transitions> |
| 72 | + </Setter.Value> |
| 73 | + </Setter> |
| 74 | + </Style> |
| 75 | + |
| 76 | + <Style Selector="^:pointerover"> |
| 77 | + <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> |
| 78 | + <Setter Property="Background" Value=""/> |
| 79 | + <Setter Property="RenderTransform" Value="scale(0.96)"/> |
| 80 | + </Style> |
| 81 | + |
| 82 | + <Style Selector="^ Image#HightlightOverlay"> |
| 83 | + <Setter Property="Opacity" Value="0.2"/> |
| 84 | + </Style> |
| 85 | + </Style> |
| 86 | + |
| 87 | + <Style Selector="^:selected"> |
| 88 | + <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> |
| 89 | + <Setter Property="Background" Value=""/> |
| 90 | + <Setter Property="RenderTransform" Value="scale(1.0)"/> |
| 91 | + </Style> |
| 92 | + |
| 93 | + <Style Selector="^ Image#HightlightOverlay"> |
| 94 | + <Setter Property="Opacity" Value="0.25"/> |
| 95 | + </Style> |
| 96 | + </Style> |
67 | 97 |
|
68 |
| - <Style Selector="ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter"> |
69 |
| - <Setter Property="Background" Value=""/> |
70 |
| - <Setter Property="RenderTransform" Value="scale(1.1)"/> |
71 | 98 | </Style>
|
72 |
| - |
73 | 99 | </ListBox.Styles>
|
74 | 100 |
|
| 101 | + |
75 | 102 | <ListBox.ItemsPanel>
|
76 | 103 | <ItemsPanelTemplate>
|
77 |
| - <ctrl:AnimatedWrapPanel Orientation="Horizontal"/> |
| 104 | + <ctrl:AnimatedWrapPanel Orientation="Horizontal" ItemSpacing="3" LineSpacing="0"/> |
78 | 105 | </ItemsPanelTemplate>
|
79 | 106 | </ListBox.ItemsPanel>
|
80 | 107 |
|
81 | 108 | <ListBox.ItemTemplate>
|
82 | 109 | <DataTemplate>
|
83 | 110 |
|
84 |
| - <Grid RowDefinitions="215" ColumnDefinitions="150" VerticalAlignment="Bottom"> |
85 |
| - |
86 |
| - <Grid.Styles> |
| 111 | + <Grid Width="140" Height="210"> |
87 | 112 |
|
88 |
| - </Grid.Styles> |
| 113 | + <Grid IsVisible="{Binding GridImage, Converter={x:Static ObjectConverters.IsNotNull}}>"> |
89 | 114 |
|
| 115 | + <Image Source="{Binding GridImage, Converter={StaticResource ImagePathToBitmapConverter}}" |
| 116 | + VerticalAlignment="Center" |
| 117 | + HorizontalAlignment="Center"/> |
90 | 118 |
|
91 |
| - <Border Background="Black" |
92 |
| - Margin="10" |
93 |
| - IsVisible="{Binding GridImage, Converter={x:Static ObjectConverters.IsNull}}"/> |
| 119 | + <TextBlock Text="{Binding Title}" |
| 120 | + Padding="5" |
| 121 | + Background="{Binding Path=Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" |
| 122 | + HorizontalAlignment="Stretch" |
| 123 | + Opacity="0.6" |
| 124 | + TextAlignment="Center" |
| 125 | + VerticalAlignment="Bottom" |
| 126 | + TextWrapping="Wrap"/> |
94 | 127 |
|
95 |
| - <Image Source="{Binding GridImage, Converter={StaticResource ImagePathToBitmapConverter}}" |
96 |
| - Margin="10" |
97 |
| - VerticalAlignment="Center" |
98 |
| - HorizontalAlignment="Center" |
99 |
| - IsVisible="{Binding GridImage, Converter={x:Static ObjectConverters.IsNotNull}}"/> |
| 128 | + <TextBlock Text="{Binding Title}" |
| 129 | + Padding="5" |
| 130 | + HorizontalAlignment="Stretch" |
| 131 | + TextAlignment="Center" |
| 132 | + VerticalAlignment="Bottom" |
| 133 | + TextWrapping="WrapWithOverflow"/> |
| 134 | + </Grid> |
100 | 135 |
|
101 |
| - <Viewbox Margin="20" |
102 |
| - IsVisible="{Binding GridImage, Converter={x:Static ObjectConverters.IsNull}}"> |
103 |
| - <TextBlock Foreground="{DynamicResource SystemAccentColor}" |
104 |
| - FontSize="500" |
105 |
| - FontWeight="Bold" |
106 |
| - TextAlignment="Center" |
107 |
| - Text="{Binding TitleWithNewLines}"/> |
108 |
| - </Viewbox > |
| 136 | + <Grid IsVisible="{Binding GridImage, Converter={x:Static ObjectConverters.IsNull}}"> |
109 | 137 |
|
110 |
| - <TextBlock Text="{Binding Title}" |
111 |
| - Margin="10" |
112 |
| - Padding="5" |
113 |
| - Background="{Binding Path=Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" |
114 |
| - HorizontalAlignment="Stretch" |
115 |
| - Opacity="0.6" |
116 |
| - TextAlignment="Center" |
117 |
| - VerticalAlignment="Bottom" |
118 |
| - TextWrapping="Wrap" |
119 |
| - IsVisible="{Binding GridImage, Converter={x:Static ObjectConverters.IsNotNull}}"/> |
| 138 | + <Border Background="Black"/> |
120 | 139 |
|
121 |
| - <TextBlock Text="{Binding Title}" |
122 |
| - Margin="10" |
123 |
| - Padding="5" |
124 |
| - HorizontalAlignment="Stretch" |
125 |
| - TextAlignment="Center" |
126 |
| - VerticalAlignment="Bottom" |
127 |
| - TextWrapping="Wrap" |
128 |
| - IsVisible="{Binding GridImage, Converter={x:Static ObjectConverters.IsNotNull}}"/> |
| 140 | + <Viewbox> |
| 141 | + <TextBlock Foreground="{DynamicResource SystemAccentColor}" |
| 142 | + Margin="20" |
| 143 | + FontSize="500" |
| 144 | + FontWeight="Bold" |
| 145 | + TextAlignment="Center" |
| 146 | + Text="{Binding TitleWithNewLines}"/> |
| 147 | + </Viewbox > |
| 148 | + </Grid> |
129 | 149 |
|
130 |
| - </Grid> |
| 150 | + <Image x:Name="HightlightOverlay" |
| 151 | + Source="avares://BuildLauncher/Assets/overlay.png" |
| 152 | + VerticalAlignment="Center" |
| 153 | + HorizontalAlignment="Center"/> |
131 | 154 |
|
132 |
| - </DataTemplate> |
133 |
| - </ListBox.ItemTemplate> |
| 155 | + </Grid> |
134 | 156 |
|
135 |
| - </ListBox> |
| 157 | + </DataTemplate> |
| 158 | + </ListBox.ItemTemplate> |
136 | 159 |
|
137 |
| - <ctrl:PortsButtonsControl Name="BottomPanel" Grid.Row="2" Grid.Column="0"/> |
| 160 | + </ListBox> |
138 | 161 |
|
139 |
| - <ctrl:RightPanelControl Name="RightPanel" Grid.Row="1" Grid.Column="1"/> |
| 162 | + <ctrl:PortsButtonsControl Name="BottomPanel" Grid.Row="2" Grid.Column="0"/> |
140 | 163 |
|
| 164 | + <ctrl:RightPanelControl Name="RightPanel" Grid.Row="1" Grid.Column="1"/> |
141 | 165 |
|
142 |
| - </Grid> |
| 166 | + </Grid> |
143 | 167 |
|
144 |
| -</UserControl> |
| 168 | + </UserControl> |
0 commit comments