Esempio n. 1
0
        private void FullscreenVideoTransportOsd_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            var vm = ViewModel;

            if (vm != null)
            {
                vm.PropertyChanged += vm_PropertyChanged;

                TxtNowPlayingName.Text = NowPlayingInfo.GetName(vm.NowPlayingItem);
                UpdateLogo(vm, vm.NowPlayingItem);
            }
        }
Esempio n. 2
0
        private void vm_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            var vm = ViewModel;

            if (string.Equals(e.PropertyName, "NowPlayingItem"))
            {
                TxtNowPlayingName.Text = NowPlayingInfo.GetName(vm.NowPlayingItem);
                UpdateLogo(vm, vm.NowPlayingItem);
            }
            else if (string.Equals(e.PropertyName, "PositionTicks"))
            {
                if (!_isPositionSliderUpdating)
                {
                    CurrentPositionSlider.Value = vm.PositionTicks;
                }
            }
        }