BaseUserControl.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Windows;
  4. using System.Windows.Controls;
  5. using System.Windows.Data;
  6. using System.Windows.Threading;
  7. namespace FWindSoft.Wpf
  8. {
  9. /// <summary>
  10. /// 自定义空间基础类
  11. /// </summary>
  12. public class BaseUserControl:UserControl
  13. {
  14. public BaseUserControl()
  15. {
  16. //CollectionView view = new CollectionView(new List<string>());
  17. //view
  18. }
  19. //private Window m_CurrentOwerWindow = null;
  20. //public BaseUserControl()
  21. //{
  22. // this.Loaded += new RoutedEventHandler(BaseUserControl_Loaded);
  23. // this.Unloaded += new RoutedEventHandler(BaseUserControl_Unloaded);
  24. //}
  25. //void BaseUserControl_Unloaded(object sender, RoutedEventArgs e)
  26. //{
  27. // if (m_CurrentOwerWindow != null)
  28. // {
  29. // this.SaveControlData(m_CurrentOwerWindow);
  30. // m_CurrentOwerWindow = null;
  31. // }
  32. //}
  33. //void BaseUserControl_Loaded(object sender, RoutedEventArgs e)
  34. //{
  35. // Dispatcher.BeginInvoke(DispatcherPriority.DataBind, new Action(SetControlDalta));
  36. //}
  37. //private void SetControlDalta()
  38. //{
  39. // Window window = this.GetOwnerWindow();
  40. // m_CurrentOwerWindow = window;
  41. // if(window!=null)
  42. // this.SetControlData(window);
  43. //}
  44. }
  45. }