using System; using System.Collections; using System.Windows; using System.Windows.Controls; namespace VisionCommonUI { /// /// Interaction logic for FixtureSettingView.xaml /// public partial class FixtureSettingView : UserControl { public static Type _classType = typeof(FixtureSettingView); public static readonly DependencyProperty EnabledProperty = DependencyProperty.Register( nameof(Enabled), typeof(bool), _classType, new FrameworkPropertyMetadata( false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault )); public bool Enabled { get { return (bool)GetValue(EnabledProperty); } set { SetValue(EnabledProperty, value); } } public static readonly DependencyProperty ItemsSourceProperty = DependencyProperty.Register( nameof(ItemsSource), typeof(IEnumerable), _classType, new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault )); public IEnumerable ItemsSource { get { return (IEnumerable)GetValue(ItemsSourceProperty); } set { SetValue(ItemsSourceProperty, value); } } public static readonly DependencyProperty SelectedItemProperty = DependencyProperty.Register( nameof(SelectedItem), typeof(object), _classType, new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault )); public object SelectedItem { get { return (object)GetValue(SelectedItemProperty); } set { SetValue(SelectedItemProperty, value); } } public FixtureSettingView() { InitializeComponent(); DataContext = this; } } }