123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- <UserControl
- x:Class="PDF_Master.Views.HomePanel.PromotionContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Master.Views.HomePanel"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- d:DesignHeight="450"
- d:DesignWidth="800"
- Background="{StaticResource color.sys.layout.mg}"
- SizeChanged="UserControl_SizeChanged"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../../Styles/ListViewStyle.xaml" />
- <ResourceDictionary Source="../../Styles/ExpanderStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <DataTemplate x:Key="PromotionDataTemplate">
- <StackPanel
- Height="32"
- Background="Transparent"
- Cursor="Hand"
- Orientation="Horizontal">
- <Image
- Width="16"
- Height="16"
- Margin="0,0,10,0"
- Source="{Binding ImagePath}"
- RenderOptions.BitmapScalingMode="HighQuality"
- UseLayoutRounding="True"/>
- <TextBlock
- VerticalAlignment="Center"
- FontSize="14"
- Foreground="{StaticResource color.sys.text.neutral.lv2}"
- Text="{Binding Content}" />
- </StackPanel>
- </DataTemplate>
- </ResourceDictionary>
- </UserControl.Resources>
- <ScrollViewer VerticalScrollBarVisibility="Auto">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <StackPanel>
- <Expander
- x:Name="PDFProSeriesExpander"
- Margin="20,20,0,0"
- IsExpanded="True"
- Style="{StaticResource PromotionExpanderStyle}">
- <Expander.Header>
- <Grid
- Name="GridHeader"
- Height="32"
- HorizontalAlignment="Center">
- <TextBlock VerticalAlignment="Center" Text="PDF Pro Series" />
- </Grid>
- </Expander.Header>
- <Border CornerRadius="4">
- <Grid Name="GroupPDFProSeries">
- <ListView
- x:Name="PDFProListview"
- MinWidth="0"
- HorizontalAlignment="Stretch"
- Background="Transparent"
- BorderThickness="0"
- ItemTemplate="{StaticResource PromotionDataTemplate}">
- <ListView.ItemContainerStyle>
- <Style BasedOn="{StaticResource EmptyListViewItem}" TargetType="{x:Type ListViewItem}">
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
- </Trigger>
- </Style.Triggers>
- <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewMouseLeftButtonDown" />
- <Setter Property="AllowDrop" Value="True" />
- </Style>
- </ListView.ItemContainerStyle>
- </ListView>
- </Grid>
- </Border>
- </Expander>
- <Expander
- x:Name="OthersExpander"
- Margin="20,8,0,0"
- IsExpanded="True"
- Style="{StaticResource PromotionExpanderStyle}">
- <Expander.Header>
- <Grid
- Name="GridHeaderOthers"
- Height="32"
- HorizontalAlignment="Center">
- <TextBlock VerticalAlignment="Center" Text="Others" />
- </Grid>
- </Expander.Header>
- <Border CornerRadius="4">
- <Grid Name="GridGroupOthers">
- <ListView
- x:Name="OthersListview"
- MinWidth="0"
- HorizontalAlignment="Stretch"
- Background="Transparent"
- BorderThickness="0"
- ItemTemplate="{StaticResource PromotionDataTemplate}">
- <ListView.ItemContainerStyle>
- <Style BasedOn="{StaticResource EmptyListViewItem}" TargetType="{x:Type ListViewItem}">
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
- </Trigger>
- </Style.Triggers>
- <EventSetter Event="PreviewMouseLeftButtonDown" Handler="FrameworkElement_PreviewMouseLeftButtonDown" />
- <Setter Property="AllowDrop" Value="True" />
- </Style>
- </ListView.ItemContainerStyle>
- </ListView>
- </Grid>
- </Border>
- </Expander>
- </StackPanel>
- <Image
- x:Name="ImgeActivity"
- Grid.Row="1"
- Width="184"
- Height="243"
- Margin="0,30"
- VerticalAlignment="Bottom"
- PreviewMouseLeftButtonDown="ImgeActivity_PreviewMouseLeftButtonDown" />
- </Grid>
- </ScrollViewer>
- </UserControl>
|