public VideoPlayerVM(Grid container, VM vm, Rect AreaForPlacementInContainer) { Container = container; Body = new VideoPlayerView(); Body.DataContext = this; VM = vm; container.Children.Add(Body); Body.DragDropSwitchOn(Container, Body.Dragger); Body.ResizeSwitchOn(Container); Body.HorizontalAlignment = HorizontalAlignment.Left; Body.VerticalAlignment = VerticalAlignment.Top; Replace(AreaForPlacementInContainer); Body.UpFocus += UpFocusX; Body.OnSyncLeaderSet += Body_OnSyncLeaderSet; IsSyncronizeLeader = false; SyncronizationShiftVM = new SyncronizationShiftVM(this) { ShiftMaxTime = TimeSpan.FromSeconds(10) }; Body.subtitleProcessor = new SubtitleProcessor(); PlayerPanelVM = new PlayerPanelVM(Body, this); Settings.SettingsChanged += Settings_SettingsChanged; Body.SizeChanged += (s, e) => { UpdateVLCInnerPosition(); }; Body.VLC.OnVolumeChanged += (d, e) => { OnPropertyChanged("Volume"); }; Body.VLC.VideoMMM.SelectablePictureBox1.MouseDown += SelectablePictureBox1_MouseDown; }