FileHorizontal.xaml.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System.Windows.Media;
  2. namespace HistoryView.Controls.FileSelector;
  3. /// <summary>
  4. /// Interaction logic for FileHorizontal.xaml
  5. /// </summary>
  6. public partial class FileHorizontal : UserControl
  7. {
  8. public FileHorizontal()
  9. {
  10. InitializeComponent();
  11. }
  12. public object ImageSource
  13. {
  14. get { return (object)GetValue(ImageSourceProperty); }
  15. set { SetValue(ImageSourceProperty, value); }
  16. }
  17. // Using a DependencyProperty as the backing store for ImageSource. This enables animation, styling, binding, etc...
  18. public static readonly DependencyProperty ImageSourceProperty =
  19. DependencyProperty.Register("ImageSource", typeof(object), typeof(FileHorizontal), new PropertyMetadata(default));
  20. public string FileType
  21. {
  22. get { return (string)GetValue(FileTypeProperty); }
  23. set { SetValue(FileTypeProperty, value); }
  24. }
  25. // Using a DependencyProperty as the backing store for FileType. This enables animation, styling, binding, etc...
  26. public static readonly DependencyProperty FileTypeProperty =
  27. DependencyProperty.Register("FileType", typeof(string), typeof(FileHorizontal), new PropertyMetadata(default));
  28. public string FileName
  29. {
  30. get { return (string)GetValue(FileNameProperty); }
  31. set { SetValue(FileNameProperty, value); }
  32. }
  33. // Using a DependencyProperty as the backing store for FileName. This enables animation, styling, binding, etc...
  34. public static readonly DependencyProperty FileNameProperty =
  35. DependencyProperty.Register("FileName", typeof(string), typeof(FileHorizontal), new PropertyMetadata(default));
  36. }