123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- <UserControl
- x:Class="PDF_Office.Views.ViewContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Viewer="clr-namespace:ComPDFKitViewer.PdfViewer;assembly=ComPDFKit.Viewer"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:PDF_Office.Views"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- d:DesignHeight="450"
- d:DesignWidth="800"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <Style x:Key="TabControlWithUnderLineStyle" TargetType="{x:Type TabControl}">
- <Setter Property="Padding" Value="2" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="#FFACACAC" />
- <Setter Property="BorderThickness" Value="0,0,0,1" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TabControl}">
- <Grid
- x:Name="templateRoot"
- ClipToBounds="True"
- KeyboardNavigation.TabNavigation="Local"
- SnapsToDevicePixels="True">
- <Grid.ColumnDefinitions>
- <ColumnDefinition x:Name="ColumnDefinition0" />
- <ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition x:Name="RowDefinition0" Height="Auto" />
- <RowDefinition x:Name="RowDefinition1" Height="*" />
- </Grid.RowDefinitions>
- <!-- 加滑轨配合滑轨样式可实现箭头左右滚动的菜单栏 -->
- <!--<ScrollViewer Margin="140 0 140 0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">-->
- <TabPanel
- x:Name="HeaderPanel"
- Grid.Row="0"
- Grid.Column="0"
- Margin="30,0"
- HorizontalAlignment="Center"
- Panel.ZIndex="1"
- Background="Transparent"
- IsItemsHost="True"
- KeyboardNavigation.TabIndex="1" />
- <!--</ScrollViewer>-->
- <!-- 页头和中间内容的分割线 -->
- <Line
- Margin="0,0,0,1"
- VerticalAlignment="Bottom"
- SnapsToDevicePixels="True"
- Stroke="Transparent"
- StrokeThickness="0.1"
- X1="0"
- X2="{Binding ActualWidth, RelativeSource={RelativeSource Self}}" />
- <Border
- x:Name="ContentPanel"
- Grid.Row="1"
- Grid.Column="0"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- KeyboardNavigation.DirectionalNavigation="Contained"
- KeyboardNavigation.TabIndex="2"
- KeyboardNavigation.TabNavigation="Local">
- <ContentPresenter
- x:Name="PART_SelectedContentHost"
- Margin="0"
- Content="{TemplateBinding SelectedContent}"
- ContentSource="SelectedContent"
- ContentStringFormat="{TemplateBinding SelectedContentStringFormat}"
- ContentTemplate="{TemplateBinding SelectedContentTemplate}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="TabStripPlacement" Value="Bottom">
- <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
- <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="Auto" />
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Left">
- <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="ContentPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
- <Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
- </Trigger>
- <Trigger Property="TabStripPlacement" Value="Right">
- <Setter TargetName="HeaderPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="ContentPanel" Property="Grid.Row" Value="0" />
- <Setter TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
- <Setter TargetName="ContentPanel" Property="Grid.Column" Value="0" />
- <Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
- <Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
- <Setter TargetName="RowDefinition0" Property="Height" Value="*" />
- <Setter TargetName="RowDefinition1" Property="Height" Value="0" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Cycle" />
- <Setter Property="KeyboardNavigation.TabNavigation" Value="Cycle" />
- </Style>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Name="HeadRow" Height="40" />
- <RowDefinition Name="ToolRow" Height="40" />
- <RowDefinition Height="*" />
- <RowDefinition Height="24" />
- </Grid.RowDefinitions>
- <!-- 左边菜单按钮 -->
- <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
- <Button
- Width="16"
- Height="16"
- Margin="8"
- ToolTip="File" />
- <Button
- Width="16"
- Height="16"
- Margin="8"
- ToolTip="Save" />
- <Button
- Width="16"
- Height="16"
- Margin="8"
- ToolTip="Undo" />
- <Button
- Width="16"
- Height="16"
- Margin="8"
- ToolTip="Redo" />
- </StackPanel>
- <!-- 右边菜单按钮 -->
- <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
- <Button
- Width="16"
- Height="16"
- Margin="8"
- ToolTip="Print" />
- <Button
- Width="16"
- Height="16"
- Margin="8"
- ToolTip="Share" />
- <Button
- Width="16"
- Height="16"
- Margin="8"
- ToolTip="Property" />
- </StackPanel>
- <TabControl
- x:Name="ToolTabControl"
- Grid.Row="0"
- Grid.RowSpan="2"
- VerticalAlignment="Top"
- BorderThickness="0"
- Style="{StaticResource TabControlWithUnderLineStyle}">
- <TabItem Height="40" Header="注释">
- <Grid Grid.Row="1" Height="40" />
- </TabItem>
- <TabItem Header="页面" />
- <TabItem Header="转换" />
- <TabItem Header="扫描和OCR">
- <Grid Grid.Row="1" Height="40" />
- </TabItem>
- <TabItem Height="40" Header="编辑">
- <Grid Grid.Row="1" Height="40" />
- </TabItem>
- <TabItem Height="40" Header="表单">
- <Grid Grid.Row="1" Height="40" />
- </TabItem>
- <TabItem Height="40" Header="填写与签名">
- <Grid Grid.Row="1" Height="40" />
- </TabItem>
- <TabItem Height="40" Header="工具">
- <Grid Grid.Row="1" Height="40" />
- </TabItem>
- </TabControl>
- <Grid Name="DocumentView" Grid.Row="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition
- x:Name="BOTACloumn"
- Width="48"
- MinWidth="48"
- MaxWidth="400" />
- <ColumnDefinition Width="12" />
- <ColumnDefinition
- Name="ViewerColumn"
- Width="*"
- MinWidth="200" />
- <ColumnDefinition Width="12" />
- <ColumnDefinition Name="PropertyColumn" Width="0" />
- </Grid.ColumnDefinitions>
- <ContentControl prism:RegionManager.RegionName="{Binding BOTARegionName}" />
- <GridSplitter
- Grid.Column="1"
- Width="12"
- FocusVisualStyle="{x:Null}"
- ResizeBehavior="PreviousAndNext"
- ShowsPreview="True" />
- <ContentControl
- x:Name="PDFViewerContent"
- Grid.Column="2"
- HorizontalAlignment="Stretch"
- prism:RegionManager.RegionName="{Binding ViwerRegionName}" />
- <Button Grid.Column="3" />
- <ContentControl Grid.Column="4" prism:RegionManager.RegionName="{Binding PropertyRegionName}" />
- </Grid>
- <local:BottomToolContent Grid.Row="3" />
- <ContentControl
- Grid.Row="2"
- Grid.RowSpan="2"
- Visibility="Collapsed">
- <Grid Background="Red" />
- </ContentControl>
- </Grid>
- </UserControl>
|