FrameworkElement Begin(VisualElement element, Animation animation) { if (element == null) { throw new Exception("The element name " + animation.Name_Object + " doesn't exisit in the current text"); } FrameworkElement el = ConvertWPF.Convert(element); // Anima.Animate(el, element, animation); return(el); }
/// <summary> /// Set the elements of a slide into a canvas. /// </summary> /// <param name="canvas">A Canvas where goes the elements</param> /// <param name="diap">The slide that contains the elements</param> /// <param name="for_show">Is true if the presentation is in edition mode</param> public void SetElements(Canvas canvas, Slide diap, bool for_show) { canvas.Children.Clear(); canvas.ClipToBounds = true; canvas.Background = ConvertWPF.ConvertToBrush(diap.Background); for (int i = 0; i < diap.Childrens.Count; i++) { FrameworkElement frame = ConvertWPF.Convert(diap.Childrens[i]); if (!for_show && HasAsoiciateAnimation(diap.Childrens[i])) { frame.Visibility = Visibility.Collapsed; } canvas.Children.Add(frame); } }
/// <summary> /// Put the information of a slides into a Canvas /// </summary> /// <param name="slide">The slide where is the information</param> /// <returns>A new canvas with all his respective information</returns> public Canvas PutSlides(Slide slide) { Canvas nueva = new Canvas(); nueva.Height = Main_Canvas.Height; nueva.Width = Main_Canvas.Width; //nueva.Margin = new Thickness(2); nueva.Background = ConvertWPF.ConvertToBrush(slide.Background); foreach (var item in slide.Childrens) { nueva.Children.Add(ConvertWPF.Convert(item)); } return(nueva); }