InfoFilmView.axaml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  6. xmlns:vm="clr-namespace:ApplicationAvalonia.ViewModels;assembly=ApplicationAvalonia"
  7. x:Class="ApplicationAvalonia.Views.InfoFilmView"
  8. x:DataType="vm:InfoFilmViewModel"
  9. xmlns:asyncImageLoader="clr-namespace:AsyncImageLoader;assembly=AsyncImageLoader.Avalonia"
  10. >
  11. <Grid>
  12. <TextBlock
  13. Text="{Binding Film.Name}" FontSize="24"
  14. HorizontalAlignment="Center" Margin="0 20"/>
  15. <ScrollViewer>
  16. <Grid RowDefinitions="60, 500, *" ColumnDefinitions="40, *, 40">
  17. <Grid Grid.Row="1" Grid.Column="1" ColumnDefinitions="250, 20, *">
  18. <Border Grid.Column="0" >
  19. <Image asyncImageLoader:ImageLoader.Source="{Binding Film.Image}" Height="400" Width="250"
  20. HorizontalAlignment="Center" VerticalAlignment="Center"/>
  21. </Border>
  22. <Border Grid.Column="2" CornerRadius="30"
  23. Background="#211F1F" Padding="30">
  24. <StackPanel Spacing="20">
  25. <TextBlock DockPanel.Dock="Top" FontSize="20" Text="{Binding DirectorsAll, StringFormat=Режиссеры: {0}}"/>
  26. <TextBlock DockPanel.Dock="Top" FontSize="20" Text="{Binding Film.Raiting, StringFormat=Рейтинг: {0}}"/>
  27. <TextBlock DockPanel.Dock="Top" Text="Описание:" FontSize="20"/>
  28. <TextBlock FontSize="18" DockPanel.Dock="Top"
  29. TextWrapping="WrapWithOverflow" Text="{Binding Film.Description}" />
  30. <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Stretch" DockPanel.Dock="Bottom" Orientation="Horizontal">
  31. <Button Content="Назад" Command="{Binding GoBackToHomeCommand}"/>
  32. </StackPanel>
  33. </StackPanel>
  34. </Border>
  35. </Grid>
  36. <Border Grid.Row="2" Grid.Column="1" Margin="0 20" Padding="30"
  37. Background="#211F1F" CornerRadius="30">
  38. <Grid RowDefinitions="40, *">
  39. <TextBlock Text="Трейлер:" FontSize="24" Grid.Row="0"/>
  40. <WebView MaxWidth="1600" MinWidth="400" Grid.Row="1"
  41. MaxHeight="1600" MinHeight="800"
  42. x:Name="PART_WebView" Url="{Binding Film.Trailer}"/>
  43. </Grid>
  44. </Border>
  45. </Grid>
  46. </ScrollViewer>
  47. </Grid>
  48. </UserControl>