|
7 | 7 | xmlns:Extensions="using:BreadPlayer.Extensions" |
8 | 8 | xmlns:Interactivity="using:Microsoft.Xaml.Interactivity" |
9 | 9 | xmlns:Media="using:Microsoft.Xaml.Interactions.Media" |
10 | | - xmlns:local="using:BreadPlayer.Themes" |
| 10 | + xmlns:local="using:BreadPlayer.Themes" |
| 11 | + xmlns:toolkit="using:Microsoft.Toolkit.Uwp.UI.Controls" |
11 | 12 | xmlns:models="using:BreadPlayer.Core.Models"> |
12 | 13 |
|
13 | 14 | <Extensions:BindableFlyout |
|
1002 | 1003 | <RowDefinition Height="Auto" /> |
1003 | 1004 | <RowDefinition Height="Auto" /> |
1004 | 1005 | </Grid.RowDefinitions> |
| 1006 | + |
| 1007 | + <toolkit:DropShadowPanel |
| 1008 | + x:Name="dropShadow" |
| 1009 | + Grid.ColumnSpan="5" |
| 1010 | + HorizontalAlignment="Center" |
| 1011 | + VerticalAlignment="Center" |
| 1012 | + HorizontalContentAlignment="Stretch" |
| 1013 | + VerticalContentAlignment="Stretch" |
| 1014 | + BlurRadius="30" |
| 1015 | + OffsetX="0" |
| 1016 | + OffsetY="0" |
| 1017 | + Opacity="1" |
| 1018 | + ShadowOpacity="0" |
| 1019 | + Color="{Binding Path=PictureColor, Converter={StaticResource ColorDarknessChanger}, ConverterParameter='-0.7Color'}"> |
| 1020 | + <Ellipse Width="150" |
| 1021 | + Height="150" |
| 1022 | + Fill="Black"/> |
| 1023 | + </toolkit:DropShadowPanel> |
1005 | 1024 | <Border |
1006 | 1025 | Width="150" |
1007 | 1026 | Height="150" |
1008 | 1027 | Background="#ccdbdbdb" |
1009 | 1028 | CornerRadius="100"> |
1010 | | - <Grid |
| 1029 | + |
| 1030 | + <Grid |
1011 | 1031 | x:Name="artistImageGrid" |
1012 | 1032 | CornerRadius="100" |
1013 | 1033 | Opacity="1"> |
1014 | | - <Grid.Background> |
1015 | | - <ImageBrush x:Name="ArtistPicture" Stretch="Uniform"> |
1016 | | - <ImageBrush.ImageSource> |
1017 | | - <BitmapImage |
| 1034 | + <Grid.Background> |
| 1035 | + <ImageBrush x:Name="ArtistPicture" Stretch="Uniform"> |
| 1036 | + <ImageBrush.ImageSource> |
| 1037 | + <BitmapImage |
1018 | 1038 | DecodePixelHeight="150" |
1019 | 1039 | DecodePixelType="Logical" |
1020 | 1040 | DecodePixelWidth="150" |
1021 | 1041 | UriSource="{Binding Picture, UpdateSourceTrigger=PropertyChanged}"> |
1022 | | - </BitmapImage> |
1023 | | - </ImageBrush.ImageSource> |
1024 | | - </ImageBrush> |
1025 | | - </Grid.Background> |
1026 | | - <FontIcon |
| 1042 | + </BitmapImage> |
| 1043 | + </ImageBrush.ImageSource> |
| 1044 | + </ImageBrush> |
| 1045 | + </Grid.Background> |
| 1046 | + <FontIcon |
1027 | 1047 | x:Name="PlaceHolder" |
1028 | 1048 | Width="150" |
1029 | 1049 | Height="150" |
1030 | 1050 | FontSize="52" |
1031 | 1051 | Foreground="{ThemeResource ThemeForeground}" |
1032 | 1052 | Glyph="" |
1033 | 1053 | Visibility="{x:Bind Path=Picture, Mode=OneWay, Converter={StaticResource BoolToVisibility}}" /> |
1034 | | - <!--<Grid CornerRadius="100" Background="{Binding Path=PictureColor, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource HexToColor}}" />--> |
1035 | | - </Grid> |
| 1054 | + <!--<Grid CornerRadius="100" Background="{Binding Path=PictureColor, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource HexToColor}}" />--> |
| 1055 | + </Grid> |
1036 | 1056 | </Border> |
1037 | 1057 | <TextBlock |
1038 | 1058 | x:Name="artistName" |
|
1056 | 1076 | HorizontalAlignment="Stretch" |
1057 | 1077 | VerticalAlignment="Stretch" |
1058 | 1078 | CornerRadius="100" |
1059 | | - Opacity="0" |
1060 | | - Visibility="Collapsed"> |
1061 | | - <Grid.Background> |
| 1079 | + Opacity="0"> |
| 1080 | + <!--<Grid.Background> |
1062 | 1081 | <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> |
1063 | 1082 | <GradientStop Offset="0" Color="Transparent" /> |
1064 | 1083 | <GradientStop Offset="0.95" Color="{Binding Path=PictureColor}" /> |
1065 | 1084 | </LinearGradientBrush> |
1066 | | - </Grid.Background> |
| 1085 | + </Grid.Background>--> |
1067 | 1086 | <Grid.ColumnDefinitions> |
1068 | 1087 | <ColumnDefinition Width="*" /> |
1069 | 1088 | <ColumnDefinition Width="*" /> |
|
1108 | 1127 | Binding="{Binding Path=IsSelected, UpdateSourceTrigger=PropertyChanged}" |
1109 | 1128 | ComparisonCondition="Equal" |
1110 | 1129 | Value="True"> |
1111 | | - <Core:ChangePropertyAction |
1112 | | - PropertyName="Visibility" |
1113 | | - TargetObject="{Binding ElementName=ButtonsStack}" |
1114 | | - Value="Visible" /> |
1115 | 1130 | <Core:ChangePropertyAction |
1116 | 1131 | PropertyName="Foreground" |
1117 | 1132 | TargetObject="{Binding ElementName=albumTitle}" |
|
1123 | 1138 | <Media:ControlStoryboardAction> |
1124 | 1139 | <Media:ControlStoryboardAction.Storyboard> |
1125 | 1140 | <Storyboard> |
| 1141 | + <DoubleAnimation |
| 1142 | + EnableDependentAnimation="True" |
| 1143 | + Storyboard.TargetName="dropShadow" |
| 1144 | + Storyboard.TargetProperty="ShadowOpacity" |
| 1145 | + To="1" |
| 1146 | + Duration="0:0:0.5" /> |
1126 | 1147 | <DoubleAnimation |
1127 | 1148 | Storyboard.TargetName="ButtonsStack" |
1128 | 1149 | Storyboard.TargetProperty="Opacity" |
|
1137 | 1158 | Binding="{Binding Path=IsSelected, UpdateSourceTrigger=PropertyChanged}" |
1138 | 1159 | ComparisonCondition="Equal" |
1139 | 1160 | Value="False"> |
1140 | | - <Core:ChangePropertyAction |
1141 | | - PropertyName="Visibility" |
1142 | | - TargetObject="{Binding ElementName=ButtonsStack}" |
1143 | | - Value="Collapsed" /> |
| 1161 | + <Media:ControlStoryboardAction> |
| 1162 | + <Media:ControlStoryboardAction.Storyboard> |
| 1163 | + <Storyboard> |
| 1164 | + <DoubleAnimation |
| 1165 | + Storyboard.TargetName="ButtonsStack" |
| 1166 | + Storyboard.TargetProperty="Opacity" |
| 1167 | + From="1" |
| 1168 | + To="0" |
| 1169 | + Duration="0:0:0.3" /> |
| 1170 | + <DoubleAnimation |
| 1171 | + EnableDependentAnimation="True" |
| 1172 | + Storyboard.TargetName="dropShadow" |
| 1173 | + Storyboard.TargetProperty="ShadowOpacity" |
| 1174 | + From="1" |
| 1175 | + To="0" |
| 1176 | + Duration="0:0:0.5" /> |
| 1177 | + </Storyboard> |
| 1178 | + </Media:ControlStoryboardAction.Storyboard> |
| 1179 | + </Media:ControlStoryboardAction> |
1144 | 1180 | <Core:ChangePropertyAction |
1145 | 1181 | PropertyName="Foreground" |
1146 | 1182 | TargetObject="{Binding ElementName=albumTitle}" |
|
1161 | 1197 | <Core:EventTriggerBehavior EventName="Holding"> |
1162 | 1198 | <Behaviours:OpenMenuFlyoutAction Parameter="{StaticResource AlbumArtistFlyout}" /> |
1163 | 1199 | </Core:EventTriggerBehavior> |
| 1200 | + <Core:EventTriggerBehavior EventName="PointerEntered"> |
| 1201 | + <Media:ControlStoryboardAction ControlStoryboardOption="Play"> |
| 1202 | + <Media:ControlStoryboardAction.Storyboard> |
| 1203 | + <Storyboard> |
| 1204 | + <DoubleAnimation |
| 1205 | + EnableDependentAnimation="True" |
| 1206 | + Storyboard.TargetName="dropShadow" |
| 1207 | + Storyboard.TargetProperty="ShadowOpacity" |
| 1208 | + From="0" |
| 1209 | + To="1" |
| 1210 | + Duration="0:0:0.5" /> |
| 1211 | + <DoubleAnimation |
| 1212 | + Storyboard.TargetName="ButtonsStack" |
| 1213 | + Storyboard.TargetProperty="Opacity" |
| 1214 | + From="0" |
| 1215 | + To="1" |
| 1216 | + Duration="0:0:0.5" /> |
| 1217 | + </Storyboard> |
| 1218 | + </Media:ControlStoryboardAction.Storyboard> |
| 1219 | + </Media:ControlStoryboardAction> |
| 1220 | + </Core:EventTriggerBehavior> |
| 1221 | + <Core:EventTriggerBehavior EventName="PointerExited"> |
| 1222 | + <Media:ControlStoryboardAction ControlStoryboardOption="Play"> |
| 1223 | + <Media:ControlStoryboardAction.Storyboard> |
| 1224 | + <Storyboard> |
| 1225 | + <DoubleAnimation |
| 1226 | + EnableDependentAnimation="True" |
| 1227 | + Storyboard.TargetName="dropShadow" |
| 1228 | + Storyboard.TargetProperty="ShadowOpacity" |
| 1229 | + From="1" |
| 1230 | + To="0" |
| 1231 | + Duration="0:0:0.5" /> |
| 1232 | + <DoubleAnimation |
| 1233 | + Storyboard.TargetName="ButtonsStack" |
| 1234 | + Storyboard.TargetProperty="Opacity" |
| 1235 | + From="1" |
| 1236 | + To="0" |
| 1237 | + Duration="0:0:0.5" /> |
| 1238 | + </Storyboard> |
| 1239 | + </Media:ControlStoryboardAction.Storyboard> |
| 1240 | + </Media:ControlStoryboardAction> |
| 1241 | + </Core:EventTriggerBehavior> |
1164 | 1242 | </Interactivity:Interaction.Behaviors> |
1165 | 1243 | </Grid> |
1166 | 1244 | </DataTemplate> |
|
0 commit comments