BehaviorTreeView.xaml.cs 1.0 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 System.ComponentModel.Composition;
  15. using Infrastructure;
  16. namespace BehaviorTree
  17. {
  18. /// <summary>
  19. /// TreeCanvasView.xaml 的交互逻辑
  20. /// </summary>
  21. [ViewExport(RegionName = "TreeCanvasRegion")]
  22. [PartCreationPolicy(CreationPolicy.NonShared)]
  23. public partial class BehaviorTreeView : UserControl
  24. {
  25. public BehaviorTreeView()
  26. {
  27. InitializeComponent();
  28. }
  29. [Import]
  30. BehaviorTreeViewModel ViewModel
  31. {
  32. get
  33. {
  34. return this.DataContext as BehaviorTreeViewModel;
  35. }
  36. set
  37. {
  38. this.DataContext = value;
  39. }
  40. }
  41. private void NewNode_Executed(object sender, ExecutedRoutedEventArgs e)
  42. {
  43. }
  44. }
  45. }