using System.Windows; using System.Windows.Controls; namespace SHJX.Service.Library.ImitationUniform.elemetation { public class ListViewImitationUniform : ListView { static ListViewImitationUniform() { DefaultStyleKeyProperty.OverrideMetadata(typeof(ListViewImitationUniform), new FrameworkPropertyMetadata(typeof(ListViewImitationUniform))); } public static readonly DependencyProperty ItemWidthProperty = WrapPanel.ItemWidthProperty.AddOwner(typeof(ListViewImitationUniform)); public double ItemWidth { get { return (double)GetValue(ItemWidthProperty); } set { SetValue(ItemWidthProperty, value); } } public static readonly DependencyProperty ItemHeightProperty = WrapPanel.ItemHeightProperty.AddOwner(typeof(ListViewImitationUniform)); public double ItemHeight { get { return (double)GetValue(ItemHeightProperty); } set { SetValue(ItemHeightProperty, value); } } public static readonly DependencyProperty ItemColumnsProperty = DependencyProperty.Register(nameof(ItemColumns), typeof(double), typeof(ListViewImitationUniform), new PropertyMetadata(0d)); public double ItemColumns { get { return (double)GetValue(ItemColumnsProperty); } set { SetValue(ItemColumnsProperty, value); } } public static readonly DependencyProperty ItemRowsProperty = DependencyProperty.Register(nameof(ItemRows), typeof(double), typeof(ListViewImitationUniform), new PropertyMetadata(0d)); public double ItemRows { get { return (double)GetValue(ItemRowsProperty); } set { SetValue(ItemRowsProperty, value); } } } }