|
@@ -7,6 +7,7 @@
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
|
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
|
xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
|
|
xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
|
|
|
|
+ xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF"
|
|
mc:Ignorable="d"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800"
|
|
d:DesignHeight="450" d:DesignWidth="800"
|
|
>
|
|
>
|
|
@@ -37,6 +38,25 @@
|
|
</Setter>
|
|
</Setter>
|
|
</Style>
|
|
</Style>
|
|
|
|
|
|
|
|
+ <Style x:Key="SearchListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
|
|
|
|
+ <Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="{x:Type ListBoxItem}">
|
|
|
|
+ <Border>
|
|
|
|
+ <Border.Style>
|
|
|
|
+ <Style TargetType="Border">
|
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
+ </Style>
|
|
|
|
+ </Border.Style>
|
|
|
|
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
|
|
+ </Border>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
|
|
+
|
|
<Storyboard x:Key="Custom1Transition1" x:Shared="False">
|
|
<Storyboard x:Key="Custom1Transition1" x:Shared="False">
|
|
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
|
|
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
|
|
<DoubleAnimation.EasingFunction>
|
|
<DoubleAnimation.EasingFunction>
|
|
@@ -53,7 +73,7 @@
|
|
</Storyboard>
|
|
</Storyboard>
|
|
|
|
|
|
<Storyboard x:Key="Custom3Transition3" x:Shared="False">
|
|
<Storyboard x:Key="Custom3Transition3" x:Shared="False">
|
|
- <DoubleAnimation From=".8" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
|
|
|
|
|
|
+ <DoubleAnimation From=".8" To="1" Duration="0:0:0.4">
|
|
<DoubleAnimation.EasingFunction>
|
|
<DoubleAnimation.EasingFunction>
|
|
<ElasticEase Oscillations="1"/>
|
|
<ElasticEase Oscillations="1"/>
|
|
</DoubleAnimation.EasingFunction>
|
|
</DoubleAnimation.EasingFunction>
|
|
@@ -93,12 +113,13 @@
|
|
VirtualizingPanel.IsVirtualizing="True"
|
|
VirtualizingPanel.IsVirtualizing="True"
|
|
VirtualizingPanel.IsContainerVirtualizable="True"
|
|
VirtualizingPanel.IsContainerVirtualizable="True"
|
|
>
|
|
>
|
|
- <UniformGrid x:Name="WrapUFG">
|
|
|
|
- <hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom3Transition3}">
|
|
|
|
- <ListBox x:Name="IconListBox" ItemsSource="{Binding AppConfig.SelectedMenuIcons, Mode=OneWay}"
|
|
|
|
- BorderThickness="0"
|
|
|
|
- Padding="0,10,0,0"
|
|
|
|
- >
|
|
|
|
|
|
+ <UniformGrid x:Name="WrapUFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=Visibility}">
|
|
|
|
+ <!--<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom3Transition3}">-->
|
|
|
|
+ <ListBox x:Name="IconListBox"
|
|
|
|
+ ItemsSource="{Binding AppConfig.SelectedMenuIcons, Mode=OneWay}"
|
|
|
|
+ BorderThickness="0"
|
|
|
|
+ Padding="0,10,0,0"
|
|
|
|
+ >
|
|
<ListBox.Background>
|
|
<ListBox.Background>
|
|
<SolidColorBrush Opacity="0"/>
|
|
<SolidColorBrush Opacity="0"/>
|
|
</ListBox.Background>
|
|
</ListBox.Background>
|
|
@@ -133,41 +154,42 @@
|
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<DataTemplate>
|
|
- <hc:SimpleStackPanel Tag="{Binding}"
|
|
|
|
- Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight, Mode=OneWay}"
|
|
|
|
- Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}"
|
|
|
|
- HorizontalAlignment="Center"
|
|
|
|
- hc:Poptip.Content="{Binding Content}"
|
|
|
|
- hc:Poptip.Placement="BottomLeft"
|
|
|
|
- Background="#00FFFFFF"
|
|
|
|
- MouseEnter="StackPanel_MouseEnter"
|
|
|
|
- MouseLeave="StackPanel_MouseLeave"
|
|
|
|
- MouseLeftButtonDown="Icon_MouseLeftButtonDown"
|
|
|
|
- MouseLeftButtonUp="Icon_MouseLeftButtonUp"
|
|
|
|
- >
|
|
|
|
- <!--<StackPanel Background="#00FFFFFF"
|
|
|
|
- MouseEnter="CursorPanel_MouseEnter"
|
|
|
|
- MouseLeave="CursorPanel_MouseLeave"
|
|
|
|
- Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}">-->
|
|
|
|
- <Image Style="{StaticResource ImageStyle}"
|
|
|
|
- RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
|
|
- <TextBlock MaxWidth="80"
|
|
|
|
- Margin="0,5,0,0"
|
|
|
|
- MaxHeight="40"
|
|
|
|
- FontSize="13"
|
|
|
|
- TextWrapping="Wrap"
|
|
|
|
- TextTrimming="WordEllipsis"
|
|
|
|
- TextAlignment="Center"
|
|
|
|
- VerticalAlignment="Center"
|
|
|
|
- Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
|
|
|
|
- Text="{Binding Name}"/>
|
|
|
|
- <!--</StackPanel>-->
|
|
|
|
|
|
+
|
|
|
|
+ <hc:SimpleStackPanel Tag="{Binding}"
|
|
|
|
+ Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight, Mode=OneWay}"
|
|
|
|
+ Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}"
|
|
|
|
+ HorizontalAlignment="Center"
|
|
|
|
+ hc:Poptip.Content="{Binding Content}"
|
|
|
|
+ hc:Poptip.Placement="BottomLeft"
|
|
|
|
+ Background="#00FFFFFF"
|
|
|
|
+ MouseEnter="StackPanel_MouseEnter"
|
|
|
|
+ MouseLeave="StackPanel_MouseLeave"
|
|
|
|
+ MouseLeftButtonDown="Icon_MouseLeftButtonDown"
|
|
|
|
+ MouseLeftButtonUp="Icon_MouseLeftButtonUp"
|
|
|
|
+ >
|
|
|
|
+ <!--<StackPanel Background="#00FFFFFF"
|
|
|
|
+ MouseEnter="CursorPanel_MouseEnter"
|
|
|
|
+ MouseLeave="CursorPanel_MouseLeave"
|
|
|
|
+ Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}">-->
|
|
|
|
+ <Image Style="{StaticResource ImageStyle}"
|
|
|
|
+ RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
|
|
+ <TextBlock MaxWidth="80"
|
|
|
|
+ Margin="0,5,0,0"
|
|
|
|
+ MaxHeight="40"
|
|
|
|
+ FontSize="13"
|
|
|
|
+ TextWrapping="Wrap"
|
|
|
|
+ TextTrimming="WordEllipsis"
|
|
|
|
+ TextAlignment="Center"
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
|
|
|
|
+ Text="{Binding Name}"/>
|
|
|
|
+ <!--</StackPanel>-->
|
|
|
|
|
|
- </hc:SimpleStackPanel>
|
|
|
|
|
|
+ </hc:SimpleStackPanel>
|
|
</DataTemplate>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</ListBox>
|
|
- </hc:TransitioningContentControl>
|
|
|
|
|
|
+ <!--</hc:TransitioningContentControl>-->
|
|
</UniformGrid>
|
|
</UniformGrid>
|
|
</WrapPanel>
|
|
</WrapPanel>
|
|
|
|
|
|
@@ -194,12 +216,14 @@
|
|
VirtualizingPanel.IsVirtualizing="True"
|
|
VirtualizingPanel.IsVirtualizing="True"
|
|
VirtualizingPanel.IsContainerVirtualizable="True"
|
|
VirtualizingPanel.IsContainerVirtualizable="True"
|
|
>
|
|
>
|
|
- <UniformGrid x:Name="VerticalUFG">
|
|
|
|
- <hc:TransitioningContentControl TransitionMode="Left2RightWithFade">
|
|
|
|
|
|
+ <UniformGrid x:Name="VerticalUFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, OffsetY= -10, Event=Visibility}">
|
|
|
|
+ <!--<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">-->
|
|
<ListBox ItemsSource="{Binding Source={StaticResource SearchIconList},Path=IconList}"
|
|
<ListBox ItemsSource="{Binding Source={StaticResource SearchIconList},Path=IconList}"
|
|
- BorderThickness="0"
|
|
|
|
- Padding="0,10,0,0"
|
|
|
|
- >
|
|
|
|
|
|
+ BorderThickness="0"
|
|
|
|
+ Padding="0,10,0,0"
|
|
|
|
+ x:Name="SearchListBox"
|
|
|
|
+ SelectionChanged="SearchListBox_SelectionChanged"
|
|
|
|
+ >
|
|
<ListBox.Background>
|
|
<ListBox.Background>
|
|
<SolidColorBrush Opacity="0"/>
|
|
<SolidColorBrush Opacity="0"/>
|
|
</ListBox.Background>
|
|
</ListBox.Background>
|
|
@@ -216,7 +240,7 @@
|
|
</ListBox.Resources>
|
|
</ListBox.Resources>
|
|
|
|
|
|
<ListBox.ItemContainerStyle>
|
|
<ListBox.ItemContainerStyle>
|
|
- <Style TargetType="ListBoxItem" BasedOn="{StaticResource MyListBoxItemStyle}">
|
|
|
|
|
|
+ <Style TargetType="ListBoxItem" BasedOn="{StaticResource SearchListBoxItemStyle}">
|
|
<Setter Property="ContextMenu" Value="{StaticResource IconDialog}"/>
|
|
<Setter Property="ContextMenu" Value="{StaticResource IconDialog}"/>
|
|
</Style>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
</ListBox.ItemContainerStyle>
|
|
@@ -231,36 +255,54 @@
|
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<DataTemplate>
|
|
|
|
+ <Border CornerRadius="8">
|
|
|
|
+ <Border.Style>
|
|
|
|
+ <Style TargetType="Border">
|
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
+ <Style.Triggers>
|
|
|
|
+ <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem }}}"
|
|
|
|
+ Value="True">
|
|
|
|
+ <Setter Property="Background">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <SolidColorBrush Color="White" Opacity="0.68"/>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </DataTrigger>
|
|
|
|
+ </Style.Triggers>
|
|
|
|
+ </Style>
|
|
|
|
+ </Border.Style>
|
|
<WrapPanel Tag="{Binding}"
|
|
<WrapPanel Tag="{Binding}"
|
|
- Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"
|
|
|
|
- Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.MenuCardWidth, Mode=OneWay, Converter={StaticResource SearchResWidth}, ConverterParameter=2}"
|
|
|
|
- HorizontalAlignment="Left"
|
|
|
|
- hc:Poptip.HitMode="None"
|
|
|
|
- hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
|
|
|
- hc:Poptip.Content="{Binding Content}"
|
|
|
|
- hc:Poptip.Placement="BottomLeft"
|
|
|
|
- Background="#00FFFFFF"
|
|
|
|
- MouseLeftButtonDown="Icon_MouseLeftButtonDown"
|
|
|
|
- MouseLeftButtonUp="Icon_MouseLeftButtonUp"
|
|
|
|
- Margin="25,20,0,0"
|
|
|
|
- >
|
|
|
|
|
|
+ Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"
|
|
|
|
+ Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.MenuCardWidth, Mode=OneWay, Converter={StaticResource SearchResWidth}, ConverterParameter=2}"
|
|
|
|
+ HorizontalAlignment="Left"
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ hc:Poptip.HitMode="None"
|
|
|
|
+ hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
|
|
|
+ hc:Poptip.Content="{Binding Content}"
|
|
|
|
+ hc:Poptip.Placement="BottomLeft"
|
|
|
|
+ Background="#00FFFFFF"
|
|
|
|
+ MouseLeftButtonDown="Icon_MouseLeftButtonDown"
|
|
|
|
+ MouseLeftButtonUp="Icon_MouseLeftButtonUp"
|
|
|
|
+ Margin="25,10,0,10"
|
|
|
|
+ >
|
|
<Image Style="{StaticResource ImageStyle}" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image Style="{StaticResource ImageStyle}" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<TextBlock
|
|
<TextBlock
|
|
- Margin="10,5,0,0"
|
|
|
|
- MaxHeight="40"
|
|
|
|
- FontSize="13"
|
|
|
|
- TextWrapping="Wrap"
|
|
|
|
- TextTrimming="WordEllipsis"
|
|
|
|
- TextAlignment="Left"
|
|
|
|
- VerticalAlignment="Center"
|
|
|
|
- Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
|
|
|
|
- Text="{Binding Name}"/>
|
|
|
|
|
|
+ Margin="10,5,0,0"
|
|
|
|
+ MaxHeight="40"
|
|
|
|
+ FontSize="13"
|
|
|
|
+ TextWrapping="Wrap"
|
|
|
|
+ TextTrimming="WordEllipsis"
|
|
|
|
+ TextAlignment="Left"
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
|
|
|
|
+ Text="{Binding Name}"/>
|
|
</WrapPanel>
|
|
</WrapPanel>
|
|
|
|
+ </Border>
|
|
</DataTemplate>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</ListBox>
|
|
|
|
|
|
- </hc:TransitioningContentControl>
|
|
|
|
|
|
+ <!--</hc:TransitioningContentControl>-->
|
|
</UniformGrid>
|
|
</UniformGrid>
|
|
</WrapPanel>
|
|
</WrapPanel>
|
|
|
|
|