PromotionContent.xaml.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace PDF_Office.Views.HomePanel
  17. {
  18. /// <summary>
  19. /// PromotionContent.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class PromotionContent : UserControl
  22. {
  23. private ObservableCollection<PromotionBanner> PDFProPromotion = new ObservableCollection<PromotionBanner>();
  24. private ObservableCollection<PromotionBanner> OthersPromotion = new ObservableCollection<PromotionBanner>();
  25. public PromotionContent()
  26. {
  27. InitializeComponent();
  28. InitPromotionBanner();
  29. LoadPromotionContents();
  30. }
  31. private void InitPromotionBanner()
  32. {
  33. PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/Windows.png", "Windows"));
  34. PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/IPhoneiPad.png", "IPhone /iPad"));
  35. PDFProPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/Android.png", "Android"));
  36. PDFProListview.ItemsSource = PDFProPromotion;
  37. OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/ComPDFKit.png", "ComPDFKit"));
  38. OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/ComVideoKit.png", "ComVideoKit"));
  39. OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/SignFlow.png", "SignFlow"));
  40. OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FilmageEditor.png", "Filmage Editor"));
  41. OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FilmageScreen.png", "Filmage Screen"));
  42. OthersPromotion.Add(new PromotionBanner("pack://application:,,,/Resources/PromotionIcon/FreePDFTemplates.png", "Free PDF Templates"));
  43. OthersListview.ItemsSource = OthersPromotion;
  44. }
  45. private void LoadPromotionContents()
  46. {
  47. if(promtionRect.Visibility == Visibility.Visible)
  48. {
  49. }
  50. else
  51. {
  52. PDFProSeriesExpander.IsExpanded = false;
  53. OthersExpander.IsExpanded = false;
  54. }
  55. }
  56. private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
  57. {
  58. }
  59. }
  60. }