代码清理/拾色器功能/部分程序优化

This commit is contained in:
liufei
2022-05-20 15:39:52 +08:00
parent 5cfaf9a37d
commit d01a27b827
83 changed files with 1320 additions and 627 deletions

View File

@@ -0,0 +1,90 @@
<Window
x:Class="GeekDesk.Control.Windows.PixelColorPickerWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xml:lang="zh-CN"
WindowStyle="None"
AllowsTransparency="True"
PreviewMouseMove="Window_PreviewMouseMove"
MouseLeftButtonDown="Window_MouseLeftButtonDown"
MouseWheel="Window_MouseWheel"
>
<Window.Resources>
<Style x:Key="TextKey" TargetType="TextBlock">
<Setter Property="FontSize" Value="12"/>
</Style>
<Style x:Key="TextValue" TargetType="TextBlock">
<Setter Property="FontSize" Value="12"/>
<Setter Property="Margin" Value="10,0,0,0"/>
</Style>
</Window.Resources>
<Grid>
<Grid x:Name="DesktopBG">
<Grid.Background>
<ImageBrush Stretch="Fill"/>
</Grid.Background>
</Grid>
<Canvas HorizontalAlignment="Left" VerticalAlignment="Top" Background="Transparent">
<Canvas x:Name="ColorCanvas"
Width="185"
Height="160">
<Border Background="White"
CornerRadius="5"
>
<Grid>
<WrapPanel HorizontalAlignment="Center" Height="70" Margin="0,5,0,80">
<Border Width="70" Height="70"
BorderBrush="Black"
BorderThickness="1">
<Rectangle x:Name="PixelColor" StrokeThickness="0">
<Rectangle.Fill>
<SolidColorBrush />
</Rectangle.Fill>
</Rectangle>
</Border>
<Border x:Name="Pixel"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="70"
Height="70"
BorderBrush="Black"
BorderThickness="1"
Margin="20,0,0,0"
>
<Grid>
<Rectangle x:Name="PixelBG" StrokeThickness="0">
<Rectangle.Fill>
<VisualBrush ViewboxUnits="Absolute" Viewbox="0,0,20,20"
ViewportUnits="RelativeToBoundingBox" Viewport="0,0,1,1">
</VisualBrush>
</Rectangle.Fill>
</Rectangle>
<Border HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="6" Height="6"
BorderBrush="White" BorderThickness="0.6">
<Border Width="4.5" Height="4.5" BorderBrush="Black" BorderThickness="0.6"/>
</Border>
</Grid>
</Border>
</WrapPanel>
<WrapPanel HorizontalAlignment="Center" Height="80" Margin="0,85,0,5">
<StackPanel Width="100" Height="80">
<TextBlock Text="RGB:" Style="{StaticResource TextKey}"/>
<TextBlock x:Name="PixelColor_RGB" Style="{StaticResource TextValue}"/>
<TextBlock Text="HTML:" Margin="0,5,0,0" Style="{StaticResource TextKey}"/>
<TextBlock x:Name="PixelColor_HTML" Style="{StaticResource TextValue}"/>
</StackPanel>
<StackPanel Width="65" Height="80" Margin="10,0,0,0">
<TextBlock x:Name="Pixel_XY" TextAlignment="Right"/>
</StackPanel>
</WrapPanel>
</Grid>
</Border>
</Canvas>
</Canvas>
</Grid>
</Window>