using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace UICommon.Controls; /// /// Interaction logic for CustomListView.xaml /// public partial class CustomListView : UserControl { public CustomListView() { InitializeComponent(); } public object Source { get { return (object)GetValue(SourceProperty); } set { SetValue(SourceProperty, value); } } // Using a DependencyProperty as the backing store for Source. This enables animation, styling, binding, etc... public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(nameof(Source), typeof(object), typeof(CustomListView), new PropertyMetadata(default, PropertyChangedCallback)); public IEnumerable ItemSource { get { return (IEnumerable)GetValue(ItemSourceProperty); } set { SetValue(ItemSourceProperty, value); } } // Using a DependencyProperty as the backing store for ItemSource. This enables animation, styling, binding, etc... public static readonly DependencyProperty ItemSourceProperty = DependencyProperty.Register(nameof(ItemSource), typeof(IEnumerable), typeof(CustomListView), new PropertyMetadata(default)); static void PropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) { } }