diff --git a/README-cn.md b/README-cn.md
index f857f2eb..f6f1fe21 100644
--- a/README-cn.md
+++ b/README-cn.md
@@ -119,6 +119,10 @@ Step 4: Enjoy coding
## Latest examples
+### CheckComboBox
+
+
+
### ImageSelector

@@ -135,12 +139,12 @@ Step 4: Enjoy coding

+## History publication
+
### GlowWindow

-## History publication
-
### FlowDocumentScrollViewerStyle

diff --git a/README.md b/README.md
index 8625625f..c5bb1625 100644
--- a/README.md
+++ b/README.md
@@ -119,6 +119,10 @@ Step 4: Enjoy coding
## Latest examples
+### CheckComboBox
+
+
+
### ImageSelector

@@ -135,12 +139,12 @@ Step 4: Enjoy coding

+## History publication
+
### GlowWindow

-## History publication
-
### FlowDocumentScrollViewerStyle

diff --git a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj
index c17c05bc..de147646 100644
--- a/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj
+++ b/src/Net_40/HandyControlDemo_Net_40/HandyControlDemo_Net_40.csproj
@@ -223,6 +223,9 @@
Resources\Img\LeftMainContent\CheckBox_16x.png
+
+ Resources\Img\LeftMainContent\CheckBoxList_16x.png
+
Resources\Img\LeftMainContent\ColorPalette_16x.png
diff --git a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
index 0a009190..30396196 100644
--- a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
+++ b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
@@ -223,6 +223,9 @@
Resources\Img\LeftMainContent\CheckBox_16x.png
+
+ Resources\Img\LeftMainContent\CheckBoxList_16x.png
+
Resources\Img\LeftMainContent\ColorPalette_16x.png
diff --git a/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json b/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json
index c1e8e21e..46df4ea8 100644
--- a/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json
+++ b/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json
@@ -31,8 +31,8 @@
[ "ToolBar", "ToolBarDemoCtl", "ToolBar_16x", "" ],
[ "Border", "BorderDemoCtl", "BorderElement_16x", "" ],
[ "Label", "LabelDemoCtl", "Label_16x", "" ],
- [ "Frame", "FrameDemoCtl", "frame_16xLG", "1" ],
- [ "Window", "NativeWindowDemoCtl", "WindowsForm_16x", "1" ],
+ [ "Frame", "FrameDemoCtl", "frame_16xLG", "" ],
+ [ "Window", "NativeWindowDemoCtl", "WindowsForm_16x", "" ],
[ "Geometry", "GeometryDemoCtl", "Path_16x", "1" ]
]
},
@@ -57,6 +57,7 @@
[ "NumericUpDown", "NumericUpDownDemoCtl", "NumericListBox_16x", "" ],
[ "TextBox", "TextBoxDemoCtl", "TextBox_16x", "" ],
[ "ComboBox", "ComboBoxDemoCtl", "ComboBox_16x", "" ],
+ [ "CheckComboBox", "CheckComboBoxDemoCtl", "CheckBoxList_16x", "1" ],
[ "PasswordBox", "PasswordBoxDemoCtl", "PasswordBox_16x", "" ],
[ "PinBox", "PinBoxDemoCtl", "Ellipsis_16x", "" ],
[ "DatePicker", "DatePickerDemoCtl", "DatePicker_16x", "" ],
@@ -104,7 +105,7 @@
[ "Notification", "NotificationDemoCtl", "Procedure_16x", "" ],
[ "Dialog", "DialogDemoCtl", "Dialog_16x", "" ],
[ "Screenshot", "ScreenshotDemoCtl", "WindowScreenshot_16x", "1" ],
- [ "Window", "WindowDemoCtl", "WindowsForm_16x", "1" ]
+ [ "Window", "WindowDemoCtl", "WindowsForm_16x", "" ]
]
},
{
diff --git a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems
index 1ae0db8c..9e2f6ce1 100644
--- a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems
+++ b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems
@@ -113,6 +113,9 @@
ChatBubbleDemoCtl.xaml
+
+ CheckComboBoxDemoCtl.xaml
+
CirclePanelDemoCtl.xaml
@@ -598,6 +601,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs
index 7f1a0b46..2762cd42 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.Designer.cs
@@ -266,7 +266,18 @@ namespace HandyControlDemo.Properties.Langs {
return ResourceManager.GetString("CheckBox", resourceCulture);
}
}
-
+
+ ///
+ /// 查找类似 多选组合框 的本地化字符串。
+ ///
+ public static string CheckComboBox
+ {
+ get
+ {
+ return ResourceManager.GetString("CheckComboBox", resourceCulture);
+ }
+ }
+
///
/// 查找类似 圆形布局 的本地化字符串。
///
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx
index 090e5b57..13e032a4 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.en.resx
@@ -759,4 +759,7 @@
Geometry
+
+ CheckComboBox
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx
index 2edb2676..1ed78d51 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fa.resx
@@ -759,4 +759,7 @@
Geometry
+
+ CheckComboBox
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx
index 57a16fd2..ea8e5781 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.fr.resx
@@ -759,4 +759,7 @@
Geometry
+
+ CheckComboBox
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ko-KR.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ko-KR.resx
index 065145dc..460d7c8e 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ko-KR.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ko-KR.resx
@@ -759,4 +759,7 @@
Geometry
+
+ CheckComboBox
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.pt-BR.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.pt-BR.resx
index ac7835dc..b4c05ff9 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.pt-BR.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.pt-BR.resx
@@ -759,4 +759,7 @@
Geometry
+
+ CheckComboBox
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx
index 34a270a9..2eca1695 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.resx
@@ -759,4 +759,7 @@
几何形状
+
+ 多选组合框
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ru.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ru.resx
index 090e5b57..13e032a4 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ru.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.ru.resx
@@ -759,4 +759,7 @@
Geometry
+
+ CheckComboBox
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.tr.resx b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.tr.resx
index b641cf03..deef133a 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.tr.resx
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/Lang.tr.resx
@@ -759,4 +759,7 @@
Geometry
+
+ CheckComboBox
+
\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs b/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs
index 93ca4c9c..e8118f39 100644
--- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs
+++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs
@@ -60,7 +60,8 @@ namespace HandyControlDemo.Properties.Langs
OnPropertyChanged(nameof(ChatBubble));
OnPropertyChanged(nameof(Chatroom));
OnPropertyChanged(nameof(CheckBox));
- OnPropertyChanged(nameof(CirclePanel));
+ OnPropertyChanged(nameof(CheckComboBox));
+ OnPropertyChanged(nameof(CirclePanel));
OnPropertyChanged(nameof(Clear));
OnPropertyChanged(nameof(Click2Count));
OnPropertyChanged(nameof(Clock));
@@ -368,6 +369,11 @@ namespace HandyControlDemo.Properties.Langs
///
public string CheckBox => Lang.CheckBox;
+ ///
+ /// 查找类似 多选组合框 的本地化字符串。
+ ///
+ public string CheckComboBox => Lang.CheckComboBox;
+
///
/// 查找类似 圆形布局 的本地化字符串。
///
@@ -1447,6 +1453,11 @@ namespace HandyControlDemo.Properties.Langs
///
public static string CheckBox = nameof(CheckBox);
+ ///
+ /// 查找类似 多选组合框 的本地化字符串。
+ ///
+ public static string CheckComboBox = nameof(CheckComboBox);
+
///
/// 查找类似 圆形布局 的本地化字符串。
///
diff --git a/src/Shared/HandyControlDemo_Shared/Resources/Img/LeftMainContent/CheckboxList_16x.png b/src/Shared/HandyControlDemo_Shared/Resources/Img/LeftMainContent/CheckboxList_16x.png
new file mode 100644
index 00000000..856bab79
Binary files /dev/null and b/src/Shared/HandyControlDemo_Shared/Resources/Img/LeftMainContent/CheckboxList_16x.png differ
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml
new file mode 100644
index 00000000..4a10a841
--- /dev/null
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml.cs
new file mode 100644
index 00000000..44bbec67
--- /dev/null
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml.cs
@@ -0,0 +1,10 @@
+namespace HandyControlDemo.UserControl
+{
+ public partial class CheckComboBoxDemoCtl
+ {
+ public CheckComboBoxDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml
index 66837b23..cbbe9643 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml
@@ -17,9 +17,7 @@
-
-
-
+
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
new file mode 100644
index 00000000..edd3f495
--- /dev/null
+++ b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
@@ -0,0 +1,225 @@
+using System;
+using System.ComponentModel;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using HandyControl.Data;
+using HandyControl.Interactivity;
+
+namespace HandyControl.Controls
+{
+ [TemplatePart(Name = ElementPanel, Type = typeof(Panel))]
+ [TemplatePart(Name = ElementSelectAll, Type = typeof(CheckComboBoxItem))]
+ public class CheckComboBox : ListBox, IDataInput
+ {
+ private const string ElementPanel = "PART_Panel";
+
+ private const string ElementSelectAll = "PART_SelectAll";
+
+ private Panel _panel;
+
+ private CheckComboBoxItem _selectAllItem;
+
+ private bool _isInternalAction;
+
+ public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
+ "IsError", typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
+
+ public bool IsError
+ {
+ get => (bool) GetValue(IsErrorProperty);
+ set => SetValue(IsErrorProperty, ValueBoxes.BooleanBox(value));
+ }
+
+ public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
+ "ErrorStr", typeof(string), typeof(CheckComboBox), new PropertyMetadata(default(string)));
+
+ public string ErrorStr
+ {
+ get => (string) GetValue(ErrorStrProperty);
+ set => SetValue(ErrorStrProperty, value);
+ }
+
+ public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
+ "TextType", typeof(TextType), typeof(CheckComboBox), new PropertyMetadata(default(TextType)));
+
+ public TextType TextType
+ {
+ get => (TextType) GetValue(TextTypeProperty);
+ set => SetValue(TextTypeProperty, value);
+ }
+
+ public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
+ "ShowClearButton", typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
+
+ public bool ShowClearButton
+ {
+ get => (bool) GetValue(ShowClearButtonProperty);
+ set => SetValue(ShowClearButtonProperty, ValueBoxes.BooleanBox(value));
+ }
+
+ public static readonly DependencyProperty MaxDropDownHeightProperty =
+ System.Windows.Controls.ComboBox.MaxDropDownHeightProperty.AddOwner(typeof(CheckComboBox),
+ new FrameworkPropertyMetadata(SystemParameters.PrimaryScreenHeight / 3));
+
+ [Bindable(true), Category("Layout")]
+ [TypeConverter(typeof(LengthConverter))]
+ public double MaxDropDownHeight
+ {
+ get => (double) GetValue(MaxDropDownHeightProperty);
+ set => SetValue(MaxDropDownHeightProperty, value);
+ }
+
+ public static readonly DependencyProperty IsDropDownOpenProperty = DependencyProperty.Register(
+ "IsDropDownOpen", typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
+
+ public bool IsDropDownOpen
+ {
+ get => (bool) GetValue(IsDropDownOpenProperty);
+ set => SetValue(IsDropDownOpenProperty, ValueBoxes.BooleanBox(value));
+ }
+
+ public static readonly DependencyProperty TagStyleProperty = DependencyProperty.Register(
+ "TagStyle", typeof(Style), typeof(CheckComboBox), new PropertyMetadata(default(Style)));
+
+ public Style TagStyle
+ {
+ get => (Style) GetValue(TagStyleProperty);
+ set => SetValue(TagStyleProperty, value);
+ }
+
+ public static readonly DependencyProperty ShowSelectAllButtonProperty = DependencyProperty.Register(
+ "ShowSelectAllButton", typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
+
+ public bool ShowSelectAllButton
+ {
+ get => (bool) GetValue(ShowSelectAllButtonProperty);
+ set => SetValue(ShowSelectAllButtonProperty, ValueBoxes.BooleanBox(value));
+ }
+
+ public CheckComboBox()
+ {
+ AddHandler(Controls.Tag.ClosedEvent, new RoutedEventHandler(Tags_OnClosed));
+ CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) => SelectedItems.Clear()));
+ }
+
+ private void Tags_OnClosed(object sender, RoutedEventArgs e)
+ {
+ if (e.OriginalSource is Tag tag && tag.Tag is CheckComboBoxItem checkComboBoxItem)
+ {
+ checkComboBoxItem.SetCurrentValue(IsSelectedProperty, false);
+ }
+ }
+
+ public override void OnApplyTemplate()
+ {
+ if (_selectAllItem != null)
+ {
+ _selectAllItem.Selected -= SelectAllItem_Selected;
+ _selectAllItem.Unselected -= SelectAllItem_Unselected;
+ }
+
+ base.OnApplyTemplate();
+
+ _panel = GetTemplateChild(ElementPanel) as Panel;
+ _selectAllItem = GetTemplateChild(ElementSelectAll) as CheckComboBoxItem;
+ if (_selectAllItem != null)
+ {
+ _selectAllItem.Selected += SelectAllItem_Selected;
+ _selectAllItem.Unselected += SelectAllItem_Unselected;
+ }
+ }
+
+ public bool VerifyData()
+ {
+ OperationResult result;
+
+ if (VerifyFunc != null)
+ {
+ result = VerifyFunc.Invoke(null);
+ }
+ else
+ {
+ if (SelectedItems.Count > 0)
+ {
+ result = OperationResult.Success();
+ }
+ else if (InfoElement.GetNecessary(this))
+ {
+ result = OperationResult.Failed(Properties.Langs.Lang.IsNecessary);
+ }
+ else
+ {
+ result = OperationResult.Success();
+ }
+ }
+
+ IsError = !result.Data;
+ ErrorStr = result.Message;
+ return result.Data;
+ }
+
+ public Func> VerifyFunc { get; set; }
+
+ private void SwitchAllItems(bool selected)
+ {
+ if (_isInternalAction) return;
+ _isInternalAction = true;
+
+ foreach (var item in ItemContainerGenerator.Items)
+ {
+ if (ItemContainerGenerator.ContainerFromItem(item) is CheckComboBoxItem checkComboBoxItem)
+ {
+ checkComboBoxItem.SetCurrentValue(ListBoxItem.IsSelectedProperty, selected);
+ }
+ }
+
+ _isInternalAction = false;
+ UpdateTags();
+ }
+
+ private void SelectAllItem_Selected(object sender, RoutedEventArgs e) => SwitchAllItems(true);
+
+ private void SelectAllItem_Unselected(object sender, RoutedEventArgs e) => SwitchAllItems(false);
+
+ protected override void OnSelectionChanged(SelectionChangedEventArgs e)
+ {
+ UpdateTags();
+ VerifyData();
+
+ base.OnSelectionChanged(e);
+ }
+
+ protected override bool IsItemItsOwnContainerOverride(object item) => item is CheckComboBoxItem;
+
+ protected override DependencyObject GetContainerForItemOverride() => new CheckComboBoxItem();
+
+ private void UpdateTags()
+ {
+ if (_panel == null || _isInternalAction) return;
+
+ if (_selectAllItem != null)
+ {
+ _isInternalAction = true;
+ _selectAllItem.SetCurrentValue(IsSelectedProperty, SelectedItems.Count == Items.Count);
+ _isInternalAction = false;
+ }
+
+ _panel.Children.Clear();
+
+ foreach (var item in SelectedItems)
+ {
+ if (ItemContainerGenerator.ContainerFromItem(item) is CheckComboBoxItem checkComboBoxItem)
+ {
+ var tag = new Tag
+ {
+ Style = TagStyle,
+ Content = checkComboBoxItem.Content,
+ Tag = checkComboBoxItem
+ };
+ _panel.Children.Add(tag);
+ }
+ }
+ }
+ }
+}
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBoxItem.cs b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBoxItem.cs
new file mode 100644
index 00000000..67e0dd7a
--- /dev/null
+++ b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBoxItem.cs
@@ -0,0 +1,9 @@
+using System.Windows.Controls;
+
+namespace HandyControl.Controls
+{
+ public class CheckComboBoxItem : ListBoxItem
+ {
+
+ }
+}
diff --git a/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems b/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems
index e38ea129..00b8950f 100644
--- a/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems
+++ b/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems
@@ -31,6 +31,8 @@
+
+
@@ -116,6 +118,7 @@
+
@@ -440,6 +443,14 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.Designer.cs b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.Designer.cs
index dc9c63af..06b51481 100644
--- a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.Designer.cs
+++ b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.Designer.cs
@@ -59,7 +59,18 @@ namespace HandyControl.Properties.Langs {
resourceCulture = value;
}
}
-
+
+ ///
+ /// 查找类似 所有 的本地化字符串。
+ ///
+ public static string All
+ {
+ get
+ {
+ return ResourceManager.GetString("All", resourceCulture);
+ }
+ }
+
///
/// 查找类似 上午 的本地化字符串。
///
diff --git a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.en.resx b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.en.resx
index d9294600..b12aa4f1 100644
--- a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.en.resx
+++ b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.en.resx
@@ -237,4 +237,7 @@
Miscellaneous
+
+ All
+
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.fa.resx b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.fa.resx
index 5d89a3fb..aa869a08 100644
--- a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.fa.resx
+++ b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.fa.resx
@@ -237,4 +237,7 @@
Miscellaneous
+
+ All
+
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.fr.resx b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.fr.resx
index 3244677f..14180e25 100644
--- a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.fr.resx
+++ b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.fr.resx
@@ -237,4 +237,7 @@
Miscellaneous
+
+ All
+
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.ko-KR.resx b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.ko-KR.resx
index 2b5b057b..74be0fba 100644
--- a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.ko-KR.resx
+++ b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.ko-KR.resx
@@ -237,4 +237,7 @@
Miscellaneous
+
+ All
+
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.pt-BR.resx b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.pt-BR.resx
index 9e82b831..724099b7 100644
--- a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.pt-BR.resx
+++ b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.pt-BR.resx
@@ -237,4 +237,7 @@
Geral
+
+ All
+
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.resx b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.resx
index 7d98ff34..5b9d9f8d 100644
--- a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.resx
+++ b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.resx
@@ -237,4 +237,7 @@
杂项
+
+ 全部
+
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.ru.resx b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.ru.resx
index 4b8c4285..35b6367a 100644
--- a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.ru.resx
+++ b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.ru.resx
@@ -237,4 +237,7 @@
Miscellaneous
+
+ All
+
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.tr.resx b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.tr.resx
index 1ee2f1af..ea40fa6f 100644
--- a/src/Shared/HandyControl_Shared/Properties/Langs/Lang.tr.resx
+++ b/src/Shared/HandyControl_Shared/Properties/Langs/Lang.tr.resx
@@ -237,4 +237,7 @@
Miscellaneous
+
+ All
+
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Properties/Langs/LangProvider.cs b/src/Shared/HandyControl_Shared/Properties/Langs/LangProvider.cs
index 9f52f043..5302237c 100644
--- a/src/Shared/HandyControl_Shared/Properties/Langs/LangProvider.cs
+++ b/src/Shared/HandyControl_Shared/Properties/Langs/LangProvider.cs
@@ -37,7 +37,8 @@ namespace HandyControl.Properties.Langs
private void UpdateLangs()
{
- OnPropertyChanged(nameof(Am));
+ OnPropertyChanged(nameof(All));
+ OnPropertyChanged(nameof(Am));
OnPropertyChanged(nameof(Cancel));
OnPropertyChanged(nameof(CannotRegisterCompositeCommandInItself));
OnPropertyChanged(nameof(CannotRegisterSameCommandTwice));
@@ -78,6 +79,11 @@ namespace HandyControl.Properties.Langs
OnPropertyChanged(nameof(ZoomOut));
}
+ ///
+ /// 查找类似 所有 的本地化字符串。
+ ///
+ public string All => Lang.All;
+
///
/// 查找类似 上午 的本地化字符串。
///
@@ -282,6 +288,11 @@ namespace HandyControl.Properties.Langs
public class LangKeys
{
+ ///
+ /// 查找类似 所有 的本地化字符串。
+ ///
+ public static string All = nameof(All);
+
///
/// 查找类似 上午 的本地化字符串。
///
diff --git a/src/Shared/HandyControl_Shared/Themes/Basic/Converters.xaml b/src/Shared/HandyControl_Shared/Themes/Basic/Converters.xaml
index 97245b65..97863a55 100644
--- a/src/Shared/HandyControl_Shared/Themes/Basic/Converters.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Basic/Converters.xaml
@@ -18,6 +18,7 @@
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
new file mode 100644
index 00000000..0206170a
--- /dev/null
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
@@ -0,0 +1,621 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/CheckComboBox.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/CheckComboBox.xaml
new file mode 100644
index 00000000..0278e91e
--- /dev/null
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/CheckComboBox.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Style.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Style.xaml
index 528eb309..4cba6b3c 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Style.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Style.xaml
@@ -25,6 +25,7 @@
+
diff --git a/src/Shared/HandyControl_Shared/Tools/Converter/Object2VisibilityReConverter.cs b/src/Shared/HandyControl_Shared/Tools/Converter/Object2VisibilityReConverter.cs
new file mode 100644
index 00000000..e5b3e39a
--- /dev/null
+++ b/src/Shared/HandyControl_Shared/Tools/Converter/Object2VisibilityReConverter.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+
+namespace HandyControl.Tools.Converter
+{
+ public class Object2VisibilityReConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return value == null ? Visibility.Visible : Visibility.Collapsed;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}