diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml
index 038fd94c1..0f4034c64 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml
@@ -49,6 +49,7 @@
+
@@ -99,6 +100,16 @@
IsEnabled="False"
Text="IsSelected" />
+
+
+
@@ -151,8 +162,7 @@
-
+
@@ -171,11 +181,11 @@
Grid.Row="1"
Margin="5"
VerticalAlignment="Stretch"
- ItemsSource="{Binding}"
Delimiter="{Binding ElementName=_delimiter, Path=Text}"
ValueMemberPath="{Binding ElementName=_valueMemberPath, Path=SelectedItem}"
SelectedMemberPath="{Binding ElementName=_selectedMemberPath, Path=Text}"
- DisplayMemberPath="{Binding ElementName=_displayMemberPath, Path=SelectedItem}" />
+ DisplayMemberPath="{Binding ElementName=_displayMemberPath, Path=SelectedItem}"
+ AllowFilter="{Binding ElementName=_isAllowFilter, Path=IsChecked}" />
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml.cs
index e5a3beca2..9cdb708f6 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/CheckLists/Views/CheckListsView.xaml.cs
@@ -15,7 +15,6 @@ This program is provided to you under the terms of the Microsoft Public
*************************************************************************************/
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.ComponentModel;
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.CheckLists.Views
@@ -28,20 +27,26 @@ public partial class CheckListsView : DemoView
public CheckListsView()
{
InitializeComponent();
- this.DataContext = new List()
+ _itemModels.ItemsSource = GetData();
+ _checkListBox.ItemsSource = GetData();
+ _checkComboBox.ItemsSource = GetData();
+ }
+
+ private static List GetData()
+ {
+ return new List
{
- new Person(){ID=101, FirstName="John", LastName="Smith"},
- new Person(){ID=102, FirstName="Janel", LastName="Leverling"},
- new Person(){ID=103, FirstName="Laura", LastName="Callahan"},
- new Person(){ID=104, FirstName="Robert", LastName="King"},
- new Person(){ID=105, FirstName="Margaret", LastName="Peacock"},
- new Person(){ID=106, FirstName="Andrew", LastName="Fuller"},
- new Person(){ID=107, FirstName="Anne", LastName="Dodsworth"},
- new Person(){ID=108, FirstName="Nancy", LastName="Davolio"},
- new Person(){ID=109, FirstName="Naomi", LastName="Suyama"},
+ new Person {ID=101, FirstName="John", LastName="Smith"},
+ new Person {ID=102, FirstName="Janel", LastName="Leverling"},
+ new Person {ID=103, FirstName="Laura", LastName="Callahan"},
+ new Person {ID=104, FirstName="Robert", LastName="King"},
+ new Person {ID=105, FirstName="Margaret", LastName="Peacock"},
+ new Person {ID=106, FirstName="Andrew", LastName="Fuller"},
+ new Person {ID=107, FirstName="Anne", LastName="Dodsworth"},
+ new Person {ID=108, FirstName="Nancy", LastName="Davolio"},
+ new Person {ID=109, FirstName="Naomi", LastName="Suyama"},
};
}
-
}
public class Person : INotifyPropertyChanged
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs
index 442471ad3..c2952264e 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Implementation/CheckComboBox.cs
@@ -5,7 +5,7 @@ Extended WPF Toolkit
Copyright (C) 2007-2013 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
- License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
+ License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at http://xceed.com/wpf_toolkit
@@ -18,26 +18,28 @@ This program is provided to you under the terms of the Microsoft Public
using System.Linq;
using System.Windows;
using System.Windows.Input;
-using Xceed.Wpf.Toolkit.Primitives;
-using Xceed.Wpf.Toolkit.Core.Utilities;
-using System.Windows.Controls;
-using System.Collections;
using System.Collections.Generic;
using System.Windows.Controls.Primitives;
+using Xceed.Wpf.Toolkit.Core.Utilities;
namespace Xceed.Wpf.Toolkit
{
+
[TemplatePart( Name = PART_Popup, Type = typeof( Popup ) )]
+ [TemplatePart(Name = PART_FilterBox, Type = typeof(FilterBox))]
public class CheckComboBox : Xceed.Wpf.Toolkit.Primitives.Selector
{
private const string PART_Popup = "PART_Popup";
+ private const string PART_FilterBox = "PART_FilterBox";
#region Members
- private ValueChangeHelper _displayMemberPathValuesChangeHelper;
+ private readonly ValueChangeHelper _displayMemberPathValuesChangeHelper;
private bool _ignoreTextValueChanged;
private Popup _popup;
- private List
-
+
-
+
\ No newline at end of file
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml
index d957d50db..4a538dab9 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckComboBox/Themes/Generic.xaml
@@ -20,6 +20,10 @@
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters"
xmlns:chrome="clr-namespace:Xceed.Wpf.Toolkit.Chromes">
+
+
+
+
-
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckListBox/Implementation/CheckListBox.cs b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckListBox/Implementation/CheckListBox.cs
index 3796b06da..7789c13a6 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckListBox/Implementation/CheckListBox.cs
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckListBox/Implementation/CheckListBox.cs
@@ -19,8 +19,60 @@ This program is provided to you under the terms of the Microsoft Public
namespace Xceed.Wpf.Toolkit
{
+ [TemplatePart(Name = PART_FilterBox, Type = typeof(FilterBox))]
public class CheckListBox : Selector
{
+ private const string PART_FilterBox = "PART_FilterBox";
+
+ #region Members
+
+ private FilterBox _filterBox;
+ private bool _allowFilter;
+
+ #endregion
+
+ #region AllowFilter
+ public static readonly DependencyProperty AllowFilterProperty = DependencyProperty.Register(
+ "AllowFilter",
+ typeof(bool),
+ typeof(CheckListBox),
+ new UIPropertyMetadata(true, AllowFilterChanged));
+
+ private static void AllowFilterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var selector = d as CheckListBox;
+ if (selector != null)
+ selector.AllowFilterChanged((bool)e.NewValue);
+ }
+
+ protected void AllowFilterChanged(bool value)
+ {
+ _allowFilter = value;
+ if (_filterBox != null)
+ {
+ SetFilter(value);
+ }
+ }
+
+ public bool AllowFilter
+ {
+ get
+ {
+ return (bool)GetValue(AllowFilterProperty);
+ }
+ set
+ {
+ SetValue(AllowFilterProperty, value);
+ }
+ }
+
+ private void SetFilter(bool value)
+ {
+ _filterBox.Clear(false);
+ _filterBox.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
+ }
+ #endregion //AllowFilter
+
#region Constructors
static CheckListBox()
@@ -34,5 +86,13 @@ public CheckListBox()
}
#endregion //Constructors
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ _filterBox = GetTemplateChild(PART_FilterBox) as FilterBox;
+ SetFilter(_allowFilter);
+ }
}
}
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckListBox/Themes/Aero2.NormalColor.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckListBox/Themes/Aero2.NormalColor.xaml
index 082b2d6c2..2f9bd2808 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckListBox/Themes/Aero2.NormalColor.xaml
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CheckListBox/Themes/Aero2.NormalColor.xaml
@@ -19,8 +19,12 @@
xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit">
-
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/FilterBox/Themes/Genreric.xaml b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/FilterBox/Themes/Genreric.xaml
new file mode 100644
index 000000000..740bf3f88
--- /dev/null
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/FilterBox/Themes/Genreric.xaml
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj
index 924509db3..daafcdc47 100644
--- a/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj
+++ b/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Xceed.Wpf.Toolkit.csproj
@@ -62,6 +62,14 @@
Designer
MSBuild:Compile
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
@@ -391,6 +399,7 @@
+
@@ -780,6 +789,9 @@
+
+
+