PromotionContent.xaml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <UserControl
  2. x:Class="PDF_Master.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_Master.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. Margin="16,0"
  23. Background="Transparent"
  24. Cursor="Hand"
  25. Orientation="Horizontal">
  26. <Image
  27. Width="16"
  28. Height="16"
  29. Margin="0,0,10,0"
  30. RenderOptions.BitmapScalingMode="HighQuality"
  31. Source="{Binding ImagePath}"
  32. UseLayoutRounding="True" />
  33. <TextBlock
  34. VerticalAlignment="Center"
  35. FontSize="14"
  36. Foreground="{StaticResource color.sys.text.neutral.lv2}"
  37. Text="{Binding Content}" />
  38. </StackPanel>
  39. </DataTemplate>
  40. </ResourceDictionary>
  41. </UserControl.Resources>
  42. <ScrollViewer Margin="16,0" VerticalScrollBarVisibility="Auto">
  43. <Grid>
  44. <Grid.RowDefinitions>
  45. <RowDefinition Height="*" />
  46. <RowDefinition Height="auto" />
  47. </Grid.RowDefinitions>
  48. <StackPanel>
  49. <Expander
  50. x:Name="PDFProSeriesExpander"
  51. Padding="0"
  52. IsExpanded="True"
  53. Style="{StaticResource PromotionExpanderStyle}">
  54. <Expander.Header>
  55. <Grid Name="GridHeader" Height="32">
  56. <TextBlock
  57. x:Name="Text_PDFPro"
  58. Margin="16,0"
  59. VerticalAlignment="Center"
  60. FontFamily="Segoe UI"
  61. FontSize="12"
  62. FontWeight="SemiBold"
  63. TextAlignment="Left" />
  64. </Grid>
  65. </Expander.Header>
  66. <Border CornerRadius="4">
  67. <Grid Name="GroupPDFProSeries">
  68. <ListView
  69. x:Name="PDFProListview"
  70. MinWidth="0"
  71. HorizontalAlignment="Stretch"
  72. Background="Transparent"
  73. BorderThickness="0"
  74. ItemTemplate="{StaticResource PromotionDataTemplate}">
  75. <ListView.ItemContainerStyle>
  76. <Style BasedOn="{StaticResource EmptyListViewItem}" TargetType="{x:Type ListViewItem}">
  77. <Style.Triggers>
  78. <Trigger Property="IsMouseOver" Value="True">
  79. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  80. </Trigger>
  81. </Style.Triggers>
  82. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewMouseLeftButtonDown" />
  83. <Setter Property="AllowDrop" Value="True" />
  84. <Setter Property="Height" Value="32" />
  85. </Style>
  86. </ListView.ItemContainerStyle>
  87. </ListView>
  88. </Grid>
  89. </Border>
  90. </Expander>
  91. <Expander
  92. x:Name="OthersExpander"
  93. Margin="0,8,0,0"
  94. IsExpanded="True"
  95. Style="{StaticResource PromotionExpanderStyle}">
  96. <Expander.Header>
  97. <Grid
  98. Name="GridHeaderOthers"
  99. Height="32"
  100. Margin="16,0"
  101. HorizontalAlignment="Center">
  102. <TextBlock
  103. x:Name="Text_Others"
  104. VerticalAlignment="Center"
  105. FontFamily="Segoe UI"
  106. FontSize="12"
  107. FontWeight="SemiBold" />
  108. </Grid>
  109. </Expander.Header>
  110. <Border CornerRadius="4">
  111. <Grid Name="GridGroupOthers">
  112. <ListView
  113. x:Name="OthersListview"
  114. MinWidth="0"
  115. HorizontalAlignment="Stretch"
  116. Background="Transparent"
  117. BorderThickness="0"
  118. ItemTemplate="{StaticResource PromotionDataTemplate}">
  119. <ListView.ItemContainerStyle>
  120. <Style BasedOn="{StaticResource EmptyListViewItem}" TargetType="{x:Type ListViewItem}">
  121. <Style.Triggers>
  122. <Trigger Property="IsMouseOver" Value="True">
  123. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  124. </Trigger>
  125. </Style.Triggers>
  126. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewMouseLeftButtonDown" />
  127. <Setter Property="AllowDrop" Value="True" />
  128. <Setter Property="Height" Value="32" />
  129. </Style>
  130. </ListView.ItemContainerStyle>
  131. </ListView>
  132. </Grid>
  133. </Border>
  134. </Expander>
  135. </StackPanel>
  136. <Image
  137. x:Name="ImgeActivity"
  138. Grid.Row="1"
  139. Width="184"
  140. Height="243"
  141. Margin="0,24"
  142. VerticalAlignment="Bottom"
  143. PreviewMouseLeftButtonDown="ImgeActivity_PreviewMouseLeftButtonDown" />
  144. </Grid>
  145. </ScrollViewer>
  146. </UserControl>