PaginationControl.xaml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <UserControl
  2. x:Class="PDF_Office.CustomControl.PaginationControl"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:PDF_Office.CustomControl"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. Height="36"
  10. d:DesignHeight="450"
  11. Foreground="{StaticResource color.sys.text.anti.norm}"
  12. mc:Ignorable="d">
  13. <Border Background="{StaticResource color.sys.layout.dark.bg}" CornerRadius="{StaticResource radius.base.m}">
  14. <Grid
  15. Margin="16,6"
  16. HorizontalAlignment="Stretch"
  17. Background="Transparent">
  18. <Grid.ColumnDefinitions>
  19. <ColumnDefinition Width="auto" />
  20. <ColumnDefinition Width="auto" />
  21. <ColumnDefinition Width="auto" />
  22. </Grid.ColumnDefinitions>
  23. <Grid>
  24. <cus:TextBoxEx
  25. x:Name="TxtInput"
  26. Width="50"
  27. Height="24"
  28. CornerRadius="4"
  29. Foreground="{StaticResource color.field.text.act}"
  30. InputMethod.IsInputMethodEnabled="False"
  31. LostFocus="TxtInput_LostFocus"
  32. PreviewKeyDown="TxtInput_PreviewKeyDown"
  33. ShowClose="False"
  34. Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:PaginationControl}, Path=InputString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  35. Visibility="Collapsed" />
  36. <TextBlock
  37. Name="TblIndex"
  38. MinWidth="15"
  39. VerticalAlignment="Center"
  40. PreviewMouseDown="TblIndex_PreviewMouseDown"
  41. Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:PaginationControl}, Path=CurrentPage, StringFormat={}{0}}"
  42. TextAlignment="Center" />
  43. </Grid>
  44. <TextBlock
  45. Grid.Column="1"
  46. Margin="8,0"
  47. VerticalAlignment="Center"
  48. FontSize="12"
  49. Text="/" />
  50. <TextBlock
  51. Name="TBPageCount"
  52. Grid.Column="2"
  53. VerticalAlignment="Center"
  54. FocusVisualStyle="{x:Null}"
  55. Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:PaginationControl}, Path=PageCount, StringFormat={}{0}}" />
  56. </Grid>
  57. </Border>
  58. </UserControl>