Explorar o código

首页 - 快捷工具,最近列表UI

chenrongqian %!s(int64=2) %!d(string=hai) anos
pai
achega
5d10d8a6c6

+ 35 - 0
PDF Office/CustomControl/CustomIconToggleBtn.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Input;
+using System.Windows.Media;
+
+namespace PDF_Office.CustomControl
+{
+    public class CustomIconToggleBtn: ToggleButton
+    {
+        public CustomIconToggleBtn()
+        {
+        }
+
+        public override void OnApplyTemplate()
+        {
+            base.OnApplyTemplate();
+        }
+
+        public ImageSource Icon
+        {
+            get { return (ImageSource)GetValue(NormalIconProperty); }
+            set { SetValue(NormalIconProperty, value); }
+        }
+        public static readonly DependencyProperty NormalIconProperty =
+           DependencyProperty.Register("Icon", typeof(ImageSource), typeof(CustomIconToggleBtn), new PropertyMetadata(null));
+    }
+
+   
+}

+ 27 - 0
PDF Office/DataConvert/BoolToVisible.cs

@@ -51,4 +51,31 @@ namespace PDF_Office.DataConvert
             }
         }
     }
+
+    public class InvertBoolToVisibleConvert : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value == null)
+            {
+                return Visibility.Collapsed;
+            }
+            else
+            {
+                if ((bool)value == false)
+                {
+                    return Visibility.Visible;
+                }
+                else
+                {
+                    return Visibility.Collapsed;
+                }
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
 }

+ 46 - 3
PDF Office/PDF Office.csproj

@@ -102,6 +102,7 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </ApplicationDefinition>
+    <Compile Include="CustomControl\CustomIconToggleBtn.cs" />
     <Compile Include="Model\DialogNames.cs" />
     <Compile Include="CustomControl\InterTabClient.cs" />
     <Compile Include="CustomControl\LoadingControl.xaml.cs">
@@ -135,15 +136,30 @@
     <Compile Include="Views\Dialog\VerifyPassWordDialog.xaml.cs">
       <DependentUpon>VerifyPassWordDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\HomePanel\DocItemControl.xaml.cs">
+      <DependentUpon>DocItemControl.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\HomePanel\DocItemListViewControl.xaml.cs">
+      <DependentUpon>DocItemListViewControl.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\HomePanel\HomeCloudContent.xaml.cs">
       <DependentUpon>HomeCloudContent.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\HomePanel\HomeGuidContent.xaml.cs">
       <DependentUpon>HomeGuidContent.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\HomePanel\HomeToolIControl.xaml.cs">
+      <DependentUpon>HomeToolIControl.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\HomePanel\HomeToolItem.xaml.cs">
+      <DependentUpon>HomeToolItem.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\HomePanel\HomeToolsContent.xaml.cs">
       <DependentUpon>HomeToolsContent.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\HomePanel\RecentFilesView.xaml.cs">
+      <DependentUpon>RecentFilesView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\MainContent.xaml.cs">
       <DependentUpon>MainContent.xaml</DependentUpon>
     </Compile>
@@ -154,6 +170,14 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Styles\CustomBtnStyle.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Styles\ListViewStyle.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Styles\TabControlStyle.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -178,6 +202,14 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Views\HomePanel\DocItemControl.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Views\HomePanel\DocItemListViewControl.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Views\HomePanel\HomeCloudContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -186,10 +218,22 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\HomePanel\HomeToolIControl.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Views\HomePanel\HomeToolItem.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Views\HomePanel\HomeToolsContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\HomePanel\RecentFilesView.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Views\MainContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -244,9 +288,7 @@
   <ItemGroup>
     <None Include="App.config" />
   </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Resources\" />
-  </ItemGroup>
+  <ItemGroup />
   <ItemGroup>
     <Content Include="ComOCRKit.Desk.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -267,6 +309,7 @@
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
     <Resource Include="StyleAndTemplateList.txt" />
+    <Resource Include="Resources\QuickToolIcon\Batch.png" />
     <Content Include="SystemService\PreviewHandler.dll">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

BIN=BIN
PDF Office/Resources/QuickToolIcon/Batch.png


+ 74 - 0
PDF Office/Styles/CustomBtnStyle.xaml

@@ -0,0 +1,74 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                     xmlns:customControl ="clr-namespace:PDF_Office.CustomControl"
+                    >
+
+    <SolidColorBrush x:Key="Common.Border" Color="#FF273C62"/>
+    <SolidColorBrush x:Key="Common.ForGround.Blue" Color="#FF273C62"/>
+    <SolidColorBrush x:Key="Common.ForGround.Black" Color="#FF000000"/>
+    <SolidColorBrush x:Key="Button.Static.Background" Color="#273C62"/>
+    <SolidColorBrush x:Key="Button.Static.Border" Color="#FF273C62"/>
+    <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#1A477EDE"/>
+    <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#273C62"/>
+    <SolidColorBrush x:Key="Button.Pressed.Background" Color="#29477EDE"/>
+    <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
+    <SolidColorBrush x:Key="Button.Disabled.Background" Color="#273C62"/>
+    <SolidColorBrush x:Key="Button.Disabled.Border" Color="#273C62"/>
+    <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#26FFFFFF"/>
+    <SolidColorBrush x:Key="CloseButton.MouseOver.Foreground" Color="Red"/>
+    <SolidColorBrush x:Key="Disabled.ForeGround" Color="#FFE2E3E6" />
+    <SolidColorBrush x:Key="BlueBtn.Mouseover.Background" Color="#31538D" />
+    <SolidColorBrush x:Key="BlueBtn.Pressed.Background" Color="#1B2944" />
+    <SolidColorBrush x:Key="Redact.Background" Color="#477EDE"/>
+
+    <Style x:Key="ToggleBtnViewModeStyle"  TargetType="customControl:CustomIconToggleBtn">
+        <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
+        <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
+        <Setter Property="BorderThickness" Value="0"/>
+        <Setter Property="HorizontalContentAlignment" Value="Center"/>
+        <Setter Property="Height" Value="40"/>
+        <Setter Property="Margin" Value="4,0,4,0"/>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="customControl:CustomIconToggleBtn">
+                    <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
+                        <Grid >
+                            <Grid  Width="40" Height="40" VerticalAlignment="Center" HorizontalAlignment="Center">
+                                <Image x:Name="ImageIcon" Width="20" Height="20" Source="{Binding Icon,RelativeSource={RelativeSource Mode=TemplatedParent}}" Visibility="Collapsed"/>
+                            </Grid>
+                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                        </Grid>
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsMouseOver" Value="true">
+                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
+                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
+                        </Trigger>
+                        <Trigger Property="IsPressed" Value="true">
+                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
+                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
+                        </Trigger>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
+                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
+                            <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
+                            <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Style.Triggers>
+            <Trigger Property="IsChecked" Value="True">
+                <Setter Property="Background" Value="{StaticResource Button.Pressed.Background}"></Setter>
+            </Trigger>
+            <Trigger Property="IsChecked" Value="False">
+                <Setter Property="Background" Value="Transparent"></Setter>
+            </Trigger>
+            <Trigger Property="IsChecked" Value="{x:Null}">
+                <Setter Property="Background" Value="Transparent"></Setter>
+            </Trigger>
+        </Style.Triggers>
+    </Style>
+</ResourceDictionary>

+ 268 - 0
PDF Office/Styles/ListViewStyle.xaml

@@ -0,0 +1,268 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+    <Style x:Key="FilesListViewStyle" TargetType="{x:Type ListView}">
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type ListView}">
+                    <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="1" SnapsToDevicePixels="true">
+                        <ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
+                            <Grid>
+                                <Grid.RowDefinitions>
+                                    <RowDefinition Height="Auto"/>
+                                    <RowDefinition/>
+
+                                </Grid.RowDefinitions>
+                                <Grid>
+                                    <Grid.ColumnDefinitions>
+                                        <ColumnDefinition MinWidth="0" Width ="4.5*"/>
+                                        <ColumnDefinition Width="3*" />
+                                        <ColumnDefinition Width="2*" />
+                                        <ColumnDefinition Width="100"/>
+                                    </Grid.ColumnDefinitions>
+                                    <TextBlock HorizontalAlignment="Left" Margin="12,0,0,6" VerticalAlignment="Center" FontSize="14"/>
+                                    <!--Text="{x:Static homePageUI:HomePage.RencentFiles_Name}"-->
+                                    <TextBlock HorizontalAlignment="Center" Margin="0,0,0,6" TextWrapping="Wrap" TextAlignment="Center" VerticalAlignment="Center" Grid.Column="1" FontSize="14" />
+                                    <!--Text="{x:Static homePageUI:HomePage.RencentFiles_LastOpenedTime}"-->
+                                    <TextBlock HorizontalAlignment="Center" Margin="0,0,0,6" VerticalAlignment="Center" Grid.Column="2" FontSize="14" />
+                                    <!--Text="{x:Static homePageUI:HomePage.RencentFiles_Size}"-->
+                                    <Rectangle Grid.ColumnSpan="4" Margin="12,0,0,0" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Fill="#26000000" Height="1"/>
+                                </Grid>
+                                <ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+                            </Grid>
+                        </ScrollViewer>
+                    </Border>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+    <Style x:Key="FilesListViewItemStyle" TargetType="{x:Type ListViewItem}">
+        <Setter Property="UIElement.SnapsToDevicePixels"
+            Value="True" />
+        <Setter Property="Control.Padding"
+            Value="4,1" />
+        <Setter Property="Control.HorizontalContentAlignment">
+            <Setter.Value>
+                <Binding Path="HorizontalContentAlignment"
+                     RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
+            </Setter.Value>
+        </Setter>
+        <Setter Property="Control.VerticalContentAlignment">
+            <Setter.Value>
+                <Binding Path="VerticalContentAlignment"
+                     RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
+            </Setter.Value>
+        </Setter>
+        <Setter Property="Panel.Background"
+            Value="#00FFFFFF" />
+        <Setter Property="Border.BorderBrush"
+            Value="#00FFFFFF" />
+        <Setter Property="Border.BorderThickness"
+            Value="1" />
+        <Setter Property="FrameworkElement.FocusVisualStyle">
+            <Setter.Value>
+                <Style TargetType="{x:Type IFrameworkInputElement}">
+                    <Setter Property="Control.Template">
+                        <Setter.Value>
+                            <ControlTemplate>
+                                <Rectangle Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
+                                       StrokeThickness="1"
+                                       StrokeDashArray="1 2"
+                                       Margin="2"
+                                       SnapsToDevicePixels="True" />
+                            </ControlTemplate>
+                        </Setter.Value>
+                    </Setter>
+                </Style>
+            </Setter.Value>
+        </Setter>
+        <Setter Property="Control.Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type ListViewItem}">
+                    <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
+                        Padding="{TemplateBinding Control.Padding}"
+                        BorderBrush="{TemplateBinding Border.BorderBrush}"
+                        Background="{TemplateBinding Panel.Background}"
+                        Name="Bd"
+                        SnapsToDevicePixels="True">
+                        <Grid>
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="Auto"/>
+                                <ColumnDefinition />
+                            </Grid.ColumnDefinitions>
+                            <Grid x:Name="SelectedIcon" Margin="12.5 0 0.5 0" Visibility="Collapsed" HorizontalAlignment="Left" VerticalAlignment="Center">
+                                <Rectangle x:Name="Selectedrect"  Width="20" Height="20" Fill="#FF477EDE" HorizontalAlignment="Right" VerticalAlignment="Top"/>
+                                <Path x:Name="MultiSelectCheck" Margin="0,1,0,0" Fill="White" Width="15" Height="15" Data="M15.3493 0.596191L16.0564 1.3033L5.44979 11.9099L0.146484 6.6066L0.853591 5.89949L5.45004 10.496L15.3493 0.596191Z"
+                                      VerticalAlignment="Center" HorizontalAlignment="Center"
+                                      />
+                            </Grid>
+                            <ContentPresenter Margin="15 0 0 0" Content="{TemplateBinding ContentControl.Content}" Grid.Column="1"
+                                      ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
+                                      ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
+                                      HorizontalAlignment="Stretch"
+                                      VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
+                                      SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
+                        </Grid>
+
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="UIElement.IsMouseOver" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <Setter Property="Panel.Background" TargetName="Bd" Value="#1A000000" />
+                            <Setter Property="Border.BorderBrush" TargetName="Bd" Value="#1A000000" />
+                        </MultiTrigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="Selector.IsSelectionActive" Value="False" />
+                                <Condition Property="Selector.IsSelected" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <Setter Property="Panel.Background" TargetName="Bd" Value="#1A477EDE" />
+                            <Setter Property="Border.BorderBrush" TargetName="Bd" Value="#1A477EDE" />
+                            <Setter Property="Grid.Visibility" TargetName="SelectedIcon" Value="Visible"/>
+                        </MultiTrigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="Selector.IsSelectionActive" Value="True" />
+                                <Condition Property="Selector.IsSelected" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <Setter Property="Panel.Background" TargetName="Bd" Value="#1A477EDE" />
+                            <Setter Property="Border.BorderBrush" TargetName="Bd" Value="#1A477EDE" />
+                            <Setter Property="Grid.Visibility" TargetName="SelectedIcon" Value="Visible"/>
+                        </MultiTrigger>
+                        <Trigger Property="UIElement.IsEnabled"  Value="False">
+                            <Setter Property="TextElement.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+
+    <Style x:Key="FilesGridItemStyle" TargetType="{x:Type ListViewItem}">
+        <Setter Property="UIElement.SnapsToDevicePixels"
+            Value="True" />
+        <Setter Property="Control.Padding"
+            Value="4,1" />
+        <Setter Property="Control.HorizontalContentAlignment">
+            <Setter.Value>
+                <Binding Path="HorizontalContentAlignment"
+                     RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
+            </Setter.Value>
+        </Setter>
+        <Setter Property="Control.VerticalContentAlignment">
+            <Setter.Value>
+                <Binding Path="VerticalContentAlignment"
+                     RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
+            </Setter.Value>
+        </Setter>
+        <Setter Property="Panel.Background"
+            Value="#00FFFFFF" />
+        <Setter Property="Border.BorderBrush"
+            Value="#00FFFFFF" />
+        <Setter Property="Border.BorderThickness"
+            Value="2" />
+        <Setter Property="FrameworkElement.FocusVisualStyle">
+            <Setter.Value>
+                <Style TargetType="{x:Type IFrameworkInputElement}">
+                    <Setter Property="Control.Template">
+                        <Setter.Value>
+                            <ControlTemplate>
+                                <Rectangle Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
+                                       StrokeThickness="1"
+                                       StrokeDashArray="1 2"
+                                       Margin="2"
+                                       SnapsToDevicePixels="True" />
+                            </ControlTemplate>
+                        </Setter.Value>
+                    </Setter>
+                </Style>
+            </Setter.Value>
+        </Setter>
+        <Setter Property="Control.Template">
+
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type ListViewItem}">
+                    <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
+                        Padding="{TemplateBinding Control.Padding}" Margin="0,0,12,24"
+                        BorderBrush="{TemplateBinding Border.BorderBrush}"
+                        Background="{TemplateBinding Panel.Background}"
+                        Name="Bd"
+                        SnapsToDevicePixels="True">
+                        <Grid>
+                            <ContentPresenter Content="{TemplateBinding ContentControl.Content}"
+                                      ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
+                                      ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
+                                      HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
+                                      VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
+                                      SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
+                            <Grid x:Name="SelectedIcon" Visibility="Collapsed" HorizontalAlignment="Right" VerticalAlignment="Top">
+                                <Image Source="pack://application:,,,/Resources/Image/Home/btn_multiselect.png" Width="20" Height="20" RenderOptions.BitmapScalingMode="HighQuality"/>
+                            </Grid>
+                            <Grid x:Name="UnSelectedIcon" Visibility="Collapsed" HorizontalAlignment="Right" VerticalAlignment="Top">
+                                <Rectangle x:Name="UnSelectedrect"  Width="20" Height="20" Fill="#FFE2E3E6" HorizontalAlignment="Right" VerticalAlignment="Top"/>
+                            </Grid>
+                        </Grid>
+
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="UIElement.IsMouseOver" Value="True" />
+                                <Condition Property="Selector.IsSelected" Value="False" />
+                            </MultiTrigger.Conditions>
+                            <!--<Setter Property="Panel.Background" TargetName="Bd" Value="#1A000000" />-->
+                            <Setter Property="Border.BorderBrush" TargetName="Bd" Value="#FF477EDE" />
+                            <Setter Property="Grid.Visibility" TargetName="UnSelectedIcon" Value="Visible"/>
+                            <Setter Property="Grid.Visibility" TargetName="SelectedIcon" Value="Collapsed"/>
+                        </MultiTrigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="Selector.IsSelectionActive" Value="False" />
+                                <Condition Property="Selector.IsSelected" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <Setter Property="Panel.Background" TargetName="Bd" Value="#1A477EDE" />
+                            <Setter Property="Border.BorderBrush" TargetName="Bd" Value="#1A477EDE" />
+                            <Setter Property="Grid.Visibility" TargetName="SelectedIcon" Value="Visible"/>
+                            <Setter Property="Grid.Visibility" TargetName="UnSelectedIcon" Value="Collapsed"/>
+                        </MultiTrigger>
+                        <MultiTrigger>
+                            <MultiTrigger.Conditions>
+                                <Condition Property="Selector.IsSelectionActive" Value="True" />
+                                <Condition Property="Selector.IsSelected" Value="True" />
+                            </MultiTrigger.Conditions>
+                            <Setter Property="Panel.Background" TargetName="Bd" Value="#1A477EDE" />
+                            <Setter Property="Border.BorderBrush" TargetName="Bd" Value="#1A477EDE" />
+                            <Setter Property="Grid.Visibility" TargetName="SelectedIcon" Value="Visible"/>
+                            <Setter Property="Grid.Visibility" TargetName="UnSelectedIcon" Value="Collapsed"/>
+                        </MultiTrigger>
+                        <Trigger Property="UIElement.IsEnabled"  Value="False">
+                            <Setter Property="TextElement.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+                        </Trigger>
+
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+    <Style x:Key="FilesGridViewStyle" TargetType="{x:Type ListView}">
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type ListView}">
+                    <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="1" SnapsToDevicePixels="true">
+                        <ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
+                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+                        </ScrollViewer>
+                    </Border>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+
+
+</ResourceDictionary>

+ 4 - 1
PDF Office/Views/HomeContent.xaml

@@ -11,6 +11,9 @@
     d:DesignWidth="800"
     prism:ViewModelLocator.AutoWireViewModel="True"
     mc:Ignorable="d">
+    <UserControl.Resources>
+      
+    </UserControl.Resources>
     <Grid>
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="270" />
@@ -25,7 +28,7 @@
                 Padding="0,0,0,0"
                 Command="{Binding OpenFileCommand}"
                 Content="OPEN PDF" />
-            <Button
+            <Button 
                 Name="BtnCreatPDF"
                 Height="48"
                 Margin="41,8,41,0"

+ 21 - 0
PDF Office/Views/HomePanel/DocItemControl.xaml

@@ -0,0 +1,21 @@
+<UserControl x:Class="PDF_Office.Views.HomePanel.DocItemControl"
+             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"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <Grid Height="272" Width="230" Loaded="Grid_Loaded" DataContext="{Binding}" ToolTip="{Binding FilePath}">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="auto"/>
+            <RowDefinition />
+        </Grid.RowDefinitions>
+        <Image Name="CoverImage" Width="136" Height="176" Margin="4" RenderOptions.BitmapScalingMode="HighQuality" UseLayoutRounding="True"/>
+        <TextBlock Grid.Row="1"
+                   FontSize="14"  MaxWidth="136" TextTrimming="CharacterEllipsis"
+                   ToolTip="{Binding FileName}" Text="{Binding FileName}" 
+                   VerticalAlignment="Center" HorizontalAlignment="Center"/>
+    </Grid>
+    
+</UserControl>

+ 36 - 0
PDF Office/Views/HomePanel/DocItemControl.xaml.cs

@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.IO;
+
+namespace PDF_Office.Views.HomePanel
+{
+    /// <summary>
+    /// DocItemControl.xaml 的交互逻辑
+    /// </summary>
+    public partial class DocItemControl : UserControl
+    {
+        public DocItemControl()
+        {
+            InitializeComponent();
+        }
+
+        private void Grid_Loaded(object sender, RoutedEventArgs e)
+        {
+           
+        }
+
+       
+    }
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 152 - 0
PDF Office/Views/HomePanel/DocItemListViewControl.xaml


+ 115 - 0
PDF Office/Views/HomePanel/DocItemListViewControl.xaml.cs

@@ -0,0 +1,115 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using ComPDFKitViewer.PdfViewer;
+
+namespace PDF_Office.Views.HomePanel
+{
+    /// <summary>
+    /// DocItemListViewControl.xaml 的交互逻辑
+    /// </summary>
+    public partial class DocItemListViewControl : UserControl
+    {
+        public event EventHandler<RoutedEventArgs> DeleteItemHandler;
+        public event EventHandler<RoutedEventArgs> PrintItemHandler;
+        public event EventHandler<RoutedEventArgs> FileInfoItemHandler;
+        public event EventHandler<RoutedEventArgs> ShareItemHandler;
+        public event EventHandler<RoutedEventArgs> FilePathItemHandler;
+
+        public DocItemListViewControl()
+        {
+            InitializeComponent();
+            SetLangText();
+        }
+
+        private void SetLangText()
+        {
+            
+        }
+
+        #region UI
+        public bool IsHoverState
+        {
+            get { return (bool)GetValue(IsHoverStateProperty); }
+            set { SetValue(IsHoverStateProperty, value); }
+        }
+
+        public static readonly DependencyProperty IsHoverStateProperty =
+            DependencyProperty.Register("IsHoverState", typeof(bool), typeof(DocItemListViewControl), new PropertyMetadata(false));
+
+        private void UserControl_MouseEnter(object sender, MouseEventArgs e)
+        {
+            IsHoverState = true;
+        }
+
+        private void UserControl_MouseLeave(object sender, MouseEventArgs e)
+        {
+            IsHoverState = false;
+        }
+
+        private void UserControl_MouseMove(object sender, MouseEventArgs e)
+        {
+            IsHoverState = true;
+        }
+
+        private void MoreButton_Initialized(object sender, EventArgs e)
+        {
+            MoreButton.ContextMenu = null;
+        }
+
+        private void MoreButton_Click(object sender, RoutedEventArgs e)
+        {
+            MenuMore.PlacementTarget = MoreButton;
+            MenuMore.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom;
+            MenuMore.IsOpen = true;
+        }
+
+        #endregion
+
+        #region 事件
+        private void MenuPrint_Click(object sender, RoutedEventArgs e)
+        {
+            PrintItemHandler.Invoke(sender, e);
+        }
+
+        private void MenuShare_Click(object sender, RoutedEventArgs e)
+        {
+            ShareItemHandler.Invoke(sender, e);
+        }
+
+        private void MenuFileInfo_Click(object sender, RoutedEventArgs e)
+        {
+            FileInfoItemHandler.Invoke(sender, e);
+        }
+        #endregion
+
+        private void DeleteButton_Click(object sender, RoutedEventArgs e)
+        {
+            DeleteItemHandler.Invoke(sender, e);
+        }
+
+        private void MenuFilePath_Click(object sender, RoutedEventArgs e)
+        {
+            FilePathItemHandler.Invoke(sender, e);
+        }
+
+        private void MenuMore_Loaded(object sender, RoutedEventArgs e)
+        {
+      
+
+        }
+    }
+}

+ 14 - 2
PDF Office/Views/HomePanel/HomeGuidContent.xaml

@@ -6,10 +6,22 @@
              xmlns:local="clr-namespace:PDF_Office.Views.HomePanel"
              xmlns:prism="http://prismlibrary.com/"
              prism:ViewModelLocator.AutoWireViewModel="True"
-             Background="Blue"
+             Background="#F8F9FB"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
     <Grid>
-            
+        <ScrollViewer
+            x:Name="scrollView"
+            VerticalAlignment="Stretch"
+            VerticalScrollBarVisibility="Disabled">
+            <Grid>
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="Auto" />
+                    <RowDefinition />
+                </Grid.RowDefinitions>
+                <local:HomeToolIControl x:Name="hometool" Margin="32,32,0,0"/>
+                <local:RecentFilesView x:Name="Recentlist" Grid.Row="1" Margin="0,0,32,0" />
+            </Grid>
+        </ScrollViewer>
     </Grid>
 </UserControl>

+ 165 - 0
PDF Office/Views/HomePanel/HomeToolIControl.xaml

@@ -0,0 +1,165 @@
+<UserControl
+    x:Class="PDF_Office.Views.HomePanel.HomeToolIControl"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:local="clr-namespace:PDF_Office.Views.HomePanel"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    d:DesignHeight="450"
+    d:DesignWidth="800"
+    mc:Ignorable="d">
+    <UserControl.Resources />
+    <Grid Grid.ColumnSpan="2" Margin="0,0,20,0">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+        <TextBlock
+                x:Name="TxbQuickToolsTitle"
+                Margin="0,0,0,16"
+                FontSize="24"
+                FontWeight="SemiBold"
+                Text="Quick Tools" />
+
+
+        <StackPanel
+            x:Name="PnlToolsUIBtns" Grid.ColumnSpan="2"
+            Grid.Column="0" 
+            Margin="0,0,12,0"
+            HorizontalAlignment="Right"
+            VerticalAlignment="Top"
+            Orientation="Horizontal"
+            Visibility="Visible">
+
+            <Button
+                x:Name="BtnTools"
+                Width="68"
+                Height="28"
+                Margin="0,0,0,0"
+                Background="#FFFFFF"
+                Content="Tools"
+                Click="BtnTools_Click"
+               >
+
+            </Button>
+
+
+            <Button
+                x:Name="BtnMore"
+                Width="28"
+                Height="28"
+                Margin="12,0,0,0"
+                 Background="#FFFFFF" BorderThickness="0" Content="..."
+                Click="BtnMore_Click"
+               >
+            </Button>
+
+        </StackPanel>
+
+        <Grid
+                x:Name="GridAllTools"
+                Grid.Row="1" Height="230"
+                SizeChanged="GridAllTools_SizeChanged">
+
+            <WrapPanel
+                    x:Name="Pnlwrap"
+                    MinWidth="230"
+                    HorizontalAlignment="Left"
+                    IsEnabled="True">
+
+                <local:HomeToolItem x:Name="ToolItemBatch"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="Batch convert, compress, secure, watermark PDFs."
+                        ToolTitile="Batch" />
+
+                <local:HomeToolItem x:Name="ToolItemOCR"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="Convert PDFs to Word/ HTML/ TXT/ JPEG/ PNG files."
+                        ToolTitile="OCR" />
+
+                <local:HomeToolItem x:Name="ToolItemConvertPDF"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="Protect PDFs with image/ text watermarks from plagiarism."
+                        ToolTitile="Convert PDF" />
+
+                <local:HomeToolItem x:Name="ToolItemImageToPDF"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="Protect PDFs with image/ text watermarks from plagiarism."
+                        ToolTitile="Image To PDF" />
+
+                <local:HomeToolItem x:Name="ToolItemMergePDF"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="Protect PDFs with image/ text watermarks from plagiarism."
+                        ToolTitile="Merge PDF"
+                        />
+
+                <local:HomeToolItem x:Name="ToolItemCompressPDF"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="Convert JPEG/ JPG/ PNG/ TIFF/ BMP/ PSD files to PDFs."
+                        ToolTitile="Compress PDF" />
+
+                <local:HomeToolItem x:Name="ToolItemSecurity"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="Convert PDFs to Word, Fonts  formatting get converted."
+                        ToolTitile="Security" />
+
+                <local:HomeToolItem x:Name="ToolItem1"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="QuickTools_ToolMergeInfo"
+                        ToolTitile="QuickTools_ToolMerge" />
+
+                <local:HomeToolItem x:Name="ToolItem2"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="Protect PDFs with image/ text watermarks from plagiarism."
+                        ToolTitile="Compare PDF" />
+
+                <local:HomeToolItem x:Name="ToolItem3"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="Protect PDFs with image/ text watermarks from plagiarism."
+                        ToolTitile="QuickTools_ToolImageToPDF"
+                        Visibility="Collapsed" />
+
+                <local:HomeToolItem x:Name="ToolItem4"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="QuickTools_ToolSecurityInfo"
+                        ToolTitile="QuickTools_ToolSecurity"
+                        Visibility="Collapsed" />
+
+                <local:HomeToolItem x:Name="ToolItem5"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="QuickTools_ToolWatermarkInfo"
+                        ToolTitile="QuickTools_ToolWatermark"
+                        Visibility="Visible" />
+
+                <local:HomeToolItem x:Name="ToolItem6"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="QuickTools_ToolHeaderFooterInfo"
+                        ToolTitile="QuickTools_ToolHeaderFooter"
+                        Visibility="Visible" />
+
+                <local:HomeToolItem x:Name="ToolItem7"
+                        IconHoverPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        IconPath="pack://application:,,,/Resources/QuickToolIcon/Batch.png"
+                        ToolInfo="QuickTools_ToolBatesInfo"
+                        ToolTitile="QuickTools_ToolBates"
+                        Visibility="Visible" />
+
+            </WrapPanel>
+
+        </Grid>
+
+    </Grid>
+</UserControl>

+ 71 - 0
PDF Office/Views/HomePanel/HomeToolIControl.xaml.cs

@@ -0,0 +1,71 @@
+using System.Windows;
+using System.Windows.Controls;
+
+namespace PDF_Office.Views.HomePanel
+{
+    /// <summary>
+    /// HomeToolIControl.xaml 的交互逻辑
+    /// </summary>
+    public partial class HomeToolIControl : UserControl
+    {
+
+
+        public HomeToolIControl()
+        {
+            InitializeComponent();
+         
+        }
+   
+
+        private void BtnMore_Click(object sender, RoutedEventArgs e)
+        {
+            if (GridAllTools.Height != 230)
+            {
+                GridAllTools.Height = 230;
+                ShowToolsUI(false);
+            }
+            else
+            {
+                GridAllTools.Height = 144;
+                ShowToolsUI(true);
+            }
+               
+        }
+
+        /// <summary>
+        /// 扩展收缩UI
+        /// </summary>
+        /// <param name="IsShowConciseContent">是否收缩</param>
+        private void ShowToolsUI(bool IsShowConciseContent)
+        {
+            ToolItemBatch.IsShowConciseContent = IsShowConciseContent;
+            ToolItemOCR.IsShowConciseContent = IsShowConciseContent;
+            ToolItemConvertPDF.IsShowConciseContent = IsShowConciseContent;
+            ToolItemImageToPDF.IsShowConciseContent = IsShowConciseContent;
+            ToolItemMergePDF.IsShowConciseContent = IsShowConciseContent;
+            ToolItemCompressPDF.IsShowConciseContent = IsShowConciseContent;
+            ToolItemSecurity.IsShowConciseContent = IsShowConciseContent;
+            ToolItem1.IsShowConciseContent = IsShowConciseContent;
+            ToolItem2.IsShowConciseContent = IsShowConciseContent;
+            ToolItem3.IsShowConciseContent = IsShowConciseContent;
+            ToolItem4.IsShowConciseContent = IsShowConciseContent;
+            ToolItem5.IsShowConciseContent = IsShowConciseContent;
+            ToolItem6.IsShowConciseContent = IsShowConciseContent;
+            ToolItem7.IsShowConciseContent = IsShowConciseContent;
+            
+        }
+
+        /// <summary>
+        /// 编辑工具
+        /// </summary>
+        private void BtnTools_Click(object sender, RoutedEventArgs e)
+        {
+           
+        }
+
+        private void GridAllTools_SizeChanged(object sender, SizeChangedEventArgs e)
+        {
+
+        }
+    }
+}

+ 69 - 0
PDF Office/Views/HomePanel/HomeToolItem.xaml

@@ -0,0 +1,69 @@
+<UserControl x:Class="PDF_Office.Views.HomePanel.HomeToolItem"
+             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">
+    <UserControl.Resources>
+        <convert:BoolToVisible x:Key="boolToVisible"/>
+        <convert:InvertBoolToVisibleConvert x:Key="invertBoolToVisibleConvert"/>
+    </UserControl.Resources>
+    <Grid  Margin="0,1,8,8">
+
+        <Border x:Name="BorderExtend" Height="108" Width="230"  CornerRadius="8" Background="White" BorderThickness="2" BorderBrush="#04000000"
+                Visibility="{Binding ElementName=usercontrol,Path=IsShowConciseContent,Converter={StaticResource invertBoolToVisibleConvert}}">
+
+            <Grid  Background="Transparent" MouseEnter="Border_MouseEnter" MouseLeave="Border_MouseLeave">
+                <Grid Margin="10">
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="auto"></ColumnDefinition>
+                        <ColumnDefinition Width="*"></ColumnDefinition>
+                    </Grid.ColumnDefinitions>
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="auto"></RowDefinition>
+                        <RowDefinition Height="*"></RowDefinition>
+                    </Grid.RowDefinitions>
+                    <Rectangle VerticalAlignment="Top" HorizontalAlignment="Center" Width="32" Height="32" Margin="5,10,5,5" >
+                        <Rectangle.Fill>
+                            <ImageBrush x:Name="IconBrush" ></ImageBrush>
+                        </Rectangle.Fill>
+                    </Rectangle>
+                    <TextBlock  Name="TxbTitle" Grid.Column="1" Text="{Binding ElementName=usercontrol,Path= ToolTitile}" 
+                                    FontSize="14" FontWeight="SemiBold" Foreground="Black"
+                                    VerticalAlignment="Top" Margin="0,15,0,0"></TextBlock>
+
+
+                    <StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1"  Margin="6,0,6,0">
+                        <Grid>
+                            <TextBlock Name="ToolInfoBlock" Text="{Binding ElementName=usercontrol,Path= ToolInfo}"
+                                       Foreground="#666666" LineHeight="16"  FontSize="12"  TextWrapping="Wrap" VerticalAlignment="Center" Margin="0,8,0,0"></TextBlock>
+                        </Grid>
+
+                    </StackPanel>
+                </Grid>
+            </Grid>
+        </Border>
+
+        <Border x:Name="BorderConcise" Height="64" Width="230"  CornerRadius="8" Background="White" BorderThickness="2" BorderBrush="#04000000" Visibility="{Binding ElementName=usercontrol,Path=IsShowConciseContent,Converter={StaticResource boolToVisible}}">
+            <Grid Background="Transparent" MouseEnter="Border_MouseEnter" MouseLeave="Border_MouseLeave">
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="auto"/>
+                    <ColumnDefinition Width="*"/>
+                </Grid.ColumnDefinitions>
+                <Grid x:Name="GridToolMaskConcise" Grid.ColumnSpan="2" Background="#477EDE" Visibility="Collapsed"/>
+                <Rectangle VerticalAlignment="Top" HorizontalAlignment="Center" Width="32" Height="32" Margin="5,10,5,5" >
+                    <Rectangle.Fill>
+                        <ImageBrush x:Name="IconConcise" ></ImageBrush>
+                    </Rectangle.Fill>
+                </Rectangle>
+
+                <TextBlock  Name="TxbTitleConcise" Grid.Column="1" Text="{Binding ElementName=usercontrol,Path= ToolTitile}" FontSize="14" FontWeight="SemiBold" VerticalAlignment="Top" Margin="0,15,0,0"></TextBlock>
+            </Grid>
+        </Border>
+        
+    </Grid>
+</UserControl>

+ 202 - 0
PDF Office/Views/HomePanel/HomeToolItem.xaml.cs

@@ -0,0 +1,202 @@
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+
+namespace PDF_Office.Views.HomePanel
+{
+    /// <summary>
+    /// HomeToolItem.xaml 的交互逻辑
+    /// </summary>
+    public partial class HomeToolItem : UserControl
+    {
+        public HomeToolItem()
+        {
+            InitializeComponent();
+            this.Loaded += usercontrol_Loaded;
+            
+        }
+
+        private void usercontrol_Loaded(object sender, RoutedEventArgs e)
+        {
+            try
+            {
+                Grid Control = sender as Grid;
+
+                if (Control != null)
+                {
+                    ShowisHover(false);
+                }
+                if (IconPath != string.Empty)
+                {
+                    BitmapImage ImageItem = new BitmapImage(new Uri(IconPath));
+                    IconBrush.ImageSource = ImageItem;
+                    IconConcise.ImageSource = ImageItem;
+                }
+                InitContent();
+            }
+            catch (Exception ex)
+            {
+
+            }
+        }
+
+        private void InitContent()
+        {
+            if(ToolTitile != string.Empty)
+            {
+              //  TitleBlock_Hov.Text = TitleBlock.Text =  App.HomePageLoader.GetString(ToolTitile);
+            }
+
+            if(ToolInfo != string.Empty)
+            {
+             //   ToolInfoBlock.Text = ToolInfoBlock_Hov.Text = App.HomePageLoader.GetString(ToolInfo);
+            }
+        }
+
+        private void Border_MouseEnter(object sender, MouseEventArgs e)
+        {
+            try
+            {
+                Grid Control = sender as Grid;
+                if (Control != null)
+                {
+                    ShowisHover(true);
+                }
+                if (IconHoverPath != string.Empty)
+                {
+                    BitmapImage ImageItem = new BitmapImage(new Uri(IconHoverPath));
+                    IconBrush.ImageSource = ImageItem;
+                    IconConcise.ImageSource = ImageItem;
+                }
+               
+            }
+            catch (Exception ex)
+            {
+
+            }
+        }
+
+        private void Border_MouseLeave(object sender, MouseEventArgs e)
+        {
+            try
+            {
+                Grid Control = sender as Grid;
+
+                if (Control != null)
+                {
+                    ShowisHover(false);
+                }
+                if (IconPath != string.Empty)
+                {
+                    BitmapImage ImageItem = new BitmapImage(new Uri(IconPath));
+                    IconBrush.ImageSource = ImageItem;
+                    IconConcise.ImageSource = ImageItem;
+                }
+
+               
+            }
+            catch (Exception ex)
+            {
+
+            }
+        }
+
+        /// <summary>
+        /// 光标悬浮和离开区域时,各UI显示效果
+        /// </summary>
+        /// <param name="ishover">是否处于悬浮状态</param>
+        private void ShowisHover(bool ishover)
+        {
+            if(ishover)
+            {
+                BorderConcise.Background = BorderExtend.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#477EDE"));
+                BorderConcise.BorderThickness = BorderExtend.BorderThickness = new Thickness(2);
+                TxbTitleConcise.Foreground = TxbTitle.Foreground = new SolidColorBrush(Colors.White);
+                ToolInfoBlock.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFFFFF"));
+           
+            }
+            else
+            {
+                BorderConcise.Background = BorderExtend.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFFFFF"));
+                BorderConcise.BorderThickness = BorderExtend.BorderThickness = new Thickness(0);
+                TxbTitleConcise.Foreground = TxbTitle.Foreground = new SolidColorBrush(Colors.Black);
+                ToolInfoBlock.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#666666"));
+               
+            }
+        }
+
+        public string IconPath
+        {
+            get
+            {
+                return (string)GetValue(IconPathProperty);
+            }
+            set
+            {
+                SetValue(IconPathProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty IconPathProperty = DependencyProperty.Register("IconPath", typeof(string), typeof(HomeToolItem), new PropertyMetadata(string.Empty));
+        public string IconHoverPath
+        {
+            get
+            {
+                return (string)GetValue(IconHoverPathProperty);
+            }
+            set
+            {
+                SetValue(IconHoverPathProperty, value);
+            }
+        }
+        public static readonly DependencyProperty IconHoverPathProperty = DependencyProperty.Register("IconHoverPath", typeof(string), typeof(HomeToolItem), new PropertyMetadata(string.Empty));
+
+        public string ToolTitile
+        {
+            get
+            {
+                return (string)GetValue(ToolTitileProperty);
+            }
+            set
+            {
+                SetValue(ToolTitileProperty, value);
+            }
+        }
+        public static readonly DependencyProperty ToolTitileProperty = DependencyProperty.Register("ToolTitile", typeof(string), typeof(HomeToolItem), new PropertyMetadata(string.Empty));
+
+        public string ToolInfo
+        {
+            get
+            {
+                return (string)GetValue(ToolInfoProperty);
+            }
+            set
+            {
+                SetValue(ToolInfoProperty, value);
+            }
+        }
+        public static readonly DependencyProperty ToolInfoProperty = DependencyProperty.Register("ToolInfo", typeof(string), typeof(HomeToolItem), new PropertyMetadata(string.Empty));
+
+
+        /// <summary>
+        /// 是否收缩UI
+        /// </summary>
+        public bool IsShowConciseContent
+        {
+            get
+            {
+                return (bool)GetValue(IsShowConciseContentProperty);
+            }
+            set
+            {
+                SetValue(IsShowConciseContentProperty, value);
+            }
+        }
+        public static readonly DependencyProperty IsShowConciseContentProperty = DependencyProperty.Register("IsShowConciseContent", typeof(bool), typeof(HomeToolItem), new PropertyMetadata(false));
+
+
+    }
+}

+ 138 - 0
PDF Office/Views/HomePanel/RecentFilesView.xaml

@@ -0,0 +1,138 @@
+<UserControl x:Class="PDF_Office.Views.HomePanel.RecentFilesView"
+             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:customControl ="clr-namespace:PDF_Office.CustomControl"
+             mc:Ignorable="d" Loaded="UserControl_Loaded"
+             d:DesignHeight="450" d:DesignWidth="800">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="../../Styles/ListViewStyle.xaml"/>
+                <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml"/>
+            </ResourceDictionary.MergedDictionaries>
+            <DataTemplate x:Key="listviewItem">
+                <local:DocItemListViewControl HorizontalAlignment="Stretch"
+                                              FileInfoItemHandler="FileInfoMenuItem_Click"  
+                                              PrintItemHandler="PrintMenuItem_Click"  
+                                              DeleteItemHandler="DeleteItemHandler_Click"
+                                              ShareItemHandler="ShareMenuItem_Click"
+                                              FilePathItemHandler ="FilePathMenuItem_Click"
+                                              />
+            </DataTemplate>
+
+            <DataTemplate x:Key="gridviewItem">
+                <local:DocItemControl HorizontalAlignment="Stretch"/>
+            </DataTemplate>
+
+            <ItemsPanelTemplate x:Key="listPanel">
+                <StackPanel Orientation="Vertical"/>
+            </ItemsPanelTemplate>
+
+            <ItemsPanelTemplate x:Key="gridPanel">
+                <WrapPanel />
+            </ItemsPanelTemplate>
+
+            <Style x:Key="SubFilesListViewItemStyle" BasedOn="{StaticResource FilesListViewItemStyle}" TargetType="{x:Type ListViewItem}">
+                <Setter Property="Margin" Value="12,0,0,0"/>
+                <EventSetter Event="PreviewMouseRightButtonDown"
+                             Handler="ListViewItem_PreviewMouseRightButtonDown"/>
+                <EventSetter Event="PreviewMouseDoubleClick"
+                             Handler="RecentFilesList_PreviewMouseDoubleClick"/>
+            </Style>
+
+            <Style x:Key="HomeGridViewItemStyle" BasedOn="{StaticResource FilesGridItemStyle}" TargetType="{x:Type ListViewItem}">
+                <EventSetter Event="PreviewMouseRightButtonDown"
+                             Handler="ListViewItem_PreviewMouseRightButtonDown"/>
+                <EventSetter Event="PreviewMouseDoubleClick"
+                             Handler="RecentFilesList_PreviewMouseDoubleClick"/>
+            </Style>
+
+
+        </ResourceDictionary>
+      
+    </UserControl.Resources>
+    
+    <Grid>
+        <Grid>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="Auto"/>
+                <RowDefinition Height="Auto"/>
+                <RowDefinition />
+            </Grid.RowDefinitions>
+            <Grid x:Name="GridRecentFilesTile" Margin="32,38,0,13">
+                <TextBlock x:Name="TxbRecentlyTile" Text="Recently" HorizontalAlignment="Left" FontWeight="Semibold" FontSize="24" Padding="0,6,0,0" Margin="0,0,0,0"/>
+
+                <StackPanel x:Name="PnlRightBtns" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
+
+
+                    <customControl:CustomIconToggleBtn x:Name="BtnListMode" Tag="ListMode" Width="32" Height="24" Click="ListModeBtn_Click"
+                                              Style="{StaticResource ToggleBtnViewModeStyle}">
+                        <StackPanel Orientation="Horizontal" Margin="8,0,8,0">
+                            <Path Fill="Black" Data="M15 2H1V7H15V2ZM14 3V6H2V3H14ZM15 9H1V14H15V9ZM14 10V13H2V10H14Z"/>
+                        </StackPanel>
+                    </customControl:CustomIconToggleBtn>
+
+                    <customControl:CustomIconToggleBtn x:Name="BtnGridMode" Margin="0" Width="32" Height="24" Tag="GridMode" Click="GridModeBtn_Click" 
+                                              Style="{StaticResource ToggleBtnViewModeStyle}">
+                        <StackPanel Orientation="Horizontal" Margin="8,0,8,0">
+                            <Path Fill="Black" Data="M7 2H2V7H7V2ZM6 3V6H3V3H6ZM14 2H9V7H14V2ZM13 3V6H10V3H13ZM2 9H7V14H2V9ZM6 13V10H3V13H6ZM14 9H9V14H14V9ZM13 10V13H10V10H13Z"/>
+                        </StackPanel>
+                    </customControl:CustomIconToggleBtn>
+
+
+                    <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="1 0 1 0" Width="1" Height="16" BorderBrush="#1A000000" BorderThickness="1"/>
+
+                    <Button x:Name="BtnDelete" Margin="0" Padding="0,0,0,0" MaxHeight="40" Width="20" Height="20" Background="Transparent" BorderThickness="0" Click="btnDelete_Click"
+                         >
+                        <StackPanel Orientation="Horizontal">
+                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="4,0,4,0">
+                                <Path  Fill="Black" VerticalAlignment="Center" Data="M9 0H3V2H0V3H1V14H11V3H12V2H9V0ZM2 13V3H3H4H8H9H10V13H2ZM8 2V1H4V2H8ZM4 12V4H3V12H4ZM6.5 4V12H5.5V4H6.5ZM9 12V4H8V12H9Z"/>
+                            </StackPanel>
+                        </StackPanel>
+                    </Button>
+
+                </StackPanel>
+
+            </Grid>
+
+            <Grid  Grid.Row="2">
+                <ListView x:Name="RecentFilesList" Margin="32,0,0,0"
+                      VirtualizingPanel.IsVirtualizing="True" 
+                      VirtualizingPanel.CacheLengthUnit="Page"
+                      VirtualizingPanel.CacheLength="1"
+                      VirtualizingPanel.ScrollUnit="Pixel"
+                      ScrollViewer.HorizontalScrollBarVisibility="Disabled"
+                      ScrollViewer.VerticalScrollBarVisibility="Auto"
+                      Background="Transparent" BorderThickness="0" 
+                      Padding="0,0,0,0" MinHeight="216" MinWidth="380" 
+                      SelectionMode="Multiple"
+                      SelectionChanged="RecentFilesList_SelectionChanged"
+                      ItemContainerStyle="{StaticResource FilesGridItemStyle}"
+                      Style="{StaticResource FilesGridViewStyle}"
+                      ItemTemplate="{StaticResource gridviewItem}"
+                     ItemsPanel="{StaticResource gridPanel}"
+                     >
+                </ListView>
+
+            </Grid>
+            <StackPanel x:Name="BlankContentPanel" Grid.Row="1" Grid.RowSpan="2"  HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
+                <!--<Image Source="../../Resources/Image/Home/empty_recent2x.png" Width="140" Height="140" Stretch="Uniform" VerticalAlignment="Center"/>-->
+                <TextBlock x:Name="NoFilesText" Text="No documents" TextAlignment="Center"  HorizontalAlignment="Center" FontSize="16" LineHeight="22" Foreground="#FF333333" FontFamily="Segoe UI" />
+                <StackPanel Orientation="Horizontal" Margin="0,12,0,0">
+                    <TextBlock x:Name="clickFileText" Text="Drop documents here or click the '" Foreground="#FF999999" VerticalAlignment="Center" FontSize="14"/>
+                    <TextBlock  Margin="2,0,2,0" VerticalAlignment="Center" FontSize="15">
+                        <!--<Hyperlink Style="{StaticResource hyberlinkstyle}"  Click="OpenFiles_Click">
+                            <TextBlock x:Name="OpenFilesLinkText" Text="Open Files"/>
+                        </Hyperlink>-->
+                    </TextBlock>
+                    <TextBlock x:Name="dropFileText" Text="' button in the Sidebar" Foreground="#FF999999" VerticalAlignment="Center" FontSize="14"/>
+                </StackPanel>
+
+            </StackPanel>
+        </Grid>
+    </Grid>
+    
+</UserControl>

+ 229 - 0
PDF Office/Views/HomePanel/RecentFilesView.xaml.cs

@@ -0,0 +1,229 @@
+using ComPDFKitViewer.PdfViewer;
+using Microsoft.Win32;
+using PDF_Office.CustomControl;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.IO;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Navigation;
+
+namespace PDF_Office.Views.HomePanel
+{
+    public partial class RecentFilesView : UserControl
+    {
+       
+        private ObservableCollection<string> RecentFilesGroup = new ObservableCollection<string>();
+        public RecentFilesView()
+        {
+            InitializeComponent();
+            RecentFilesGroup.Add("");
+            RecentFilesGroup.Add("");
+            RecentFilesGroup.Add("");
+            RecentFilesGroup.Add("");
+            RecentFilesGroup.Add("");
+
+            RecentFilesList.ItemsSource = RecentFilesGroup;
+ 
+        }
+
+        private void SetLangText()
+        {
+
+        }
+
+        private void InitContextMenu()
+        {
+
+        }
+
+        private void InitUI()
+        {
+
+        }
+
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        #region UI
+        #region 列表和网格模式
+        private void ListModeBtn_Click(object sender, RoutedEventArgs e)
+        {
+            SwitchFilesMode(sender);
+
+            if (BtnListMode.IsChecked == false)
+                BtnListMode.IsChecked = true;
+        }
+
+        private void GridModeBtn_Click(object sender, RoutedEventArgs e)
+        {
+            SwitchFilesMode(sender);
+
+            if (BtnGridMode.IsChecked == false)
+                BtnGridMode.IsChecked = true;
+        }
+
+        private void SwitchFilesMode(object sender)
+        {
+            try
+            {
+                var btn = sender as CustomIconToggleBtn;
+                switch (btn.Tag.ToString())
+                {
+                    case "ListMode":
+                        if (RecentFilesList.ItemTemplate == Resources["gridviewItem"] as DataTemplate)
+                        {
+                            RecentFilesList.ItemsPanel = Resources["listPanel"] as ItemsPanelTemplate;
+                            RecentFilesList.ItemTemplate = Resources["listviewItem"] as DataTemplate;
+                            RecentFilesList.ItemContainerStyle = Resources["SubFilesListViewItemStyle"] as Style;
+                            RecentFilesList.Style = Resources["FilesListViewStyle"] as Style;
+                            BtnGridMode.IsChecked = false;
+                        }
+                        break;
+
+                    case "GridMode":
+                        if (RecentFilesList.ItemTemplate == Resources["listviewItem"] as DataTemplate)
+                        {
+                            RecentFilesList.ItemTemplate = Resources["gridviewItem"] as DataTemplate;
+                            RecentFilesList.ItemsPanel = Resources["gridPanel"] as ItemsPanelTemplate;
+                            RecentFilesList.ItemContainerStyle = Resources["HomeGridViewItemStyle"] as Style;
+                            RecentFilesList.Style = Resources["FilesGridViewStyle"] as Style;
+                            BtnListMode.IsChecked = false;
+                        }
+                        break;
+                }
+              
+            }
+            catch { }
+        }
+
+        private void ShowListViewContentUI()
+        {
+            if (RecentFilesList.Items.Count == 0)
+            {
+                BlankContentPanel.Visibility = Visibility.Visible;
+                RecentFilesList.Visibility = Visibility.Collapsed;
+                PnlRightBtns.Visibility = Visibility.Collapsed;
+            }
+            else
+            {
+                RecentFilesList.Visibility = Visibility.Visible;
+                PnlRightBtns.Visibility = Visibility.Visible;
+                BlankContentPanel.Visibility = Visibility.Collapsed;
+            }
+        }
+
+        #endregion
+
+        private void btnDelete_Click(object sender, RoutedEventArgs e)
+        {
+           
+        }
+
+        private void RecentFilesList_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+           
+        }
+
+        private void ContextMenu_Opened(object sender, RoutedEventArgs e)
+        {
+           
+        }
+
+        /// <summary>
+        /// 未被选中的项目,或只有一个被选中的项
+        /// </summary>
+        private void showMoreContexMenu(ContextMenu contexMenu)
+        {
+            foreach (var item in contexMenu.Items)
+            {
+                var menuitem = item as MenuItem;
+                menuitem.Visibility = Visibility.Visible;
+               
+            }
+        }
+
+        private void ListViewItem_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            Trace.WriteLine("Preview MouseRightButtonDown");
+            e.Handled = true;
+        }
+        #endregion
+
+        #region Events
+        /// <summary>
+        /// 删除最近文件的操作
+        /// </summary>
+        /// <param name="selectedItemsType">0:全部文件;1:一个文件;2:多个文件</param>
+        private void RemoveRecentFilesFrom(int selectedItemsType)
+        {
+
+        }
+
+        private void DeleteMenuItem_Click(object sender, RoutedEventArgs e)
+        {
+
+            DeleteFileItem(sender);
+        }
+
+        private void DeleteItemHandler_Click(object sender, RoutedEventArgs e)
+        {
+            DeleteFileItem(sender);
+        }
+
+        private bool IsSelectedFile(object sender)
+        {
+
+            return true;
+        }
+
+        private void DeleteFileItem(object sender)
+        {
+
+        }
+
+        private void RecentFilesList_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
+        {
+
+        }
+
+        private void OpenFiles_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+        #endregion
+
+        private void PrintFile(CPDFViewer pdfViewer)
+        {
+           
+        }
+
+
+        private void PrintMenuItem_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void FileInfoMenuItem_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void ShareMenuItem_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void FilePathMenuItem_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+    }
+}