StandardFrameWindow.xaml.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Navigation;
  13. using System.Windows.Shapes;
  14. using Aitex.Core.Util;
  15. namespace Aitex.Core.UI.View.Frame
  16. {
  17. public partial class StandardFrameWindow : Window
  18. {
  19. public UserControl TopView { set; private get; }
  20. public UserControl CenterView { set; private get; }
  21. public UserControl BottomView { set; private get; }
  22. public StandardFrameWindow()
  23. {
  24. InitializeComponent();
  25. this.Loaded += new RoutedEventHandler(StandardFrameWindow_Loaded);
  26. IsVisibleChanged += new DependencyPropertyChangedEventHandler(MainWindow_IsVisibleChanged);
  27. }
  28. void MainWindow_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
  29. {
  30. }
  31. void StandardFrameWindow_Loaded(object sender, RoutedEventArgs e)
  32. {
  33. if (TopView != null)
  34. TopPanel.Children.Add(TopView);
  35. if (CenterView != null)
  36. CenterPanel.Children.Add(CenterView);
  37. if (BottomView != null)
  38. BottomPanel.Children.Add(BottomView);
  39. }
  40. }
  41. }