Files
GeekDesk/Control/UserControls/Config/ThemeControl.xaml
2021-12-13 10:53:55 +08:00

153 lines
9.0 KiB
XML

<UserControl x:Class="GeekDesk.Control.UserControls.Config.ThemeControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:GeekDesk.Control.UserControls.Config"
xmlns:hc="https://handyorg.github.io/handycontrol"
mc:Ignorable="d"
Background="Transparent"
d:DesignHeight="500" d:DesignWidth="450">
<Grid>
<Grid MouseDown="DragMove" Background="Transparent">
<StackPanel Margin="20" >
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
<TextBlock Text="背景图片" VerticalAlignment="Center"/>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="20,0,0,0" Grid.ColumnSpan="4">
<TextBlock Text="图片路径:" VerticalAlignment="Center" Margin="0,5,0,0"/>
<TextBlock Text="{Binding BacImgName}" Width="200"
Margin="0,5,0,0"
VerticalAlignment="Center"
hc:Poptip.HitMode="None"
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
hc:Poptip.Content="{Binding BacImgName}"
hc:Poptip.Placement="TopLeft"
/>
<Button Content="修改" Click="BGButton_Click"/>
<Button Content="默认" Click="DefaultButton_Click"/>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="20,0,0,0" Grid.ColumnSpan="4">
<CheckBox x:Name="IconIsAdmin" Content="毛玻璃效果" IsChecked="{Binding BlurEffect}">
<CheckBox.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="#FF9EA3A6"/>
</LinearGradientBrush>
</CheckBox.Background>
</CheckBox>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="20,5,0,0" Grid.ColumnSpan="4">
<CheckBox x:Name="BarIcon" Content="显示托盘图标" IsChecked="{Binding ShowBarIcon}">
<CheckBox.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="#FF9EA3A6"/>
</LinearGradientBrush>
</CheckBox.Background>
</CheckBox>
</hc:UniformSpacingPanel>
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black" Grid.ColumnSpan="4"/>
<StackPanel>
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
<TextBlock Text="托盘不透明度" VerticalAlignment="Center"/>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
<hc:PreviewSlider Value="{Binding CardOpacity}"
Maximum="100"
Width="350"
>
<hc:PreviewSlider.PreviewContent>
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
</hc:PreviewSlider.PreviewContent>
</hc:PreviewSlider>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
<TextBlock Text="背景图片不透明度" VerticalAlignment="Center"/>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
<hc:PreviewSlider Value="{Binding BgOpacity}"
Maximum="100"
Width="350"
>
<hc:PreviewSlider.PreviewContent>
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
</hc:PreviewSlider.PreviewContent>
</hc:PreviewSlider>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
<TextBlock Text="主面板不透明度" VerticalAlignment="Center"/>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
<hc:PreviewSlider Value="{Binding PannelOpacity}"
Minimum="50"
Maximum="100"
Width="350"
>
<hc:PreviewSlider.PreviewContent>
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
</hc:PreviewSlider.PreviewContent>
</hc:PreviewSlider>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
<TextBlock Text="主面板圆角大小" VerticalAlignment="Center"/>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
<hc:PreviewSlider Value="{Binding PannelCornerRadius}"
Maximum="25"
Width="350"
>
<hc:PreviewSlider.PreviewContent>
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
</hc:PreviewSlider.PreviewContent>
</hc:PreviewSlider>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
<TextBlock Text="图标大小" VerticalAlignment="Center"/>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4"
Background="#00FFFFFF"
PreviewMouseLeftButtonDown="PreviewSlider_MouseLeftButtonUp"
>
<hc:PreviewSlider Value="{Binding ImageWidth, Mode=TwoWay}"
Minimum="40"
Maximum="60"
Width="350"
>
<hc:PreviewSlider.PreviewContent>
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
</hc:PreviewSlider.PreviewContent>
</hc:PreviewSlider>
</hc:UniformSpacingPanel>
</StackPanel>
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black" Grid.ColumnSpan="4"/>
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
<TextBlock VerticalAlignment="Center" Text="图标字体颜色:" />
<TextBlock VerticalAlignment="Center" Text="{Binding TextColor}" Width="100"/>
<Button Content="选择" Click="ColorButton_Click"/>
</hc:UniformSpacingPanel>
</StackPanel>
</Grid>
<StackPanel x:Name="ColorPanel" Visibility="Collapsed" VerticalAlignment="Center">
<StackPanel.Background>
<SolidColorBrush Color="AliceBlue" Opacity="0"/>
</StackPanel.Background>
<hc:ColorPicker
Name="ColorPicker"
Canceled="ColorPicker_Canceled"
SelectedColorChanged="ColorPicker_SelectedColorChanged"/>
</StackPanel>
</Grid>
</UserControl>