private void ResetPanelModel()
 {
     foreach (var item in (_panelModel as CompositeModel3D).Children)
     {
         item.DataContext = null;
         item.Dispose();
     }
     _panelModel.DataContext = null;
     _panelModel.Dispose();
     _panelModel = null;
 }
示例#2
0
        private void OnTransferPanelToHookerMessage(TransferPanelToHookerMessage msg)
        {
            if (ReferenceEquals(msg.PanelHooker, DataContext))
            {
                _panelModel = msg.TransferPanel();

                if (_panelModel != null)
                {
                    AddLogicalChild(_panelModel);
                    (SceneNode as GroupNode).AddChildNode(_panelModel.SceneNode);
                    _panelModel.Transform = (_panelModel.DataContext as IPanelViewModel).Transform;
                }
            }
        }