123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- <annotview:StickyPopupExt
- x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.StickyNotePopup"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:annotview="clr-namespace:ComPDFKitViewer;assembly=ComPDFKit.Viewer"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
- d:DataContext="{d:DesignInstance Type=viewmodels:StickyNotePopupViewModel}"
- d:DesignHeight="450"
- d:DesignWidth="800"
- prism:ViewModelLocator.AutoWireViewModel="True"
- Background="Transparent"
- mc:Ignorable="d">
- <annotview:StickyPopupExt.Resources>
- <DataTemplate x:Key="listboxData">
- <Ellipse
- Width="20"
- Height="20"
- Fill="{Binding Color}"
- Stroke="{StaticResource color.sys.layout.divider}"
- StrokeThickness="1" />
- </DataTemplate>
- <Style x:Key="listboxItemStyle" TargetType="{x:Type ListBoxItem}">
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="Height" Value="32" />
- <Setter Property="Width" Value="32" />
- <Setter Property="Margin" Value="2,0,2,0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ContentControl}">
- <Border
- x:Name="border"
- Padding="0,0"
- Background="{TemplateBinding Background}"
- CornerRadius="4">
- <ContentPresenter />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="#e2e3e5" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="False">
- <Setter Property="Background" Value="Transparent" />
- </Trigger>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="#e2e3e5" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </annotview:StickyPopupExt.Resources>
- <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown" DataContext="{x:Null}">
- <Border
- x:Name="border"
- Width="240"
- Height="200"
- MinWidth="240"
- MinHeight="200"
- Background="{StaticResource color.sys.layout.anti}"
- BorderBrush="#ffe49a"
- BorderThickness="2"
- CornerRadius="8">
- <Border.Effect>
- <DropShadowEffect
- BlurRadius="8"
- Direction="0"
- Opacity="0.16"
- ShadowDepth="0"
- Color="#000000" />
- </Border.Effect>
- <Grid
- Name="GridUi"
- Width="240"
- Height="200"
- MinWidth="240"
- MinHeight="200"
- Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition Height="32" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <Grid Margin="8,0,8,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="AuthorText"
- Grid.Column="1"
- Margin="2,2,0,0"
- VerticalAlignment="Center"
- FontFamily="SegoeUI"
- FontSize="12"
- LineHeight="16"
- Text="{Binding AuthorText}" />
- <TextBlock
- Name="DateText"
- Grid.Column="3"
- Margin="0,-2,0,0"
- VerticalAlignment="Center"
- FontFamily="SegoeUI"
- FontSize="12"
- Foreground="{StaticResource color.sys.text.neutral.lv2}"
- LineHeight="16"
- Text="{Binding DateText}" />
- <Border
- Grid.Column="4"
- Margin="0,-8,-3,0"
- Background="#01000000"
- MouseUp="CloseText_MouseUp"
- Visibility="Collapsed">
- <Path
- Width="16"
- Height="16"
- Fill="#000000">
- <Path.Data>
- M9.48528137,2.98528137 L9.48428137,8.48428137 L14.9852814,8.48528137 L14.9852814,9.48528137 L9.48428137,9.48428137 L9.48528137,14.9852814 L8.48528137,14.9852814 L8.48428137,9.48428137 L2.98528137,9.48528137 L2.98528137,8.48528137 L8.48428137,8.48428137 L8.48528137,2.98528137 L9.48528137,2.98528137 Z
- </Path.Data>
- <Path.LayoutTransform>
- <RotateTransform Angle="45" />
- </Path.LayoutTransform>
- </Path>
- </Border>
- </Grid>
- <Rectangle
- Height="1"
- Margin="8,0,8,0"
- VerticalAlignment="Bottom"
- Fill="{StaticResource color.sys.layout.divider}" />
- <TextBox
- x:Name="ContentText"
- Grid.Row="2"
- Margin="4,0,4,0"
- Padding="2,4,0,0"
- AcceptsReturn="True"
- Background="#CCFFFFFF"
- BorderThickness="0"
- Text="{Binding ContentText}"
- TextWrapping="Wrap"
- VerticalScrollBarVisibility="Auto" />
- <Grid Grid.Row="3">
- <ListBox
- x:Name="ListColor"
- Background="Transparent"
- BorderThickness="0"
- ItemContainerStyle="{StaticResource listboxItemStyle}"
- ItemTemplate="{StaticResource listboxData}"
- SelectionChanged="ListColor_SelectionChanged">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- </ListBox>
- </Grid>
- <Button
- x:Name="BtnDelete"
- Grid.Row="3"
- Width="32"
- Height="32"
- MaxHeight="40"
- Margin="16,0,10,5"
- HorizontalAlignment="Right"
- BorderThickness="0"
- Click="BtnDelete_Click"
- Foreground="#6B6F7D"
- Style="{StaticResource btn.sec}">
- <Path
- Width="32"
- Height="32"
- Data="M14 9.75H18V8.25H14V9.75ZM9 12.25H10.25V23C10.25 23.4142 10.5858 23.75 11 23.75H21C21.4142 23.75 21.75 23.4142 21.75 23V12.25H23V10.75H9V12.25ZM11.75 22.25V12.25H20.25V22.25H11.75ZM15.25 14.5V19.5H16.75V14.5H15.25Z"
- Fill="{Binding ElementName=BtnDelete, Path=Foreground}" />
- </Button>
- <ResizeGrip
- Name="GripControl"
- Grid.Row="3"
- Margin="0,2,0,0"
- HorizontalAlignment="Right"
- Cursor="SizeNWSE"
- MouseMove="ResizeGrip_MouseMove"
- Visibility="Collapsed" />
- </Grid>
- </Border>
- </Grid>
- </annotview:StickyPopupExt>
|