public static void IsShowImageListPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { MovieGridUserControl control = d as MovieGridUserControl; if (control == null) { return; } control.lb_list.Visibility = (bool)e.NewValue ? Visibility.Visible : Visibility.Collapsed; control.lb_list1.Visibility = (bool)e.NewValue ? Visibility.Collapsed : Visibility.Visible; }
public static void DataSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { MovieGridUserControl control = d as MovieGridUserControl; if (control == null) { return; } control.lb_list.ItemsSource = e.NewValue as IEnumerable; control.lb_list1.ItemsSource = e.NewValue as IEnumerable; }