Exemple #1
0
        void ComponentslistViewModel_ReportDragEvent(object sender, TaskPaneComponents.DragEventArgs e)
        {
            try
            {
                PowerPoint.Presentation presentation = Globals.ThisAddIn.Application.ActivePresentation;

                if (presentation != null)
                {
                    PowerPoint.Application ppApp = Globals.ThisAddIn.Application;
                    PowerPoint.SlideRange  ppSR  = ppApp.ActiveWindow.Selection.SlideRange;

                    e.Component.Shape.Copy();
                    ppSR.Shapes.Paste();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format(Properties.Resources.DragDropErrMsg, ex.Message));
            }
        }
 void compVM_ReportDragEvent(object sender, DragEventArgs e)
 {
     ComponentViewModelDragEventHandler handler = this.ReportDragEvent;
     if (handler != null)
         handler(this, e);
 }