SplitScreenContent.xaml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <UserControl
  2. x:Class="PDF_Office.Views.PropertyPanel.ViewModular.SplitScreenContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:AnnotPanel="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
  6. xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
  7. xmlns:DataConvert="clr-namespace:PDF_Office.DataConvert"
  8. xmlns:ViewModular="clr-namespace:PDF_Office.ViewModels.PropertyPanel.ViewModular"
  9. xmlns:customControl="clr-namespace:PDF_Office.CustomControl"
  10. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  11. xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.ViewModular"
  12. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  13. xmlns:prism="http://prismlibrary.com/"
  14. d:DataContext="{d:DesignInstance Type=ViewModular:SplitScreenContentViewModel}"
  15. d:DesignHeight="700"
  16. d:DesignWidth="500"
  17. prism:ViewModelLocator.AutoWireViewModel="True"
  18. mc:Ignorable="d">
  19. <UserControl.Resources>
  20. <ResourceDictionary>
  21. <DataConvert:BoolToVisible x:Key="BoolToVisible" />
  22. <Style x:Key="ListboxItemStyle" TargetType="{x:Type ListBoxItem}">
  23. <Setter Property="HorizontalAlignment" Value="Stretch" />
  24. <Setter Property="Height" Value="30" />
  25. <Setter Property="Template">
  26. <Setter.Value>
  27. <ControlTemplate TargetType="{x:Type ContentControl}">
  28. <Border
  29. x:Name="border"
  30. Padding="10,0"
  31. Background="{TemplateBinding Background}">
  32. <ContentPresenter />
  33. </Border>
  34. </ControlTemplate>
  35. </Setter.Value>
  36. </Setter>
  37. <Style.Triggers>
  38. <Trigger Property="IsMouseOver" Value="True">
  39. <Setter Property="Background" Value="#e2e3e5" />
  40. </Trigger>
  41. <Trigger Property="IsMouseOver" Value="False">
  42. <Setter Property="Background" Value="Transparent" />
  43. </Trigger>
  44. <Trigger Property="IsSelected" Value="True">
  45. <Setter Property="Background" Value="#e2e3e5" />
  46. </Trigger>
  47. </Style.Triggers>
  48. </Style>
  49. </ResourceDictionary>
  50. </UserControl.Resources>
  51. <Grid>
  52. <StackPanel
  53. Name="StkpnlContent"
  54. HorizontalAlignment="Center"
  55. VerticalAlignment="Center"
  56. Orientation="Vertical"
  57. Visibility="{Binding StkpnlContentVisibility}">
  58. <Border
  59. Width="130"
  60. Height="180"
  61. BorderThickness="2"
  62. CornerRadius="4">
  63. <Border.BorderBrush>
  64. <VisualBrush>
  65. <VisualBrush.Visual>
  66. <Rectangle
  67. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  68. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}"
  69. Stroke="Black"
  70. StrokeDashArray="4 3" />
  71. </VisualBrush.Visual>
  72. </VisualBrush>
  73. </Border.BorderBrush>
  74. <Button
  75. x:Name="BtnAddFile"
  76. Width="130"
  77. Height="180"
  78. Background="Transparent"
  79. Command="{Binding AddFileCommand}"
  80. Style="{StaticResource btn.icon-fill}">
  81. <Button.Content>
  82. <Path Data="M13.3333 16.6667V30H16.6667V16.6667H30V13.3333H16.6667V0H13.3333V13.3333H0V16.6667H13.3333Z" Fill="#94989C" />
  83. </Button.Content>
  84. </Button>
  85. </Border>
  86. <!--<Button
  87. Grid.Column="0"
  88. Height="30"
  89. Padding="10,6"
  90. Content="Select PDF"
  91. Foreground="#252629"
  92. Style="{StaticResource btn.sec}" />-->
  93. <customControl:CustomIconToggleBtn
  94. x:Name="BtnSelectedFiles"
  95. Width="140"
  96. Height="32"
  97. Margin="0,50,0,0"
  98. HorizontalAlignment="Center"
  99. VerticalAlignment="Center"
  100. Background="White"
  101. BorderThickness="0"
  102. Click="BtnSelectedFiles_Click"
  103. Initialized="BtnSelectedFiles_Initialized">
  104. <ToggleButton.Content>
  105. <StackPanel Orientation="Horizontal">
  106. <TextBlock
  107. Width="100"
  108. HorizontalAlignment="Left"
  109. VerticalAlignment="Stretch"
  110. Text="Select PDF" />
  111. <Path
  112. HorizontalAlignment="Left"
  113. Data="M6 7.56427L2.03039 3.59467L0.969727 4.65533L5.46967 9.15526C5.76256 9.44816 6.23743 9.44816 6.53033 9.15526L11.0303 4.65533L9.9696 3.59467L6 7.56427Z"
  114. Fill="#94989C" />
  115. </StackPanel>
  116. </ToggleButton.Content>
  117. <ToggleButton.ContextMenu>
  118. <ContextMenu Name="MenuSelectedFiles" Placement="Bottom" />
  119. </ToggleButton.ContextMenu>
  120. </customControl:CustomIconToggleBtn>
  121. <!--<ListBox
  122. x:Name="ListSelectedFiles"
  123. Margin="0,3,0,0"
  124. BorderThickness="0"
  125. ItemContainerStyle="{StaticResource ListboxItemStyle}"
  126. ItemsSource="{Binding SelectedFiles}"
  127. Visibility="{Binding ElementName=BtnSelectedFiles, Path=IsChecked, Converter={StaticResource ResourceKey=BoolToVisible}}">
  128. <ListBox.ItemsPanel>
  129. <ItemsPanelTemplate>
  130. <StackPanel
  131. IsItemsHost="True"
  132. Orientation="Vertical"
  133. ScrollViewer.CanContentScroll="True" />
  134. </ItemsPanelTemplate>
  135. </ListBox.ItemsPanel>
  136. <ListBox.ItemTemplate>
  137. <DataTemplate>
  138. <TextBlock VerticalAlignment="Center" Text="{Binding}" />
  139. </DataTemplate>
  140. </ListBox.ItemTemplate>
  141. </ListBox>-->
  142. </StackPanel>
  143. <Grid
  144. HorizontalAlignment="Stretch"
  145. VerticalAlignment="Stretch"
  146. Visibility="{Binding PDFViewerVisibility}">
  147. <ContentControl
  148. x:Name="PDFViewerContent"
  149. HorizontalAlignment="Stretch"
  150. VerticalAlignment="Stretch"
  151. prism:RegionManager.RegionName="{Binding SplitViewRegionName}" />
  152. <customControl:CustomIconToggleBtn
  153. x:Name="BtnReselect"
  154. Width="32"
  155. Height="32"
  156. Margin="0,0,20,0"
  157. HorizontalAlignment="Right"
  158. VerticalAlignment="Top"
  159. Background=" #FFFFFF"
  160. BorderThickness="0"
  161. Click="BtnReselect_Click"
  162. Initialized="BtnReselect_Initialized"
  163. MouseEnter="RectReselect_MouseEnter"
  164. MouseLeave="BtnReselect_MouseLeave"
  165. Style="{StaticResource ToggleBtnScreenAnnotationStyle}">
  166. <ToggleButton.Content>
  167. <Path Data="M6.39722 5.49998L5.95192 4.83203L4.82691 3.14451C4.80836 3.11669 4.77714 3.09998 4.74371 3.09998H1.6C1.54477 3.09998 1.5 3.14475 1.5 3.19998V12.8C1.5 12.8552 1.54477 12.9 1.6 12.9H14.4C14.4552 12.9 14.5 12.8552 14.5 12.8V5.59998C14.5 5.54475 14.4552 5.49998 14.4 5.49998H7.2H6.39722ZM1.6 1.59998C0.716345 1.59998 0 2.31632 0 3.19998V12.8C0 13.6836 0.716345 14.4 1.6 14.4H14.4C15.2837 14.4 16 13.6836 16 12.8V5.59998C16 4.71632 15.2837 3.99998 14.4 3.99998H7.2L6.07499 2.31246C5.77824 1.86734 5.27867 1.59998 4.74371 1.59998H1.6Z" Fill="#616469" />
  168. </ToggleButton.Content>
  169. <ToggleButton.ContextMenu>
  170. <ContextMenu Name="MenuReselect" Placement="Bottom">
  171. <MenuItem
  172. Command="{Binding AddFileCommand}"
  173. Header="Select file" />
  174. </ContextMenu>
  175. </ToggleButton.ContextMenu>
  176. </customControl:CustomIconToggleBtn>
  177. <Rectangle
  178. x:Name="RectReselect"
  179. Width="40"
  180. Height="40"
  181. Margin="0,0,20,0"
  182. HorizontalAlignment="Right"
  183. VerticalAlignment="Top"
  184. Fill="Transparent"
  185. MouseEnter="RectReselect_MouseEnter" />
  186. <ContentControl
  187. x:Name="SplitScreenPage"
  188. Margin="0,0,0,14"
  189. HorizontalAlignment="Center"
  190. VerticalAlignment="Bottom"
  191. prism:RegionManager.RegionName="{Binding SplitScreenPageRegionName}" />
  192. </Grid>
  193. </Grid>
  194. </UserControl>