public void ClearLayout() { AudioControls.All((i) => i.Stop()); VideoControls.All((i) => i.Stop()); foreach (var el in m_LoadedCanvasItems) { myCanvas.Children.Remove(el); } //documentviewWord.Document = new FixedDocument(); }
private void AddVideoPlaybackControl(VideoPlayerInfo info) { if (Properties.Settings.Default.AudioPlaybackOneOutput) { AudioControls.All((i) => i.Stop()); } var control = new ShowComposer.UserControls.VideoPlaybackControl(); control.IsRelativePath = info.IsRelativePath; control.VideoFile = info.VideoFile; control.SoundVolume = info.AudioVolume; ((VideoPlaybackControl)control).OnRemove += VideoPlaybackControl_OnRemove; Canvas.SetTop(control, info.Top); Canvas.SetLeft(control, info.Left); AddCanvasElement(control, new WindowsPoint()); }