|
|
|
@ -16,6 +16,8 @@
|
|
|
|
<classes:EnumEqualsConverter x:Key="EnumEqualsConverter"/>
|
|
|
|
<classes:EnumEqualsConverter x:Key="EnumEqualsConverter"/>
|
|
|
|
<classes:BoolToPowerConverter x:Key="BoolToPowerConverter"/>
|
|
|
|
<classes:BoolToPowerConverter x:Key="BoolToPowerConverter"/>
|
|
|
|
<classes:OneBasedConverter x:Key="OneBasedConverter"/>
|
|
|
|
<classes:OneBasedConverter x:Key="OneBasedConverter"/>
|
|
|
|
|
|
|
|
<classes:PageIndexToDisplayConverter x:Key="PageIndexToDisplayConverter"/>
|
|
|
|
|
|
|
|
<classes:CurrentPageEqualsConverter x:Key="CurrentPageEqualsConverter"/>
|
|
|
|
</UserControl.Resources>
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
|
|
|
|
|
|
<Border BorderBrush="#2d374c" BorderThickness="2">
|
|
|
|
<Border BorderBrush="#2d374c" BorderThickness="2">
|
|
|
|
@ -362,14 +364,54 @@
|
|
|
|
<md:PackIcon Kind="ChevronLeft"/>
|
|
|
|
<md:PackIcon Kind="ChevronLeft"/>
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="8,0">
|
|
|
|
<ItemsControl DataContext="{Binding TanksPager}"
|
|
|
|
<TextBlock Margin="0 5" Foreground="White"
|
|
|
|
ItemsSource="{Binding PageNumbers}">
|
|
|
|
Text="{Binding TanksPager.PageIndex, Mode=TwoWay,
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
UpdateSourceTrigger=PropertyChanged,
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
Converter={StaticResource OneBasedConverter}}"/>
|
|
|
|
<StackPanel Orientation="Horizontal" />
|
|
|
|
<TextBlock Text="{Binding TanksPager.TotalPages, StringFormat=/ {0}}"
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
Foreground="White" VerticalAlignment="Center" Margin="6,0,0,0"/>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
|
|
|
<Button Margin="2"
|
|
|
|
|
|
|
|
Padding="6,2"
|
|
|
|
|
|
|
|
Command="{Binding DataContext.GoToPageCommand,
|
|
|
|
|
|
|
|
RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
|
|
|
|
|
|
|
CommandParameter="{Binding}">
|
|
|
|
|
|
|
|
<Button.Content>
|
|
|
|
|
|
|
|
<!-- 각 아이템은 int(0,1,2,...) 이므로 그대로 컨버터 -->
|
|
|
|
|
|
|
|
<Binding Converter="{StaticResource PageIndexToDisplayConverter}" />
|
|
|
|
|
|
|
|
</Button.Content>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Button.Style>
|
|
|
|
|
|
|
|
<Style TargetType="Button">
|
|
|
|
|
|
|
|
<Setter Property="Background" Value="Transparent" />
|
|
|
|
|
|
|
|
<Setter Property="BorderBrush" Value="Gray" />
|
|
|
|
|
|
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 현재 페이지면 강조 -->
|
|
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
|
|
<DataTrigger Value="True">
|
|
|
|
|
|
|
|
<DataTrigger.Binding>
|
|
|
|
|
|
|
|
<MultiBinding Converter="{StaticResource CurrentPageEqualsConverter}">
|
|
|
|
|
|
|
|
<!-- 현재 버튼의 인덱스 (각 아이템, int) -->
|
|
|
|
|
|
|
|
<Binding />
|
|
|
|
|
|
|
|
<!-- TanksPager.PageIndex -->
|
|
|
|
|
|
|
|
<Binding Path="DataContext.PageIndex"
|
|
|
|
|
|
|
|
RelativeSource="{RelativeSource AncestorType=ItemsControl}" />
|
|
|
|
|
|
|
|
</MultiBinding>
|
|
|
|
|
|
|
|
</DataTrigger.Binding>
|
|
|
|
|
|
|
|
<Setter Property="Background" Value="#FF007ACC" />
|
|
|
|
|
|
|
|
<Setter Property="Foreground" Value="White" />
|
|
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
</Button.Style>
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
|
|
|
|
|
|
<Button Command="{Binding TanksPager.NextPageCommand}"
|
|
|
|
<Button Command="{Binding TanksPager.NextPageCommand}"
|
|
|
|
Style="{StaticResource MaterialDesignFlatLightBgButton}" Margin="4,0">
|
|
|
|
Style="{StaticResource MaterialDesignFlatLightBgButton}" Margin="4,0">
|
|
|
|
@ -405,13 +447,51 @@
|
|
|
|
<md:PackIcon Kind="ChevronLeft"/>
|
|
|
|
<md:PackIcon Kind="ChevronLeft"/>
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="8,0">
|
|
|
|
<ItemsControl ItemsSource="{Binding PageNumbers}">
|
|
|
|
<TextBlock Margin="0 5" Foreground="White"
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
Text="{Binding PageIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
Converter={StaticResource OneBasedConverter}}"/>
|
|
|
|
<StackPanel Orientation="Horizontal" />
|
|
|
|
<TextBlock Text="{Binding TotalPages, StringFormat=/ {0}}"
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
Foreground="White" VerticalAlignment="Center" Margin="6,0,0,0"/>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
|
|
|
<Button Margin="2"
|
|
|
|
|
|
|
|
Padding="6,2"
|
|
|
|
|
|
|
|
Command="{Binding DataContext.GoToPageCommand,
|
|
|
|
|
|
|
|
RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
|
|
|
|
|
|
|
CommandParameter="{Binding}">
|
|
|
|
|
|
|
|
<Button.Content>
|
|
|
|
|
|
|
|
<Binding Converter="{StaticResource PageIndexToDisplayConverter}" />
|
|
|
|
|
|
|
|
</Button.Content>
|
|
|
|
|
|
|
|
<Button.Style>
|
|
|
|
|
|
|
|
<Style TargetType="Button">
|
|
|
|
|
|
|
|
<Setter Property="Background" Value="Transparent" />
|
|
|
|
|
|
|
|
<Setter Property="BorderBrush" Value="Gray" />
|
|
|
|
|
|
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 🔹 현재 페이지면 강조 -->
|
|
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
|
|
<DataTrigger Value="True">
|
|
|
|
|
|
|
|
<DataTrigger.Binding>
|
|
|
|
|
|
|
|
<MultiBinding Converter="{StaticResource CurrentPageEqualsConverter}">
|
|
|
|
|
|
|
|
<!--현재 버튼의 인덱스-->
|
|
|
|
|
|
|
|
<Binding />
|
|
|
|
|
|
|
|
<!--ViewModel의 PageIndex-->
|
|
|
|
|
|
|
|
<Binding Path="DataContext.PageIndex"
|
|
|
|
|
|
|
|
RelativeSource="{RelativeSource AncestorType=ItemsControl}" />
|
|
|
|
|
|
|
|
</MultiBinding>
|
|
|
|
|
|
|
|
</DataTrigger.Binding>
|
|
|
|
|
|
|
|
<Setter Property="Background" Value="#FF007ACC" />
|
|
|
|
|
|
|
|
<Setter Property="Foreground" Value="White" />
|
|
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
</Button.Style>
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
|
|
|
|
|
|
<Button Command="{Binding NextPageCommand}"
|
|
|
|
<Button Command="{Binding NextPageCommand}"
|
|
|
|
Style="{StaticResource MaterialDesignFlatLightBgButton}" Margin="4,0">
|
|
|
|
Style="{StaticResource MaterialDesignFlatLightBgButton}" Margin="4,0">
|
|
|
|
|