80 lines
2.6 KiB
C#
80 lines
2.6 KiB
C#
/*
|
|
* Copyright (c) 2025 LG Electronics Inc.
|
|
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
|
|
*/
|
|
using System;
|
|
using System.Collections;
|
|
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;
|
|
using VisionCommon;
|
|
|
|
namespace VisionCommonUI {
|
|
/// <summary>
|
|
/// Interaction logic for PatternBlockSettingView.xaml
|
|
/// </summary>
|
|
public partial class PatternBlockSettingView : UserControl {
|
|
public static Type _classType = typeof(PatternBlockSettingView);
|
|
|
|
public static readonly DependencyProperty BlockIdProperty
|
|
= DependencyProperty.Register(
|
|
nameof(BlockId),
|
|
typeof(int),
|
|
_classType,
|
|
new FrameworkPropertyMetadata(
|
|
-1,
|
|
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault
|
|
));
|
|
|
|
public int BlockId {
|
|
get { return (int)GetValue(BlockIdProperty); }
|
|
set { SetValue(BlockIdProperty, 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 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 PatternBlockSettingView() {
|
|
InitializeComponent();
|
|
DataContext = this;
|
|
}
|
|
}
|
|
}
|