|
|
@@ -58,7 +58,7 @@
|
|
|
<DataGrid
|
|
|
Grid.Row="1"
|
|
|
Margin="0"
|
|
|
- ItemsSource="{Binding GpuNames}"
|
|
|
+ ItemsSource="{Binding QueryResults}"
|
|
|
BorderThickness="0">
|
|
|
<DataGrid.Resources>
|
|
|
<controls:BindingProxy x:Key="proxy" Data="{Binding}" />
|
|
|
@@ -144,116 +144,13 @@
|
|
|
</DataGridTemplateColumn>
|
|
|
</DataGrid.Columns>
|
|
|
</DataGrid>
|
|
|
- <TextBlock Grid.Row="1" Visibility="{Binding GpuNames,Converter={StaticResource NoRecordVisibilityConverter}}" Foreground="Red" HorizontalAlignment="Center" VerticalAlignment="Center">没有记录</TextBlock>
|
|
|
- <WrapPanel Grid.Row="2">
|
|
|
- <Button x:Name="ButtonLeft" IsEnabled="{Binding PagingVm.CanPageSub}" Command="{Binding PageSub}">
|
|
|
- <Button.Template>
|
|
|
- <ControlTemplate>
|
|
|
- <Border
|
|
|
- x:Name="Content"
|
|
|
- BorderThickness="1"
|
|
|
- Background="Transparent">
|
|
|
- <Path
|
|
|
- x:Name="Icon"
|
|
|
- Width="22"
|
|
|
- Height="22"
|
|
|
- Data="{StaticResource Icon_Page-}"
|
|
|
- Fill="#676767"
|
|
|
- Stretch="Fill">
|
|
|
- </Path>
|
|
|
- </Border>
|
|
|
- <ControlTemplate.Triggers>
|
|
|
- <Trigger Property="IsEnabled" Value="False">
|
|
|
- <Setter Property="Opacity" Value="0.5"></Setter>
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsMouseOver" Value="true">
|
|
|
- <Setter TargetName="Icon" Property="Fill" Value="{StaticResource BtnBackground}"/>
|
|
|
- </Trigger>
|
|
|
- </ControlTemplate.Triggers>
|
|
|
- </ControlTemplate>
|
|
|
- </Button.Template>
|
|
|
- </Button>
|
|
|
- <ListBox
|
|
|
- Margin="4"
|
|
|
- Background="Transparent"
|
|
|
- ItemsSource="{Binding PagingVm.PageNumbers}"
|
|
|
- SelectedItem="{Binding PageIndex}"
|
|
|
- BorderThickness="0">
|
|
|
- <ListBox.ItemContainerStyle>
|
|
|
- <Style TargetType="ListBoxItem">
|
|
|
- <Setter Property="Template">
|
|
|
- <Setter.Value>
|
|
|
- <ControlTemplate TargetType="ListBoxItem">
|
|
|
- <Border
|
|
|
- BorderThickness="1"
|
|
|
- BorderBrush="{StaticResource LightLineColor}"
|
|
|
- Margin="4 0"
|
|
|
- Background="{TemplateBinding Background}"
|
|
|
- Width="24"
|
|
|
- Height="24"
|
|
|
- CornerRadius="12">
|
|
|
- <TextBlock
|
|
|
- HorizontalAlignment="Center"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Foreground="{TemplateBinding Foreground}"
|
|
|
- Text="{Binding}"/>
|
|
|
- </Border>
|
|
|
- <ControlTemplate.Triggers>
|
|
|
- <Trigger Property="IsSelected" Value="true">
|
|
|
- <Setter Property="Background" Value="{StaticResource BtnBackground}"/>
|
|
|
- <Setter Property="Foreground" Value="{StaticResource BtnForeground}"/>
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsMouseOver" Value="true">
|
|
|
- <Setter Property="Background" Value="{StaticResource BtnBackground}"/>
|
|
|
- <Setter Property="Foreground" Value="{StaticResource BtnForeground}"/>
|
|
|
- </Trigger>
|
|
|
- </ControlTemplate.Triggers>
|
|
|
- </ControlTemplate>
|
|
|
- </Setter.Value>
|
|
|
- </Setter>
|
|
|
- </Style>
|
|
|
- </ListBox.ItemContainerStyle>
|
|
|
- <ListBox.ItemsPanel>
|
|
|
- <ItemsPanelTemplate>
|
|
|
- <WrapPanel>
|
|
|
- </WrapPanel>
|
|
|
- </ItemsPanelTemplate>
|
|
|
- </ListBox.ItemsPanel>
|
|
|
- </ListBox>
|
|
|
- <Button x:Name="ButtonRight" Margin="2 0 0 0" IsEnabled="{Binding PagingVm.CanPageAdd}" Command="{Binding PageAdd}">
|
|
|
- <Button.Template>
|
|
|
- <ControlTemplate>
|
|
|
- <Border
|
|
|
- x:Name="Content"
|
|
|
- BorderThickness="1"
|
|
|
- Background="Transparent">
|
|
|
- <Path
|
|
|
- x:Name="Icon"
|
|
|
- Width="22"
|
|
|
- Height="22"
|
|
|
- Data="{StaticResource Icon_Page+}"
|
|
|
- Fill="#676767"
|
|
|
- Stretch="Fill">
|
|
|
- </Path>
|
|
|
- </Border>
|
|
|
- <ControlTemplate.Triggers>
|
|
|
- <Trigger Property="IsEnabled" Value="False">
|
|
|
- <Setter Property="Opacity" Value="0.5"></Setter>
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsMouseOver" Value="true">
|
|
|
- <Setter TargetName="Icon" Property="Fill" Value="{StaticResource BtnBackground}"/>
|
|
|
- </Trigger>
|
|
|
- </ControlTemplate.Triggers>
|
|
|
- </ControlTemplate>
|
|
|
- </Button.Template>
|
|
|
- </Button>
|
|
|
- <TextBlock Margin="10 0 0 0" Foreground="{StaticResource LableColor}" VerticalAlignment="Center" Text="每页"></TextBlock>
|
|
|
- <TextBlock Padding="4 0" VerticalAlignment="Center" Text="{Binding PageSize}"></TextBlock>
|
|
|
- <TextBlock VerticalAlignment="Center" Foreground="{StaticResource LableColor}" Text="条,"></TextBlock>
|
|
|
-
|
|
|
- <TextBlock VerticalAlignment="Center" Foreground="{StaticResource LableColor}" Text="共"></TextBlock>
|
|
|
- <TextBlock Padding="4 0" VerticalAlignment="Center" Text="{Binding PagingVm.Total}"></TextBlock>
|
|
|
- <TextBlock VerticalAlignment="Center" Foreground="{StaticResource LableColor}" Text="条"></TextBlock>
|
|
|
- </WrapPanel>
|
|
|
+ <TextBlock Grid.Row="1" Visibility="{Binding QueryResults,Converter={StaticResource NoRecordVisibilityConverter}}" Foreground="Red" HorizontalAlignment="Center" VerticalAlignment="Center">没有记录</TextBlock>
|
|
|
+ <Border Grid.Row="2" Height="35">
|
|
|
+ <WrapPanel VerticalAlignment="Center">
|
|
|
+ <TextBlock Margin="4 0 0 0" Foreground="{StaticResource LableColor}" Text="共"></TextBlock>
|
|
|
+ <TextBlock Padding="4 0" Text="{Binding GpuNames.Count}"></TextBlock>
|
|
|
+ <TextBlock Foreground="{StaticResource LableColor}" Text="条"></TextBlock>
|
|
|
+ </WrapPanel>
|
|
|
+ </Border>
|
|
|
</Grid>
|
|
|
</UserControl>
|