/// <summary> /// Creates a new video and adds it as a touch managed object to the MTElementDictionary withing the framework. /// Randomly positions and rotates the photo within the screen area. /// </summary> /// <param name="filePath">Full path to the image.</param> void AddVideo(string filePath) { VideoControl p = new VideoControl(); System.Windows.Shapes.Rectangle i = p.SetVideo(filePath); ElementProperties prop = new ElementProperties(); prop.ElementSupport.AddSupportForAll(); MTContainer cont = new MTSmoothContainer(p, canvas1, prop); framework.RegisterElement(cont); canvas1.Children.Add(p); cont.MaxX = (int)(this.screen_width); cont.MaxY = (int)(this.screen_height); cont.MinX = (int)(this.screen_width / 10); cont.MinY = (int)(this.screen_height / 10); }