CatalogPage.xaml 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <Page x:Class="MyMoviesWPF.MVVM.View.Pages.CatalogPage"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:MyMoviesWPF.MVVM.View.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="900" d:DesignWidth="1600"
  9. Title="CatalogPage">
  10. <Grid>
  11. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  12. <!--<DataGrid Template="{DynamicResource DataGridTemplate1}" Style="{DynamicResource MaterialDesignDataGrid}" ></DataGrid>-->
  13. <DataGrid ItemsSource="{Binding MoviesCollection}" SelectedItem="{Binding OpenMovieWindow}" HeadersVisibility="None"
  14. Width="256" IsReadOnly="True" AutoGenerateColumns="False" BorderBrush = "Transparent" Background = "Transparent" RowBackground = "Transparent">
  15. <DataGrid.LayoutTransform>
  16. <TransformGroup>
  17. <RotateTransform Angle="90"/>
  18. <MatrixTransform Matrix="-1,0,0,1,0,0"/>
  19. </TransformGroup>
  20. </DataGrid.LayoutTransform>
  21. <DataGrid.ColumnHeaderStyle>
  22. <Style TargetType="{x:Type DataGridColumnHeader}"
  23. BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
  24. <Setter Property="LayoutTransform">
  25. <Setter.Value>
  26. <TransformGroup>
  27. <RotateTransform Angle="-90"/>
  28. <ScaleTransform ScaleX="1" ScaleY="-1" />
  29. </TransformGroup>
  30. </Setter.Value>
  31. </Setter>
  32. </Style>
  33. </DataGrid.ColumnHeaderStyle>
  34. <DataGrid.CellStyle>
  35. <Style TargetType="DataGridCell">
  36. <Setter Property="LayoutTransform">
  37. <Setter.Value>
  38. <TransformGroup>
  39. <RotateTransform Angle="-90"/>
  40. <ScaleTransform ScaleX="1" ScaleY="-1" />
  41. </TransformGroup>
  42. </Setter.Value>
  43. </Setter>
  44. </Style>
  45. </DataGrid.CellStyle>
  46. <DataGrid.Columns>
  47. <DataGridTemplateColumn Header="File Type" Width="200">
  48. <DataGridTemplateColumn.CellTemplate>
  49. <DataTemplate>
  50. <Image Height="200" Width="200" Source="{Binding Image}" Stretch="Uniform" />
  51. </DataTemplate>
  52. </DataGridTemplateColumn.CellTemplate>
  53. </DataGridTemplateColumn>
  54. <DataGridTextColumn Header="Название" Binding="{Binding Name}" IsReadOnly="True"></DataGridTextColumn>
  55. </DataGrid.Columns>
  56. </DataGrid>
  57. <!--<Button Height="128" Width="128" Command="{Binding OpenMovieWindow, Mode=OneWay}" Cursor="Hand">
  58. <Button.Template>
  59. <ControlTemplate>
  60. <Image Source="https://media.discordapp.net/attachments/987064912704573583/987066526106521670/unknown.png"></Image>
  61. </ControlTemplate>
  62. </Button.Template>
  63. </Button>-->
  64. <!--<DataGrid IsReadOnly="True"
  65. ItemsSource="{Binding MoviesCollection}" SelectedItem="{Binding OpenMovieWindow}">
  66. <DataGrid.Columns>
  67. <DataGridTextColumn Header="Название" Binding="{Binding Name}" IsReadOnly="True"></DataGridTextColumn>
  68. </DataGrid.Columns>
  69. </DataGrid>-->
  70. </StackPanel>
  71. <!--<ContentControl
  72. HorizontalAlignment="Center" VerticalAlignment="Top"
  73. Content="{Binding CurrentControlView}" />-->
  74. </Grid>
  75. </Page>