🚸 背景渐变色交互优化
This commit is contained in:
@@ -3,56 +3,72 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
CornerRadius="4"
|
CornerRadius="4"
|
||||||
Width="600"
|
|
||||||
Height="400"
|
|
||||||
Style="{StaticResource BorderBG}"
|
|
||||||
>
|
>
|
||||||
<hc:TransitioningContentControl TransitionMode="Fade">
|
<Grid>
|
||||||
<Grid>
|
<StackPanel>
|
||||||
<ListBox x:Name="GradientBGs"
|
<Grid Width="750"
|
||||||
|
Height="550"
|
||||||
|
Panel.ZIndex="0"
|
||||||
|
MouseDown="DragMove"
|
||||||
|
>
|
||||||
|
<Grid.Background>
|
||||||
|
<SolidColorBrush Color="Black" Opacity="0.01"/>
|
||||||
|
</Grid.Background>
|
||||||
|
</Grid>
|
||||||
|
<hc:TransitioningContentControl TransitionMode="Fade"
|
||||||
|
Panel.ZIndex="99"
|
||||||
|
Width="600"
|
||||||
|
Height="400"
|
||||||
|
Margin="0,-620,0,0">
|
||||||
|
<Border Style="{StaticResource BorderBG}">
|
||||||
|
<Grid>
|
||||||
|
<ListBox x:Name="GradientBGs"
|
||||||
ItemsSource="{Binding}"
|
ItemsSource="{Binding}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Margin="20,20,20,50"
|
Margin="20,20,20,50"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
>
|
>
|
||||||
<ListBox.ItemContainerStyle>
|
<ListBox.ItemContainerStyle>
|
||||||
<Style TargetType="ListBoxItem">
|
<Style TargetType="ListBoxItem">
|
||||||
<Setter Property="Margin" Value="10"/>
|
<Setter Property="Margin" Value="10"/>
|
||||||
<Setter Property="Effect" Value="{StaticResource EffectShadow2}"/>
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}"/>
|
||||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ListBox.ItemContainerStyle>
|
</ListBox.ItemContainerStyle>
|
||||||
<ListBox.ItemsPanel>
|
<ListBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<WrapPanel Background="Transparent"/>
|
<WrapPanel Background="Transparent"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ListBox.ItemsPanel>
|
</ListBox.ItemsPanel>
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Border CornerRadius="4" Width="100" Height="100"
|
<Border CornerRadius="4" Width="100" Height="100"
|
||||||
MouseLeftButtonDown="BGBorder_MouseLeftButtonDown"
|
MouseLeftButtonDown="BGBorder_MouseLeftButtonDown"
|
||||||
Tag="{Binding}">
|
Tag="{Binding}">
|
||||||
<Border.Background>
|
<Border.Background>
|
||||||
<LinearGradientBrush>
|
<LinearGradientBrush>
|
||||||
<GradientStop Offset="0" Color="{Binding Color1}"/>
|
<GradientStop Offset="0" Color="{Binding Color1}"/>
|
||||||
<GradientStop Offset="1" Color="{Binding Color2}"/>
|
<GradientStop Offset="1" Color="{Binding Color2}"/>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
</Border.Background>
|
</Border.Background>
|
||||||
<Border Width="100" Height="30" VerticalAlignment="Bottom">
|
<Border Width="100" Height="30" VerticalAlignment="Bottom">
|
||||||
<Border.Background>
|
<Border.Background>
|
||||||
<SolidColorBrush Color="Gray" Opacity="0.4"/>
|
<SolidColorBrush Color="Gray" Opacity="0.4"/>
|
||||||
</Border.Background>
|
</Border.Background>
|
||||||
<TextBlock Text="{Binding Name}" TextAlignment="Center" VerticalAlignment="Center" FontSize="17" FontWeight="Bold" Foreground="White"/>
|
<TextBlock Text="{Binding Name}" TextAlignment="Center" VerticalAlignment="Center" FontSize="17" FontWeight="Bold" Foreground="White"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
||||||
<Button Content="关闭" Style="{StaticResource Btn1}" Click="Close_Click" HorizontalAlignment="Stretch" Margin="524,360,-524,10" VerticalAlignment="Stretch"/>
|
<Button Content="关闭" Style="{StaticResource Btn1}" Click="Close_Click" HorizontalAlignment="Stretch" Margin="524,360,-524,10" VerticalAlignment="Stretch"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Border>
|
||||||
</hc:TransitioningContentControl>
|
|
||||||
|
</hc:TransitioningContentControl>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -3,7 +3,7 @@ using GeekDesk.ViewModel;
|
|||||||
using GeekDesk.ViewModel.Temp;
|
using GeekDesk.ViewModel.Temp;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace GeekDesk.Control.Other
|
namespace GeekDesk.Control.Other
|
||||||
{
|
{
|
||||||
@@ -31,5 +31,22 @@ namespace GeekDesk.Control.Other
|
|||||||
MainWindow.appData.AppConfig.GradientBGParam = bgParam;
|
MainWindow.appData.AppConfig.GradientBGParam = bgParam;
|
||||||
BGSettingUtil.BGSetting();
|
BGSettingUtil.BGSetting();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 移动窗口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void DragMove(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.LeftButton == MouseButtonState.Pressed)
|
||||||
|
{
|
||||||
|
Window.GetWindow(this).DragMove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,10 +13,9 @@ namespace GeekDesk.ViewModel.Temp
|
|||||||
//gradientBGParams = (ObservableCollection<GradientBGParam>)ConfigurationManager.GetSection("SystemBGs")
|
//gradientBGParams = (ObservableCollection<GradientBGParam>)ConfigurationManager.GetSection("SystemBGs")
|
||||||
gradientBGParams = new ObservableCollection<GradientBGParam>
|
gradientBGParams = new ObservableCollection<GradientBGParam>
|
||||||
{
|
{
|
||||||
new GradientBGParam("诸神黄昏", "#FCCF31", "#F55555"),
|
|
||||||
new GradientBGParam ("森林之友", "#EBF7E3", "#A8E4C0"),
|
|
||||||
new GradientBGParam("魅惑妖术", "#FFDDE1", "#EE9CA7"),
|
new GradientBGParam("魅惑妖术", "#FFDDE1", "#EE9CA7"),
|
||||||
new GradientBGParam("魅惑妖术", "#D2F6FF", "#91B0E4")
|
new GradientBGParam ("森林之友", "#EBF7E3", "#A8E4C0"),
|
||||||
|
new GradientBGParam("完美谢幕", "#D76D77", "#FFAF7B")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user