|
@@ -5,46 +5,43 @@
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
x:Class="AvaloniaApplication1.UsersMainPage"
|
|
|
xmlns:vm="using:AvaloniaApplication1.ViewModels"
|
|
|
- x:DataType="vm:MainPageViewModel">
|
|
|
- <Grid RowDefinitions="50,*,50" ColumnDefinitions="200,*" >
|
|
|
- <TextBlock Text="Шарарам" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Yellow" FontSize="30" FontWeight="Black"></TextBlock>
|
|
|
- <TextBlock Text="Персонажи" HorizontalAlignment="Center" FontSize="30"> </TextBlock>
|
|
|
- <StackPanel Grid.Row="1">
|
|
|
- <Button Content="Профиль" Command="{Binding ProfileUser}"/>
|
|
|
- <Button Content="Смешарики"/>
|
|
|
- </StackPanel>
|
|
|
- <Grid RowDefinitions="50,*" Grid.Column="1" Grid.Row="1">
|
|
|
+ x:DataType="vm:MainPageViewModel"
|
|
|
+ xmlns:conv="using:AvaloniaApplication1.Resources">
|
|
|
+
|
|
|
+ <UserControl.Resources>
|
|
|
+ <conv:ImageConverter x:Key="myImageConverter"/>
|
|
|
+ </UserControl.Resources>
|
|
|
+ <Grid RowDefinitions="50,*" Grid.Column="1" Grid.Row="1">
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBox Text="{Binding Search}" Width="200" Watermark="Введите имя: "></TextBox>
|
|
|
+ <ComboBox ItemsSource="{Binding Genders}" SelectedItem="{Binding SelectedGender}">
|
|
|
+ <ComboBox.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding Title}"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </ComboBox.ItemTemplate>
|
|
|
+ </ComboBox>
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
- <TextBox Text="{Binding Search}" Width="200" Watermark="Введите имя: "></TextBox>
|
|
|
- <ComboBox ItemsSource="{Binding Genders}" SelectedItem="{Binding SelectedGender}">
|
|
|
- <ComboBox.ItemTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <TextBlock Text="{Binding Title}"/>
|
|
|
- </DataTemplate>
|
|
|
- </ComboBox.ItemTemplate>
|
|
|
- </ComboBox>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <RadioButton Content="По возрастанию" Command="{Binding OrderByAge}" CommandParameter="1"></RadioButton>
|
|
|
- <RadioButton Content="По убыванию" Command="{Binding OrderByAge}" CommandParameter="2"></RadioButton>
|
|
|
- </StackPanel>
|
|
|
+ <RadioButton Content="По возрастанию" Command="{Binding OrderByAge}" CommandParameter="1"></RadioButton>
|
|
|
+ <RadioButton Content="По убыванию" Command="{Binding OrderByAge}" CommandParameter="2"></RadioButton>
|
|
|
</StackPanel>
|
|
|
- <ListBox ItemsSource="{Binding Smeshariki}" Grid.Row="1">
|
|
|
- <ListBox.ItemTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <Image Source="{Binding Image}" Width="100" Height="100"/>
|
|
|
- <StackPanel>
|
|
|
- <TextBlock Text="{Binding Name, StringFormat= Имя: {0}}"></TextBlock>
|
|
|
- <TextBlock Text="{Binding Animal, StringFormat= Животное: {0}}"></TextBlock>
|
|
|
- <TextBlock Text="{Binding Age, StringFormat= Возраст: {0}}"></TextBlock>
|
|
|
- <TextBlock Text="{Binding GenderNavigation.Title, StringFormat= Пол: {0}}"></TextBlock>
|
|
|
+ </StackPanel>
|
|
|
+ <ListBox ItemsSource="{Binding Smeshariki}" Grid.Row="1">
|
|
|
+ <ListBox.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <Image Source="{Binding Image, Converter= {StaticResource myImageConverter}}" Width="100" Height="100"/>
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock Text="{Binding Name, StringFormat= Имя: {0}}"></TextBlock>
|
|
|
+ <TextBlock Text="{Binding Animal, StringFormat= Животное: {0}}"></TextBlock>
|
|
|
+ <TextBlock Text="{Binding Age, StringFormat= Возраст: {0}}"></TextBlock>
|
|
|
+ <TextBlock Text="{Binding GenderNavigation.Title, StringFormat= Пол: {0}}"></TextBlock>
|
|
|
|
|
|
- </StackPanel>
|
|
|
</StackPanel>
|
|
|
- </DataTemplate>
|
|
|
- </ListBox.ItemTemplate>
|
|
|
- </ListBox>
|
|
|
- </Grid>
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </ListBox.ItemTemplate>
|
|
|
+ </ListBox>
|
|
|
</Grid>
|
|
|
|
|
|
|