DP.xaml 6.16 KB
<UserControl x:Class="HHWCSHost.Controls.DP"
             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:HHWCSHost.Controls"
             mc:Ignorable="d" 
             >
    <UserControl.Resources>

        <!--每页{0}/共{0}条-->
        <Style x:Key="PageTextBlock1" TargetType="{x:Type TextBlock}">
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="FontSize" Value="13" />
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="Foreground" Value="#FF333333" />
        </Style>
        <!--首页上一页等-->
        <Style x:Key="PageTextBlock2" TargetType="{x:Type TextBlock}">
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="Margin" Value="0,10,0,0" />
            <Setter Property="Width" Value="40" />
            <Setter Property="Height" Value="23" />
            <Setter Property="FontSize" Value="13" />
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="Foreground" Value="#FF333333" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Foreground" Value="#FF000000" />
                    <Setter Property="FontWeight" Value="Bold" />
                </Trigger>
            </Style.Triggers>
        </Style>
        <!--中间页数-->
        <Style x:Key="PageTextBlock3" TargetType="{x:Type TextBlock}">
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="Margin" Value="0,10,0,0" />
            <Setter Property="Height" Value="23" />
            <Setter Property="Width" Value="30" />
            <Setter Property="FontSize" Value="10" />
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="Foreground" Value="#FF333333" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Foreground" Value="#FF000000" />
                    <Setter Property="FontWeight" Value="Bold" />
                </Trigger>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="Foreground" Value="#FF000000" />
                    <Setter Property="FontWeight" Value="Bold" />
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="PageTextBox" TargetType="{x:Type TextBox}">
            <Setter Property="Height" Value="25" />
            <Setter Property="Width" Value="40" />

            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="VerticalAlignment" Value="Bottom" />
            <Style.Triggers>
                <Trigger Property="IsReadOnly" Value="True">
                    <Setter Property="Background" Value="#FFCCCCCC" />
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="PageButton" TargetType="{x:Type Button}">
            <Setter Property="Height" Value="25" />
            <Setter Property="Width" Value="30" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="VerticalAlignment" Value="Bottom" />
        </Style>

    </UserControl.Resources>
    <Grid >
        <Border CornerRadius="3" Background="Transparent" >
            <Grid HorizontalAlignment="Stretch" Margin="5 0 5 0" VerticalAlignment="Top" Width="Auto" Height="30">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="350"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <!--<TextBlock Name="tbkRecords" Grid.Column="0" Style="{StaticResource PageTextBlock1}" />-->
                <!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Column="1">-->
                    <Grid>
                        <Grid.RowDefinitions >
                            <RowDefinition Height="30"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="50"/>
                            <ColumnDefinition Width="50"/>
                            <ColumnDefinition Width="50"/>
                            <ColumnDefinition Width="50"/>
                            <ColumnDefinition Width="50"/>
                            <ColumnDefinition Width="50"/>
                            <ColumnDefinition Width="30"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Name="btnFirst" Text="首页" IsEnabled="False" Style="{StaticResource PageTextBlock2}" />
                        <TextBlock Grid.Column="1" Name="btnPrev" Text="上一页" IsEnabled="False" Style="{StaticResource PageTextBlock2}" />
                        <Grid Grid.Column="2" Name="grid" >
                            <Grid.RowDefinitions>
                                <RowDefinition Height="30" ></RowDefinition>
                            </Grid.RowDefinitions>
                        </Grid>
                        <TextBlock Grid.Column="3" x:Name="btnNext" Text="下一页" IsEnabled="False" Style="{StaticResource PageTextBlock2}" />
                        <TextBlock Grid.Column="4" x:Name="btnLast" Text="未页" IsEnabled="False" Style="{StaticResource PageTextBlock2}"/>
                        <TextBox Grid.Column="5" x:Name="pageGo" MaxLength="6" IsReadOnly="True" Style="{StaticResource PageTextBox}" />
                        <Button Grid.Column="6" x:Name="btnGo" Content="GO" IsEnabled="False" Style="{StaticResource PageButton}" />
                    </Grid>
                <!--</StackPanel>-->
            </Grid>
        </Border>
    </Grid>
</UserControl>