123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <UserControl x:Class="PDF_Office.Views.HomePanel.RecentFiles.DocItemListViewControl"
- 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:PDF_Office.Views.HomePanel"
- xmlns:convert="clr-namespace:PDF_Office.DataConvert"
- mc:Ignorable="d"
- x:Name="usercontrol"
- d:DesignHeight="450" d:DesignWidth="800"
- MouseEnter="UserControl_MouseEnter"
- MouseLeave="UserControl_MouseLeave"
- MouseMove="UserControl_MouseMove"
- >
- <!--xmlns:convert="clr-namespace:PDFReader_WPF.DataConvert"-->
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <!--<ResourceDictionary Source="../../Resources/Style/OtherControlStyle.xaml"/>-->
- </ResourceDictionary.MergedDictionaries>
- <convert:BoolToVisible x:Key="BoolToVisibleConvert"/>
- <convert:DateTimeToStringConvert x:Key="DateTimeToStringConvert"/>
- <convert:FilePathToSizeConvert x:Key="FilePathToSizeConvert"/>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid HorizontalAlignment="Stretch" Loaded="Grid_Loaded" DataContext="{Binding}" ToolTip="{Binding FilePath}">
- <Grid.Background>
- <SolidColorBrush Color="White" Opacity="0.01"/>
- </Grid.Background>
- <Grid x:Name="FileInfoGrid" Height="72" HorizontalAlignment="Stretch">
- <Grid.ColumnDefinitions>
- <ColumnDefinition MinWidth="0" Width ="4.5*"/>
- <ColumnDefinition Width="3*" />
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="100"/>
- </Grid.ColumnDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <!--Source="{Binding FileName,Converter={StaticResource FileFormatToIconConvert}}"-->
- <Image x:Name="CoverImage" HorizontalAlignment="Left" Width="32" Height="32" RenderOptions.BitmapScalingMode="HighQuality" UseLayoutRounding="True"/>
- <TextBlock x:Name="FileName" Grid.Column="1" Margin="8,0,0,0" VerticalAlignment="Center" Text="{Binding FileName}" FontSize="16" Foreground="Black" HorizontalAlignment="Stretch" TextTrimming="WordEllipsis"/>
- </Grid>
-
-
- <Grid Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
- <TextBlock x:Name="lastOpenTime" Grid.Column="1" Text="{Binding LastOpenTime,Converter={StaticResource DateTimeToStringConvert}}"
- Foreground="#FF666666" FontSize="14"
- HorizontalAlignment="Center" VerticalAlignment="Center" TextTrimming="WordEllipsis"
- />
- <!--Text="{Binding LastOpenTime,Converter={StaticResource DateTimeToStringConvert}}"-->
- <TextBlock Grid.Column="2" Text="{Binding FilePath,Converter={StaticResource FilePathToSizeConvert}}"
- Foreground="#FF666666" FontSize="14"
- HorizontalAlignment="Center" VerticalAlignment="Center"
- />
- <!--Text="{Binding FilePath,Converter={StaticResource FilePathToSizeConvert}}"-->
- <StackPanel x:Name="BtnPanel" Margin="0,0,12,0" Grid.Column="3"
- Orientation="Horizontal" HorizontalAlignment="Right"
- >
- <!--Visibility="{Binding ElementName=usercontrol,Path=IsHoverState,Mode=OneWay,Converter={StaticResource BoolToVisibleConvert}}"-->
- <Grid x:Name="DeleteGrid" Height="40" Background="Transparent" HorizontalAlignment="Right" Visibility="{Binding ElementName=usercontrol,Path=IsHoverState,Mode=OneWay,Converter={StaticResource BoolToVisibleConvert}}">
- <Button x:Name="DeleteButton" Height="40" Width="40"
- HorizontalAlignment="Right" VerticalContentAlignment="Center"
- Click="DeleteButton_Click"
- >
- <!--Style="{StaticResource PageEditToolBtn}"-->
- <Grid RenderTransformOrigin="0.5 0.5">
- <TextBlock Text="X"/>
- <!--<Path Fill="{StaticResource BOTA.Path.Fill}" Data="M8.69231 8L12.5 4.19231L11.8077 3.5L8 7.30769L4.19231 3.5L3.5 4.19231L7.30769 8L3.5 11.8077L4.19231 12.5L8 8.69231L11.8077 12.5L12.5 11.8077L8.69231 8Z"/>-->
- </Grid>
- </Button>
- </Grid>
- <Grid x:Name="MoreGrid" Height="40" Background="Transparent" HorizontalAlignment="Right">
- <Button x:Name="MoreButton" Height="40" Width="40"
- HorizontalAlignment="Right" VerticalContentAlignment="Center"
- Initialized="MoreButton_Initialized" Click="MoreButton_Click"
- >
- <!--Style="{StaticResource PageEditToolBtn}"-->
- <!--<Path Fill="{StaticResource BOTA.Path.Fill}" Data="M2,7 C2.140625,7 2.27083333,7.02604167 2.390625,7.078125 C2.51041667,7.13020833 2.61588542,7.20182292 2.70703125,7.29296875 C2.79817708,7.38411458 2.86979167,7.48958333 2.921875,7.609375 C2.97395833,7.72916667 3,7.859375 3,8 C3,8.140625 2.97395833,8.27083333 2.921875,8.390625 C2.86979167,8.51041667 2.79817708,8.61588542 2.70703125,8.70703125 C2.61588542,8.79817708 2.51041667,8.86979167 2.390625,8.921875 C2.27083333,8.97395833 2.140625,9 2,9 C1.859375,9 1.72916667,8.97395833 1.609375,8.921875 C1.48958333,8.86979167 1.38411458,8.79817708 1.29296875,8.70703125 C1.20182292,8.61588542 1.13020833,8.51041667 1.078125,8.390625 C1.02604167,8.27083333 1,8.140625 1,8 C1,7.859375 1.02604167,7.72916667 1.078125,7.609375 C1.13020833,7.48958333 1.20182292,7.38411458 1.29296875,7.29296875 C1.38411458,7.20182292 1.48958333,7.13020833 1.609375,7.078125 C1.72916667,7.02604167 1.859375,7 2,7 Z M8,7 C8.140625,7 8.27083333,7.02604167 8.390625,7.078125 C8.51041667,7.13020833 8.61588542,7.20182292 8.70703125,7.29296875 C8.79817708,7.38411458 8.86979167,7.48958333 8.921875,7.609375 C8.97395833,7.72916667 9,7.859375 9,8 C9,8.140625 8.97395833,8.27083333 8.921875,8.390625 C8.86979167,8.51041667 8.79817708,8.61588542 8.70703125,8.70703125 C8.61588542,8.79817708 8.51041667,8.86979167 8.390625,8.921875 C8.27083333,8.97395833 8.140625,9 8,9 C7.859375,9 7.72916667,8.97395833 7.609375,8.921875 C7.48958333,8.86979167 7.38411458,8.79817708 7.29296875,8.70703125 C7.20182292,8.61588542 7.13020833,8.51041667 7.078125,8.390625 C7.02604167,8.27083333 7,8.140625 7,8 C7,7.859375 7.02604167,7.72916667 7.078125,7.609375 C7.13020833,7.48958333 7.20182292,7.38411458 7.29296875,7.29296875 C7.38411458,7.20182292 7.48958333,7.13020833 7.609375,7.078125 C7.72916667,7.02604167 7.859375,7 8,7 Z M14,7 C14.140625,7 14.2708333,7.02604167 14.390625,7.078125 C14.5104167,7.13020833 14.6158854,7.20182292 14.7070313,7.29296875 C14.7981771,7.38411458 14.8697917,7.48958333 14.921875,7.609375 C14.9739583,7.72916667 15,7.859375 15,8 C15,8.140625 14.9739583,8.27083333 14.921875,8.390625 C14.8697917,8.51041667 14.7981771,8.61588542 14.7070313,8.70703125 C14.6158854,8.79817708 14.5104167,8.86979167 14.390625,8.921875 C14.2708333,8.97395833 14.140625,9 14,9 C13.859375,9 13.7291667,8.97395833 13.609375,8.921875 C13.4895833,8.86979167 13.3841146,8.79817708 13.2929688,8.70703125 C13.2018229,8.61588542 13.1302083,8.51041667 13.078125,8.390625 C13.0260417,8.27083333 13,8.140625 13,8 C13,7.859375 13.0260417,7.72916667 13.078125,7.609375 C13.1302083,7.48958333 13.2018229,7.38411458 13.2929688,7.29296875 C13.3841146,7.20182292 13.4895833,7.13020833 13.609375,7.078125 C13.7291667,7.02604167 13.859375,7 14,7 Z">
- <Path.RenderTransform>
- <TransformGroup>
- <TranslateTransform Y="-3"/>
- </TransformGroup>
- </Path.RenderTransform>
- </Path>-->
- <Button.ContextMenu>
- <ContextMenu x:Name="MenuMore" Loaded="MenuMore_Loaded">
- <ContextMenu.ItemContainerStyle>
- <Style TargetType="MenuItem">
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Padding" Value="0,7,0,7"/>
- </Style>
- </ContextMenu.ItemContainerStyle>
- <MenuItem Name="MenuPrint" Header="打印" Click="MenuPrint_Click">
- <!--<MenuItem.Icon>
- <Path Fill="{StaticResource path.fill}"
- Data="M12,0 L12,6 L14.5,6 C15.2796961,6 15.9204487,6.59488808 15.9931334,7.35553999 L16,7.5 L16,14 L12,14 L12,16 L4,16 L4,14 L0,14 L0,7.5 C0,6.72030388 0.594888083,6.07955132 1.35553999,6.00686658 L1.5,6 L4,6 L4,0 L12,0 Z M11,11 L5,11 L5,15 L11,15 L11,11 Z M14.5,7 L1.5,7 C1.25454011,7 1.05039163,7.17687516 1.00805567,7.41012437 L1,7.5 L1,13 L4,13 L4,10 L12,10 L12,13 L15,13 L15,7.5 C15,7.25454011 14.8231248,7.05039163 14.5898756,7.00805567 L14.5,7 Z M3,8 L3,9 L2,9 L2,8 L3,8 Z M11,1 L5,1 L5,6 L11,6 L11,1 Z" >
- <Path.RenderTransform>
- <TranslateTransform X="3.0000" Y="0"/>
- </Path.RenderTransform>
- </Path>
- </MenuItem.Icon>-->
- </MenuItem>
- <MenuItem Name="MenuShare" Header="分享" Click="MenuShare_Click">
- <!--<MenuItem.Icon>
- <Path Fill="{StaticResource path.fill}"
- Data="M1,5 L1,15 L15,15 L15,13 L16,13 L16,16 L0,16 L0,5 L1,5 Z M10,1 L15.5,6.5 L10,12 L10,9 C9.33333333,9 8.68098958,9.06640625 8.04296875,9.19921875 C7.40494792,9.33203125 6.7890625,9.52734375 6.1953125,9.78515625 C5.6015625,10.0429688 5.03515625,10.3580729 4.49609375,10.7304688 C4.06484375,11.0283854 3.65942708,11.3588021 3.27984375,11.7217188 L3,12 L3,11 C3,10.3541667 3.08333333,9.73307292 3.25,9.13671875 C3.41666667,8.54036458 3.65234375,7.98307292 3.95703125,7.46484375 C4.26171875,6.94661458 4.62630208,6.47526042 5.05078125,6.05078125 C5.47526042,5.62630208 5.94661458,5.26171875 6.46484375,4.95703125 C6.98307292,4.65234375 7.54036458,4.41666667 8.13671875,4.25 C8.61380208,4.11666667 9.10671875,4.03666667 9.61546875,4.01 L10,4 L10,1 Z M11,3.4140625 L11,5 L10.59025,5.000625 C10.378125,5.00125 10.165625,5.00234375 10,5.00390625 C9.72395833,5.00651042 9.56380208,5.02083333 9.30078125,5.046875 C9.03776042,5.07291667 8.7734375,5.11848958 8.5078125,5.18359375 C8.2421875,5.24869792 7.9609375,5.34375 7.6640625,5.46875 C7.2109375,5.65625 6.79036458,5.89583333 6.40234375,6.1875 C6.01432292,6.47916667 5.66796875,6.81119792 5.36328125,7.18359375 C5.05859375,7.55598958 4.80078125,7.95963542 4.58984375,8.39453125 C4.37890625,8.82942708 4.22395833,9.28645833 4.125,9.765625 C5,9.18229167 5.93489583,8.7421875 6.9296875,8.4453125 C7.80013021,8.18554688 8.69250488,8.03942871 9.60681152,8.00695801 L10,8 L11,8 L11,9.5 L14,6.5 L11,3.4140625 Z">
- <Path.RenderTransform>
- <TranslateTransform X="3.0000" Y="0"/>
- </Path.RenderTransform>
- </Path>
- </MenuItem.Icon>-->
- </MenuItem>
- <MenuItem Name="MenuFileInfo" Header="文件信息" Click="MenuFileInfo_Click">
- <!--<MenuItem.Icon>
- <Path Fill="{StaticResource path.fill}"
- Data="M8,1.42108547e-13 C12.418278,1.42108547e-13 16,3.581722 16,8 C16,12.418278 12.418278,16 8,16 C3.581722,16 0,12.418278 0,8 C0,3.581722 3.581722,1.42108547e-13 8,1.42108547e-13 Z M8,1.06666667 C4.17082573,1.06666667 1.06666667,4.17082573 1.06666667,8 C1.06666667,11.8291743 4.17082573,14.9333333 8,14.9333333 C11.8291743,14.9333333 14.9333333,11.8291743 14.9333333,8 C14.9333333,4.17082573 11.8291743,1.06666667 8,1.06666667 Z M8.5,6 L8.5,12 L7.5,12 L7.5,6 L8.5,6 Z M8.5,4 L8.5,5 L7.5,5 L7.5,4 L8.5,4 Z">
- <Path.RenderTransform>
- <TranslateTransform X="3.0000" Y="0"/>
- </Path.RenderTransform>
- </Path>
- </MenuItem.Icon>-->
- </MenuItem>
- <MenuItem Name="MenuFilePath" Header="FilePath" Click="MenuFilePath_Click">
- <!--<MenuItem.Icon>
-
- <Path Fill="{StaticResource path.fill}"
- Data="M5.24031 1.5H0.5V14.5H15.5V4H7.24031L5.24031 1.5ZM1.5 13.5V2.5H4.75969L6.75969 5H14.5V13.5H1.5ZM4 7.5H12V6.5H4V7.5Z">
- <Path.RenderTransform>
- <TranslateTransform X="3.0000" Y="0"/>
- </Path.RenderTransform>
- </Path>
- </MenuItem.Icon>-->
- </MenuItem>
- </ContextMenu>
- </Button.ContextMenu>
- </Button>
- </Grid>
- </StackPanel>
- </Grid>
-
- </Grid>
- </UserControl>
|