BackgroundDocumentContent.xaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <UserControl x:Class="PDF_Master.Views.EditTools.Background.BackgroundDocumentContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. prism:ViewModelLocator.AutoWireViewModel="True"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:background="clr-namespace:PDF_Master.ViewModels.EditTools.Background" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" d:DataContext="{d:DesignInstance Type=background:BackgroundDocumentContentViewModel}"
  8. mc:Ignorable="d"
  9. d:DesignHeight="720"
  10. d:DesignWidth="1020" >
  11. <UserControl.Resources>
  12. <Style TargetType="Button" x:Key="btn">
  13. <Style.Triggers>
  14. <Trigger Property="IsMouseOver" Value="True">
  15. <Setter Property="Background" Value="Transparent"></Setter>
  16. </Trigger>
  17. </Style.Triggers>
  18. </Style>
  19. </UserControl.Resources>
  20. <Grid>
  21. <ContentControl
  22. x:Name="PDFViewerContent"
  23. HorizontalAlignment="Stretch"
  24. prism:RegionManager.RegionName="{Binding ViewerRegionName}" />
  25. <Border CornerRadius="4" Background="#323232" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="41,0,0,25" Height="53" Width="93" Panel.ZIndex="1" >
  26. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
  27. <Grid>
  28. <Button Name="ShowInputIndexBoxBtn" Background="Transparent" BorderThickness="0" Padding="0" Style="{StaticResource btn}">
  29. <Label Content="{Binding CurrentPageIndex, Mode=TwoWay}" Foreground="White" FontSize="20"></Label>
  30. <i:Interaction.Triggers>
  31. <i:EventTrigger EventName="MouseDoubleClick">
  32. <i:InvokeCommandAction Command="{Binding ShowInputIndexBoxCommand}" CommandParameter="{Binding ElementName=ShowInputIndexBoxBtn}"/>
  33. </i:EventTrigger>
  34. </i:Interaction.Triggers>
  35. </Button>
  36. <TextBox Name="CurrentPageIndexBox" Visibility="{Binding InputIndexBoxVisible}" KeyDown="CurrentPageIndexBox_KeyDown" VerticalContentAlignment="Center">
  37. </TextBox>
  38. </Grid>
  39. <TextBlock Text="/" Foreground="White" FontSize="20" VerticalAlignment="Center" Margin="2,0,2,0"></TextBlock>
  40. <TextBlock Text="{Binding PageRangeNumber, Mode=TwoWay}" FontSize="20" Foreground="White" VerticalAlignment="Center"></TextBlock>
  41. </StackPanel>
  42. </Border>
  43. </Grid>
  44. </UserControl>