PromotionContent.xaml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <UserControl
  2. x:Class="PDF_Office.Views.HomePanel.PromotionContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Office.Views.HomePanel"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. d:DesignHeight="450"
  9. d:DesignWidth="800"
  10. Background="{StaticResource color.sys.layout.mg}"
  11. SizeChanged="UserControl_SizeChanged"
  12. mc:Ignorable="d">
  13. <UserControl.Resources>
  14. <ResourceDictionary>
  15. <ResourceDictionary.MergedDictionaries>
  16. <ResourceDictionary Source="../../Styles/ListViewStyle.xaml" />
  17. <ResourceDictionary Source="../../Styles/ExpanderStyle.xaml" />
  18. </ResourceDictionary.MergedDictionaries>
  19. <DataTemplate x:Key="PromotionDataTemplate">
  20. <StackPanel
  21. Height="32"
  22. Background="Transparent"
  23. Cursor="Hand"
  24. Orientation="Horizontal">
  25. <Image
  26. Width="16"
  27. Height="16"
  28. Margin="0,0,10,0"
  29. Source="{Binding ImagePath}" />
  30. <TextBlock
  31. VerticalAlignment="Center"
  32. FontSize="14"
  33. Foreground="{StaticResource color.sys.text.neutral.lv2}"
  34. Text="{Binding Content}" />
  35. </StackPanel>
  36. </DataTemplate>
  37. </ResourceDictionary>
  38. </UserControl.Resources>
  39. <ScrollViewer VerticalScrollBarVisibility="Auto">
  40. <Grid>
  41. <Grid.RowDefinitions>
  42. <RowDefinition Height="*" />
  43. <RowDefinition Height="auto" />
  44. </Grid.RowDefinitions>
  45. <StackPanel>
  46. <Expander
  47. x:Name="PDFProSeriesExpander"
  48. Margin="20,20,0,0"
  49. IsExpanded="True"
  50. Style="{StaticResource PromotionExpanderStyle}">
  51. <Expander.Header>
  52. <Grid
  53. Name="GridHeader"
  54. Height="32"
  55. HorizontalAlignment="Center">
  56. <TextBlock VerticalAlignment="Center" Text="PDF Pro Series" />
  57. </Grid>
  58. </Expander.Header>
  59. <Border CornerRadius="4">
  60. <Grid Name="GroupPDFProSeries">
  61. <ListView
  62. x:Name="PDFProListview"
  63. MinWidth="0"
  64. HorizontalAlignment="Stretch"
  65. Background="Transparent"
  66. BorderThickness="0"
  67. ItemTemplate="{StaticResource PromotionDataTemplate}">
  68. <ListView.ItemContainerStyle>
  69. <Style BasedOn="{StaticResource EmptyListViewItem}" TargetType="{x:Type ListViewItem}">
  70. <Style.Triggers>
  71. <Trigger Property="IsMouseOver" Value="True">
  72. <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  73. </Trigger>
  74. </Style.Triggers>
  75. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewMouseLeftButtonDown" />
  76. </Style>
  77. </ListView.ItemContainerStyle>
  78. </ListView>
  79. </Grid>
  80. </Border>
  81. </Expander>
  82. <Expander
  83. x:Name="OthersExpander"
  84. Margin="20,8,0,0"
  85. IsExpanded="True"
  86. Style="{StaticResource PromotionExpanderStyle}">
  87. <Expander.Header>
  88. <Grid
  89. Name="GridHeaderOthers"
  90. Height="32"
  91. HorizontalAlignment="Center">
  92. <TextBlock VerticalAlignment="Center" Text="Others" />
  93. </Grid>
  94. </Expander.Header>
  95. <Border CornerRadius="4">
  96. <Grid Name="GridGroupOthers">
  97. <ListView
  98. x:Name="OthersListview"
  99. MinWidth="0"
  100. HorizontalAlignment="Stretch"
  101. Background="Transparent"
  102. BorderThickness="0"
  103. ItemTemplate="{StaticResource PromotionDataTemplate}">
  104. <ListView.ItemContainerStyle>
  105. <Style BasedOn="{StaticResource EmptyListViewItem}" TargetType="{x:Type ListViewItem}">
  106. <Style.Triggers>
  107. <Trigger Property="IsMouseOver" Value="True">
  108. <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  109. </Trigger>
  110. </Style.Triggers>
  111. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewMouseLeftButtonDown" />
  112. </Style>
  113. </ListView.ItemContainerStyle>
  114. </ListView>
  115. </Grid>
  116. </Border>
  117. </Expander>
  118. </StackPanel>
  119. <Image
  120. x:Name="ImgeActivity"
  121. Grid.Row="1"
  122. Width="184"
  123. Height="243"
  124. Margin="0,30"
  125. VerticalAlignment="Bottom"
  126. PreviewMouseLeftButtonDown="ImgeActivity_PreviewMouseLeftButtonDown" />
  127. </Grid>
  128. </ScrollViewer>
  129. </UserControl>