PaginationBar.xaml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <UserControl x:Class="NEIntelligentControl2.Views.Basic.PaginationBar"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:NEIntelligentControl2.Views.Basic"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800">
  9. <UserControl.Resources>
  10. <!--下一页-->
  11. <ControlTemplate x:Key="btlast">
  12. <Viewbox Width="20" Height="20">
  13. <Canvas Width="1024" Height="1024">
  14. <Path x:Name="p1" Data="M736 512v0.3L288 960V64z" Fill="#FF497CAD"/>
  15. </Canvas>
  16. </Viewbox>
  17. </ControlTemplate>
  18. <!--最后一页-->
  19. <ControlTemplate x:Key="btlatest">
  20. <Viewbox Width="20" Height="20">
  21. <Canvas Width="1024" Height="1024">
  22. <Path x:Name="p1" Data="M704 64h224v896H704zM544.3 512v0.3L96 960V64z" Fill="#FF497CAD"/>
  23. </Canvas>
  24. </Viewbox>
  25. </ControlTemplate>
  26. <!--上一页-->
  27. <ControlTemplate x:Key="btprevious">
  28. <Viewbox Width="20" Height="20">
  29. <Canvas Width="1024" Height="1024">
  30. <Path x:Name="p1" Data="M288 512v0.3L736 960V64z" Fill="#FF497CAD"/>
  31. </Canvas>
  32. </Viewbox>
  33. </ControlTemplate>
  34. <!--第一页-->
  35. <ControlTemplate x:Key="first">
  36. <Viewbox Width="20" Height="20">
  37. <Canvas Width="1024" Height="1024">
  38. <Path x:Name="p1" Data="M479.7 512v0.3L928 960V64zM96 64h224v896H96z" Fill="#FF497CAD"/>
  39. </Canvas>
  40. </Viewbox>
  41. </ControlTemplate>
  42. </UserControl.Resources>
  43. <StackPanel Orientation="Horizontal">
  44. <Button ToolTip="第一页">
  45. <Button.Content>
  46. <ContentControl Template="{StaticResource first}"/>
  47. </Button.Content>
  48. </Button>
  49. <Button ToolTip="上一页">
  50. <Button.Content>
  51. <ContentControl Template="{StaticResource btprevious}"/>
  52. </Button.Content>
  53. </Button>
  54. <TextBox MinWidth="30"/>
  55. <TextBlock MinWidth="30"/>
  56. <TextBlock Text="/" VerticalAlignment="Center"/>
  57. <Button ToolTip="下一页">
  58. <Button.Content>
  59. <ContentControl Template="{StaticResource btlast}"/>
  60. </Button.Content>
  61. </Button>
  62. <Button ToolTip="最后一页">
  63. <Button.Content>
  64. <ContentControl Template="{StaticResource btlatest}"/>
  65. </Button.Content>
  66. </Button>
  67. </StackPanel>
  68. </UserControl>