using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using Wpf.Ui.Extend.Extensions;
namespace Wpf.Ui.Extend.Controls
{
///
/// 通过该类,对绑定的集合->重新创建为CheckComboBoxItem->应用默认样式
///
public class CheckComboBox : ComboBoxEx
{
#region PrivateProperty
private ContentPresenter PART_ContentSite;
private TextBox PART_FilterTextBox;
private ICollectionView view;
private Popup PART_Popup;
private bool popupIsFirstOpen;
#endregion
#region DependencyProperty
public static readonly DependencyProperty ContentProperty =
DependencyProperty.Register(nameof(Content), typeof(string), typeof(CheckComboBox), new PropertyMetadata(string.Empty));
///
/// 内容
///
public string Content
{
get { return (string)GetValue(ContentProperty); }
set { SetValue(ContentProperty, value); }
}
public static readonly DependencyProperty ValueProperty =
DependencyProperty.Register(nameof(Value), typeof(string), typeof(CheckComboBox), new PropertyMetadata(string.Empty));
///
/// 值
///
public string Value
{
get { return (string)GetValue(ValueProperty); }
set { SetValue(ValueProperty, value); }
}
#region SelectedObjList
[Bindable(true), Description("获取或者设置当前勾选项列表")]
public ObservableCollection