Exemple #1
0
        private void MenuItem_PasteItemClick(object sender, RoutedEventArgs e)
        {
            String  typeName = (string)Clipboard.GetDataObject().GetFormats().GetValue(0);
            var     itemType = Type.GetType(typeName);
            dynamic item     = SceneItem.GetFromClipboard(itemType);

            Convert.ChangeType(item, itemType);
            if (item != null)
            {
                SceneManager.Instance.CurrentScene.Add(item);
            }
        }