protected override void OnDestroy()
        {
            base.OnDestroy();

            exampleItem?.GetExample().Destroy();
            this.exampleItem = null;
        }
        private void SelectionChanged(SelectionChangedType selectionChangedType)
        {
            exampleItem?.GetExample().Destroy();

            this.exampleItem = null;

            if (base.MenuTree.Selection.SelectedValue is Type type)
            {
                this.exampleItem = AllTrickOverViewUtilities.GetItemByType(type);
            }
        }
 private void SelectionChanged(SelectionChangedType selectionChangedType)
 {
     exampleItem?.GetExample().Destroy();
     m_ShouldDrawExampleCreatorUI = false;
     this.exampleItem             = null;
     if (base.MenuTree.Selection.SelectedValue is Type type)
     {
         this.exampleItem = AllTrickOverViewUtilities.GetItemByType(type);
         //每次选择的TreeView变化时都要进行Init
         this.exampleItem.GetExample().Init();
     }
 }