HomeContent.xaml.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using PDF_Office.CustomControl;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Collections.ObjectModel;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace PDF_Office.Views
  18. {
  19. public class PromotionBanner
  20. {
  21. public string ImagePath { get; set; }
  22. public string Content { get; set; }
  23. public PromotionBanner(string ImagePath,string Content)
  24. {
  25. this.ImagePath = ImagePath;
  26. this.Content = Content;
  27. }
  28. }
  29. /// <summary>
  30. /// HomeContent.xaml 的交互逻辑
  31. /// </summary>
  32. public partial class HomeContent : UserControl
  33. {
  34. public HomeContent()
  35. {
  36. InitializeComponent();
  37. BtnGuid.IsChecked = true;
  38. }
  39. private void ToggleBtnSelect_Click(object sender, RoutedEventArgs e)
  40. {
  41. BtnGuid.IsChecked = false;
  42. BtnTool.IsChecked = false;
  43. BtnCloud.IsChecked = false;
  44. var btn = sender as CustomIconToggleBtn;
  45. if(btn != null )
  46. {
  47. btn.IsChecked = true;
  48. }
  49. }
  50. }
  51. }