using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace PDF_Office.Views.HomePanel { /// /// PromotionContent.xaml 的交互逻辑 /// public partial class PromotionContent : UserControl { private ObservableCollection PDFProPromotion = new ObservableCollection(); private ObservableCollection OthersPromotion = new ObservableCollection(); public PromotionContent() { InitializeComponent(); InitPromotionBanner(); LoadPromotionContents(); } private void InitPromotionBanner() { PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/Windows.png", "Windows")); PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/IPhoneiPad.png", "IPhone /iPad")); PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/Android.png", "Android")); PDFProListview.ItemsSource = PDFProPromotion; OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/ComPDFKit.png", "ComPDFKit")); OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/ComVideoKit.png", "ComVideoKit")); OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/SignFlow.png", "SignFlow")); OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FilmageEditor.png", "Filmage Editor")); OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FilmageScreen.png", "Filmage Screen")); OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FreePDFTemplates.png", "Free PDF Templates")); OthersListview.ItemsSource = OthersPromotion; } private void LoadPromotionContents() { if(promtionRect.Visibility == Visibility.Visible) { } else { PDFProSeriesExpander.IsExpanded = false; OthersExpander.IsExpanded = false; } } private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e) { } } }