| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- 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;
- /// <summary>
- /// Interaction logic for CustomListView.xaml
- /// </summary>
- 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<object> ItemSource
- {
- get { return (IEnumerable<object>)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<object>), typeof(CustomListView), new PropertyMetadata(default));
- static void PropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- }
- }
|