SaveFilePopup.xaml.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using PixiEditor.ViewModels;
  2. using System;
  3. using System.Collections.Generic;
  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.Shapes;
  15. namespace PixiEditor.Views
  16. {
  17. /// <summary>
  18. /// Interaction logic for SaveFilePopup.xaml
  19. /// </summary>
  20. public partial class SaveFilePopup : Window
  21. {
  22. SaveFilePopupViewModel dataContext = new SaveFilePopupViewModel();
  23. public SaveFilePopup()
  24. {
  25. InitializeComponent();
  26. this.DataContext = dataContext;
  27. }
  28. public int SaveWidth
  29. {
  30. get { return (int)GetValue(SaveWidthProperty); }
  31. set { SetValue(SaveWidthProperty, value); }
  32. }
  33. public int SaveHeight
  34. {
  35. get { return (int)GetValue(SaveHeightProperty); }
  36. set { SetValue(SaveHeightProperty, value); }
  37. }
  38. // Using a DependencyProperty as the backing store for SaveHeight. This enables animation, styling, binding, etc...
  39. public static readonly DependencyProperty SaveHeightProperty =
  40. DependencyProperty.Register("SaveHeight", typeof(int), typeof(SaveFilePopup), new PropertyMetadata(32));
  41. // Using a DependencyProperty as the backing store for SaveWidth. This enables animation, styling, binding, etc...
  42. public static readonly DependencyProperty SaveWidthProperty =
  43. DependencyProperty.Register("SaveWidth", typeof(int), typeof(SaveFilePopup), new PropertyMetadata(32));
  44. public string SavePath
  45. {
  46. get { return dataContext.FilePath; }
  47. set { dataContext.FilePath = value; }
  48. }
  49. }
  50. }