123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <UserControl x:Class="ComPDFKitDemo.AnntControl.ColorDropBoxPop"
- 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:ComPDFKitDemo.AnntControl"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800" Width="194" Height="243">
- <UserControl.Resources>
- <local:ColorToBrushConverter x:Key="ColorToBrushConverter"></local:ColorToBrushConverter>
- <Style TargetType="ListViewItem">
- <Setter Property="Width" Value="15" ></Setter>
- <Setter Property="Height" Value="15" ></Setter>
- <Setter Property="Padding" Value="0"></Setter>
- <Setter Property="BorderThickness" Value="1"></Setter>
- <Setter Property="BorderBrush" Value="#33000000"></Setter>
- <Setter Property="Margin" Value="1"></Setter>
- </Style>
- </UserControl.Resources>
- <Grid>
- <Border Background="White" Name="ContainerBorder" BorderThickness="1">
- <Border.Effect>
- <DropShadowEffect Color="#000000" ShadowDepth="0" BlurRadius="24" Opacity="0.22">
- </DropShadowEffect>
- </Border.Effect>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
- <TextBlock FontFamily="SegoeUI" FontSize="14" LineHeight="20" Margin="8,2,0,3">Recently used color</TextBlock>
- <ListView Grid.Row="1" BorderThickness="0" Name="RecentlyColorList" Margin="9,0,9,0" ScrollViewer.HorizontalScrollBarVisibility="Hidden">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Width="{Binding ElementName=ThemeColorList,Path=ActualWidth}">
- </WrapPanel>
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Rectangle Width="14" Height="14" Fill="{Binding Converter={StaticResource ColorToBrushConverter}}" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown"></Rectangle>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- <TextBlock Grid.Row="2" FontFamily="SegoeUI" FontSize="14" LineHeight="20" Margin="8,2,0,3">Theme colors</TextBlock>
- <ListView Grid.Row="3" BorderThickness="0" Name="ThemeColorList" Margin="9,0,9,0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" SelectionMode="Single">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Width="{Binding ElementName=ThemeColorList,Path=ActualWidth}">
- </WrapPanel>
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Rectangle Width="14" Height="14" Fill="{Binding Converter={StaticResource ColorToBrushConverter}}" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown"></Rectangle>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- <StackPanel Orientation="Horizontal" Grid.Row="4">
- <Rectangle Width="16" Height="16" Margin="8,0,2,0" MouseLeftButtonDown="TransparentColor_MouseLeftButtonDown">
- <Rectangle.Fill>
- <DrawingBrush>
- <DrawingBrush.Drawing>
- <DrawingGroup>
- <GeometryDrawing Brush="White">
- <GeometryDrawing.Pen>
- <Pen Thickness="1" Brush="#E2E3E6"></Pen>
- </GeometryDrawing.Pen>
- <GeometryDrawing.Geometry>
- <RectangleGeometry Rect="0,0,16,16"></RectangleGeometry>
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- <GeometryDrawing>
- <GeometryDrawing.Pen>
- <Pen Thickness="2" Brush="#FF3B30"></Pen>
- </GeometryDrawing.Pen>
- <GeometryDrawing.Geometry>
- <LineGeometry StartPoint="16,0" EndPoint="0,16"></LineGeometry>
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingGroup>
- </DrawingBrush.Drawing>
- </DrawingBrush>
- </Rectangle.Fill>
- </Rectangle>
- <TextBlock FontFamily="SegoeUI" FontSize="14" LineHeight="20" VerticalAlignment="Center">Transparent</TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Grid.Row="5" MouseDown="SystemColorPicker_ClickPop" Margin="0,8,0,0">
- <Ellipse Width="16" Height="16" Margin="5,0,0,0" VerticalAlignment="Center">
- <Ellipse.Fill>
- <DrawingBrush>
- <DrawingBrush.Drawing>
- <ImageDrawing ImageSource="../Resources/colorIcon.png">
- <ImageDrawing.Rect>
- <Rect Width="16" Height="16"></Rect>
- </ImageDrawing.Rect>
- </ImageDrawing>
- </DrawingBrush.Drawing>
- </DrawingBrush>
- </Ellipse.Fill>
- </Ellipse>
- <TextBlock VerticalAlignment="Center" Padding="4,4,0,0" FontFamily="SegoeUI" FontSize="14" LineHeight="20">Other Colors</TextBlock>
- </StackPanel>
- </Grid>
- </Border>
- </Grid>
- </UserControl>
|