|
260 | 260 | <!--#region PluginStore Style-->
|
261 | 261 | <Style x:Key="StoreList" TargetType="ListBoxItem">
|
262 | 262 | <Setter Property="Background" Value="#ffffff" />
|
263 |
| - <Setter Property="Padding" Value="0 12 12 18" /> |
264 |
| - <Setter Property="Margin" Value="0 0 6 4" /> |
265 |
| - <Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
| 263 | + <Setter Property="Padding" Value="0 0 0 0" /> |
| 264 | + <Setter Property="Margin" Value="0 0 8 4" /> |
266 | 265 | <Setter Property="BorderBrush" Value="#e5e5e5" />
|
| 266 | + |
| 267 | + <!--#region Template for blue highlight win10--> |
| 268 | + <Setter Property="Template"> |
| 269 | + <Setter.Value> |
| 270 | + <ControlTemplate TargetType="{x:Type ListBoxItem}"> |
| 271 | + <Border x:Name="Bd" |
| 272 | + Background="{TemplateBinding Background}" |
| 273 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 274 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 275 | + Padding="{TemplateBinding Padding}" CornerRadius="5" |
| 276 | + SnapsToDevicePixels="True"> |
| 277 | + <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 278 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 279 | + Content="{TemplateBinding Content}" |
| 280 | + |
| 281 | + ContentStringFormat="{TemplateBinding ContentStringFormat}" |
| 282 | + ContentTemplate="{TemplateBinding ContentTemplate}" |
| 283 | + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
| 284 | + </Border> |
| 285 | + <ControlTemplate.Triggers> |
| 286 | + <MultiTrigger> |
| 287 | + <MultiTrigger.Conditions> |
| 288 | + <Condition Property="IsMouseOver" Value="True" /> |
| 289 | + </MultiTrigger.Conditions> |
| 290 | + <Setter TargetName="Bd" Property="Background" Value="#f6f6f6" /> |
| 291 | + <Setter TargetName="Bd" Property="BorderBrush" Value="#e5e5e5" /> |
| 292 | + <Setter TargetName="Bd" Property="CornerRadius" Value="5" /> |
| 293 | + |
| 294 | + </MultiTrigger> |
| 295 | + <MultiTrigger> |
| 296 | + <MultiTrigger.Conditions> |
| 297 | + <Condition Property="Selector.IsSelectionActive" Value="False" /> |
| 298 | + <Condition Property="IsSelected" Value="True" /> |
| 299 | + </MultiTrigger.Conditions> |
| 300 | + <Setter TargetName="Bd" Property="Background" Value="#ffffff" /> |
| 301 | + <Setter TargetName="Bd" Property="BorderBrush" Value="#e5e5e5" /> |
| 302 | + <Setter TargetName="Bd" Property="Margin" Value="0 0 0 0" /> |
| 303 | + |
| 304 | + |
| 305 | + </MultiTrigger> |
| 306 | + <MultiTrigger> |
| 307 | + <MultiTrigger.Conditions> |
| 308 | + <Condition Property="Selector.IsSelectionActive" Value="True" /> |
| 309 | + <Condition Property="IsSelected" Value="True" /> |
| 310 | + </MultiTrigger.Conditions> |
| 311 | + <Setter TargetName="Bd" Property="Background" Value="#ffffff" /> |
| 312 | + <Setter TargetName="Bd" Property="BorderBrush" Value="#e5e5e5" /> |
| 313 | + <Setter TargetName="Bd" Property="CornerRadius" Value="5" /> |
| 314 | + <Setter TargetName="Bd" Property="Margin" Value="0 0 0 0" /> |
| 315 | + |
| 316 | + |
| 317 | + </MultiTrigger> |
| 318 | + <Trigger Property="IsEnabled" Value="False"> |
| 319 | + <Setter TargetName="Bd" Property="TextElement.Foreground" |
| 320 | + Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" /> |
| 321 | + </Trigger> |
| 322 | + </ControlTemplate.Triggers> |
| 323 | + </ControlTemplate> |
| 324 | + </Setter.Value> |
| 325 | + </Setter> |
| 326 | + <!--#endregion--> |
267 | 327 | </Style>
|
268 | 328 |
|
269 | 329 | </Window.Resources>
|
|
785 | 845 | Padding="0 0 0 0" Width="Auto" VerticalContentAlignment="Center" HorizontalAlignment="Stretch">
|
786 | 846 | <ListBox.ItemsPanel>
|
787 | 847 | <ItemsPanelTemplate>
|
788 |
| - <WrapPanel ItemHeight="100" |
789 |
| - ItemWidth="390" |
790 |
| - Orientation="Horizontal" VerticalAlignment="Center"/> |
| 848 | + <WrapPanel ItemHeight="100" ItemWidth="390" Margin="0"/> |
791 | 849 | </ItemsPanelTemplate>
|
792 | 850 | </ListBox.ItemsPanel>
|
793 | 851 | <ListBox.ItemTemplate>
|
794 | 852 | <DataTemplate>
|
795 |
| - <Grid HorizontalAlignment="Left" VerticalAlignment="Center"> |
796 |
| - <Grid.ColumnDefinitions> |
797 |
| - <ColumnDefinition Width="72"/> |
798 |
| - <ColumnDefinition Width="*" /> |
799 |
| - </Grid.ColumnDefinitions> |
800 |
| - <StackPanel Grid.Column="0" Margin="0 0 0 0" |
| 853 | + <!-- Hover Layout Style--> |
| 854 | + <Border x:Name="HoverArea" Padding="0" MinWidth="390" BorderBrush="Black" BorderThickness="0" Background="Transparent" > |
| 855 | + <Grid HorizontalAlignment="Left" VerticalAlignment="Center"> |
| 856 | + <Grid.ColumnDefinitions> |
| 857 | + <ColumnDefinition Width="72"/> |
| 858 | + <ColumnDefinition Width="*" /> |
| 859 | + </Grid.ColumnDefinitions> |
| 860 | + <StackPanel Grid.Column="0" Margin="0 0 0 0" |
801 | 861 | VerticalAlignment="Center" >
|
802 |
| - <Image Source="{Binding Image, IsAsync=True}" |
| 862 | + <StackPanel.Style> |
| 863 | + <Style> |
| 864 | + <Setter Property="StackPanel.Visibility" Value="Visible"></Setter> |
| 865 | + <Style.Triggers> |
| 866 | + <DataTrigger Binding="{Binding Mode=TwoWay, Path=IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" Value="true"> |
| 867 | + <Setter Property="StackPanel.Opacity" Value="1"></Setter> |
| 868 | + </DataTrigger> |
| 869 | + </Style.Triggers> |
| 870 | + </Style> |
| 871 | + </StackPanel.Style> |
| 872 | + <Image Source="{Binding Image, IsAsync=True}" |
803 | 873 | Width="32" Height="32" Margin="8 0 6 0"
|
804 | 874 | VerticalAlignment="Center"/>
|
805 | 875 | </StackPanel>
|
806 |
| - <StackPanel Grid.Column="1" Margin="0 0 8 0" VerticalAlignment="Center"> |
807 |
| - <TextBlock Text="{Binding PluginPair.Metadata.Name}" |
808 |
| - TextWrapping="WrapWithOverflow" |
| 876 | + <StackPanel Grid.Column="1" Margin="0 0 8 0" VerticalAlignment="Center" Panel.ZIndex="0"> |
| 877 | + <StackPanel.Style> |
| 878 | + <Style> |
| 879 | + <Setter Property="StackPanel.Visibility" Value="Visible"></Setter> |
| 880 | + <Style.Triggers> |
| 881 | + <DataTrigger Binding="{Binding Mode=TwoWay, Path=IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" Value="true"> |
| 882 | + <Setter Property="StackPanel.Opacity" Value="1"></Setter> |
| 883 | + </DataTrigger> |
| 884 | + </Style.Triggers> |
| 885 | + </Style> |
| 886 | + </StackPanel.Style> |
| 887 | + <TextBlock Text="{Binding PluginPair.Metadata.Name}" |
| 888 | + TextWrapping="WrapWithOverflow" Padding="0 0 20 0" |
809 | 889 | ToolTip="{Binding PluginPair.Metadata.Version}" />
|
810 |
| - <TextBlock Opacity="0.5" TextWrapping="Wrap" Margin="0 2 0 0"> |
| 890 | + <TextBlock Opacity="0.5" TextWrapping="Wrap" Margin="0 2 0 0" Padding="0 0 20 0"> |
811 | 891 | <Run Text="{Binding PluginPair.Metadata.Description}" FontSize="12" />
|
812 |
| - </TextBlock> |
813 |
| - </StackPanel> |
| 892 | + </TextBlock> |
814 | 893 |
|
815 |
| - </Grid> |
| 894 | + </StackPanel> |
| 895 | + <StackPanel Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch"> |
| 896 | + <StackPanel.Style> |
| 897 | + <Style> |
| 898 | + <Setter Property="StackPanel.Visibility" Value="Collapsed"></Setter> |
| 899 | + <Style.Triggers> |
| 900 | + <DataTrigger Binding="{Binding Mode=TwoWay, Path=IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" Value="true"> |
| 901 | + <Setter Property="StackPanel.Visibility" Value="Visible"></Setter> |
| 902 | + </DataTrigger> |
| 903 | + </Style.Triggers> |
| 904 | + </Style> |
| 905 | + </StackPanel.Style> |
| 906 | + |
| 907 | + |
| 908 | + <Grid Width="390" Height="100" HorizontalAlignment="Center" Panel.ZIndex="1"> |
| 909 | + <Grid.Background> |
| 910 | + <SolidColorBrush Color="#f6f6f6" Opacity=".8"/> |
| 911 | + </Grid.Background> |
| 912 | + <Button Foreground="Black" Name="ShortCutButtonPrev" Content="Install" Width="120" MinHeight="50" VerticalAlignment="Center"> |
| 913 | + <Button.Style> |
| 914 | + <Style> |
| 915 | + <Setter Property="Button.Visibility" Value="Collapsed"></Setter> |
| 916 | + <Style.Triggers> |
| 917 | + <DataTrigger Binding="{Binding Mode=TwoWay, Path=IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" Value="true"> |
| 918 | + <Setter Property="Button.Visibility" Value="Visible"></Setter> |
| 919 | + </DataTrigger> |
| 920 | + </Style.Triggers> |
| 921 | + </Style> |
| 922 | + </Button.Style> |
| 923 | + </Button> |
| 924 | + </Grid> |
| 925 | + </StackPanel> |
| 926 | + </Grid> |
| 927 | + |
| 928 | + |
| 929 | + </Border> |
816 | 930 |
|
817 | 931 |
|
818 | 932 | </DataTemplate>
|
|
0 commit comments