107 lines
3.8 KiB
XML
107 lines
3.8 KiB
XML
<UserControl
|
|
x:Class="Pf2e.WPF.EntityViewer.Component.EntityListControl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:viewmodel="clr-namespace:Pf2e.WPF.EntityViewer.ViewModel"
|
|
Padding="3,3,3,3"
|
|
d:DataContext="{d:DesignInstance Type=viewmodel:EntityListViewModel}"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="400"
|
|
x:ClassModifier="internal"
|
|
mc:Ignorable="d">
|
|
<UserControl.Background>
|
|
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ControlColorKey}}" />
|
|
</UserControl.Background>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="25" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<DockPanel Grid.Row="0" Grid.Column="0">
|
|
|
|
<Button
|
|
Width="25"
|
|
Margin="0,0,3,0"
|
|
Command="{Binding FirstPageCommand}"
|
|
Content="<<"
|
|
DockPanel.Dock="Left"
|
|
IsEnabled="{Binding HasPrevious}" />
|
|
|
|
<Button
|
|
Width="25"
|
|
Margin="0,0,3,0"
|
|
Command="{Binding PreviousPageCommand}"
|
|
Content="<"
|
|
DockPanel.Dock="Left"
|
|
IsEnabled="{Binding HasPrevious}" />
|
|
|
|
<Button
|
|
Width="25"
|
|
Margin="3,0,0,0"
|
|
Command="{Binding LastPageCommand}"
|
|
Content=">>"
|
|
DockPanel.Dock="Right"
|
|
IsEnabled="{Binding HasNext}" />
|
|
|
|
<Button
|
|
Width="25"
|
|
Margin="3,0,0,0"
|
|
Command="{Binding NextPageCommand}"
|
|
Content=">"
|
|
DockPanel.Dock="Right"
|
|
IsEnabled="{Binding HasNext}" />
|
|
|
|
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
|
<Label VerticalContentAlignment="Center" Content="Страница" />
|
|
<TextBox
|
|
Width="30"
|
|
VerticalContentAlignment="Center"
|
|
PreviewTextInput="TextBox_PreviewTextInput">
|
|
<TextBox.Text>
|
|
<Binding
|
|
Mode="TwoWay"
|
|
Path="Page"
|
|
UpdateSourceTrigger="PropertyChanged" />
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<Label VerticalContentAlignment="Center" Content="из" />
|
|
<Label VerticalContentAlignment="Center" Content="{Binding PageCount, Mode=OneWay}" />
|
|
|
|
</StackPanel>
|
|
|
|
</DockPanel>
|
|
|
|
<TextBox
|
|
Grid.Row="1"
|
|
Margin="0,3,0,3"
|
|
VerticalAlignment="Center"
|
|
Text="TextBox"
|
|
TextWrapping="Wrap" />
|
|
|
|
<ListView
|
|
Grid.Row="2"
|
|
d:ItemsSource="{d:SampleData ItemCount=50}"
|
|
ItemsSource="{Binding Entities}"
|
|
SelectedItem="{Binding SelectedEntity}">
|
|
<ListView.View>
|
|
<GridView>
|
|
<GridViewColumn
|
|
Width="Auto"
|
|
DisplayMemberBinding="{Binding Id}"
|
|
Header="ID" />
|
|
<GridViewColumn DisplayMemberBinding="{Binding Name}" Header="Название" />
|
|
<GridViewColumn
|
|
Width="Auto"
|
|
DisplayMemberBinding="{Binding Rarity}"
|
|
Header="Редк." />
|
|
</GridView>
|
|
</ListView.View>
|
|
</ListView>
|
|
</Grid>
|
|
</UserControl>
|