private void btnChangeVis_Click(object sender, RoutedEventArgs e)
 {
     var win = new ChangeObjVisibilityWindow();
     if (win.ShowDialog() != true) return;
     var action = new ChangeObjectVisibility(_defaultEventType, win.ChosenVis, _sourceObjectId, win.SelObject.ObjectId);
     Act = action;
     DialogResult = true;
     Close();
 }
        private static void AddToElement(IInteractive element, EventType eventType)
        {
            var win = new ChangeObjVisibilityWindow();
            if (win.ShowDialog() != true) return;

            var action = new ChangeObjectVisibility(eventType, win.ChosenVis, element.ObjectId, win.SelObject.ObjectId);
            element.AddAction(action);

            var mainWin = DesignerMainWindow.GetInstance();
            var currentSlideNr = mainWin.GetCurrentSlideNr();
            mainWin.canMainCanvas.SaveAllSlideData(Practice.GetInstance().GetSlideByPosition(currentSlideNr));
        }