PromotionContent.xaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. Margin="16,0"
  58. VerticalAlignment="Center"
  59. Text="PDF Pro Series"
  60. TextAlignment="Left" />
  61. </Grid>
  62. </Expander.Header>
  63. <Border CornerRadius="4">
  64. <Grid Name="GroupPDFProSeries">
  65. <ListView
  66. x:Name="PDFProListview"
  67. MinWidth="0"
  68. HorizontalAlignment="Stretch"
  69. Background="Transparent"
  70. BorderThickness="0"
  71. ItemTemplate="{StaticResource PromotionDataTemplate}">
  72. <ListView.ItemContainerStyle>
  73. <Style BasedOn="{StaticResource EmptyListViewItem}" TargetType="{x:Type ListViewItem}">
  74. <Style.Triggers>
  75. <Trigger Property="IsMouseOver" Value="True">
  76. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  77. </Trigger>
  78. </Style.Triggers>
  79. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewMouseLeftButtonDown" />
  80. <Setter Property="AllowDrop" Value="True" />
  81. <Setter Property="Height" Value="32" />
  82. </Style>
  83. </ListView.ItemContainerStyle>
  84. </ListView>
  85. </Grid>
  86. </Border>
  87. </Expander>
  88. <Expander
  89. x:Name="OthersExpander"
  90. Margin="0,8,0,0"
  91. IsExpanded="True"
  92. Style="{StaticResource PromotionExpanderStyle}">
  93. <Expander.Header>
  94. <Grid
  95. Name="GridHeaderOthers"
  96. Height="32"
  97. Margin="16,0"
  98. HorizontalAlignment="Center">
  99. <TextBlock VerticalAlignment="Center" Text="Others" />
  100. </Grid>
  101. </Expander.Header>
  102. <Border CornerRadius="4">
  103. <Grid Name="GridGroupOthers">
  104. <ListView
  105. x:Name="OthersListview"
  106. MinWidth="0"
  107. HorizontalAlignment="Stretch"
  108. Background="Transparent"
  109. BorderThickness="0"
  110. ItemTemplate="{StaticResource PromotionDataTemplate}">
  111. <ListView.ItemContainerStyle>
  112. <Style BasedOn="{StaticResource EmptyListViewItem}" TargetType="{x:Type ListViewItem}">
  113. <Style.Triggers>
  114. <Trigger Property="IsMouseOver" Value="True">
  115. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
  116. </Trigger>
  117. </Style.Triggers>
  118. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewMouseLeftButtonDown" />
  119. <Setter Property="AllowDrop" Value="True" />
  120. <Setter Property="Height" Value="32" />
  121. </Style>
  122. </ListView.ItemContainerStyle>
  123. </ListView>
  124. </Grid>
  125. </Border>
  126. </Expander>
  127. </StackPanel>
  128. <Image
  129. x:Name="ImgeActivity"
  130. Grid.Row="1"
  131. Width="184"
  132. Height="243"
  133. Source="C:\\Users\\kdan\\Documents\\PDF Master\\ADTemp\\1.png"
  134. Margin="0,24"
  135. VerticalAlignment="Bottom"
  136. PreviewMouseLeftButtonDown="ImgeActivity_PreviewMouseLeftButtonDown" />
  137. </Grid>
  138. </ScrollViewer>
  139. </UserControl>