예제 #1
0
        /// <summary>
        /// Fires when the value of the FilterProperty changes
        /// </summary>
        /// <param name="d">Dependency object containing the dependency property that changed</param>
        /// <param name="e">Events passed to the argument</param>
        private static void OnFilterPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NowPlayingView nowPlayingView = d as NowPlayingView;

            if (nowPlayingView.Filter != null)
            {
                nowPlayingView.Filter.PropertyChanged -= nowPlayingView.Filter_PropertyChanged;
                nowPlayingView.Filter.PropertyChanged += nowPlayingView.Filter_PropertyChanged;
            }
        }
예제 #2
0
        /// <summary>
        /// Fires when the value of the MediaItemsProperty changes
        /// </summary>
        /// <param name="d">Dependency object containing the dependency property that changed</param>
        /// <param name="e">Events passed to the argument</param>
        private static void OnMediaItemsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            NowPlayingView npv = d as NowPlayingView;

            if (npv.MediaItems != null)
            {
                npv.MediaItems.CollectionChanged -= npv.MediaItems_CollectionChanged;
                npv.MediaItems.CollectionChanged += npv.MediaItems_CollectionChanged;
            }
        }