-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDocxViewer.xaml
89 lines (86 loc) · 3.71 KB
/
DocxViewer.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<UserControl x:Class="Berry.DocxViewer.DocxViewer"
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:Berry.DocxViewer"
mc:Ignorable="d"
d:DesignHeight="850" d:DesignWidth="900" Background="#E6E6E6">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid AllowDrop="True" Drop="OnFileDrop"
PreviewMouseWheel="OnScaling">
<Grid.ContextMenu>
<ContextMenu>
<MenuItem Name="RefreshMenu" Header="刷新" Click="RefreshMenu_Click" />
</ContextMenu>
</Grid.ContextMenu>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition />
<RowDefinition Height="22"/>
</Grid.RowDefinitions>
<!-- Header -->
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="1"/>
</Grid.RowDefinitions>
<Grid Background="#f4f4f6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Style="{StaticResource ButtonStyle1}" Name="UIOpenFileBtn"
Click="UIOpenFileBtn_Click">文件</Button>
</Grid>
<Border Grid.Row="1" BorderThickness="1" BorderBrush="#d2d2d2"/>
</Grid>
<!-- Body -->
<ScrollViewer Name="UIScrollArea" Grid.Row="1"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
ScrollChanged="UIScrollArea_ScrollChanged">
<ScrollViewer.Resources>
<Style TargetType="ScrollBar" BasedOn="{StaticResource ScrollBarStyle1}"/>
</ScrollViewer.Resources>
<StackPanel Name="UIPageArea"
HorizontalAlignment="Center"
Margin="20,20,0,0">
</StackPanel>
</ScrollViewer>
<!-- Footer -->
<Grid Grid.Row="2" Background="#f3f3f3">
<Grid.RowDefinitions>
<RowDefinition Height="1"/>
<RowDefinition />
</Grid.RowDefinitions>
<Border BorderThickness="1" BorderBrush="#d2d2d2"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="20,0,0,0">
<Label Name="UICurrentPage"
Padding="0"
VerticalContentAlignment="Center"></Label>
<Label Name="UITotalPage"
Padding="0"
VerticalContentAlignment="Center"></Label>
</StackPanel>
<Label Grid.Column="3"
Name="UIScale"
Padding="0"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"></Label>
</Grid>
</Grid>
</Grid>
</UserControl>