File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 22using System . ComponentModel ;
33using System . Windows ;
44using System . Windows . Controls ;
5+ using System . Windows . Controls . Primitives ;
56using System . Windows . Data ;
67using System . Windows . Input ;
8+ using System . Windows . Threading ;
79using HandyControl . Data ;
810using HandyControl . Interactivity ;
911
@@ -102,6 +104,15 @@ public CheckComboBox()
102104 {
103105 AddHandler ( Controls . Tag . ClosedEvent , new RoutedEventHandler ( Tags_OnClosed ) ) ;
104106 CommandBindings . Add ( new CommandBinding ( ControlCommands . Clear , ( s , e ) => SelectedItems . Clear ( ) ) ) ;
107+ ItemContainerGenerator . StatusChanged += ItemContainerGenerator_StatusChanged ;
108+ }
109+
110+ private void ItemContainerGenerator_StatusChanged ( object sender , EventArgs e )
111+ {
112+ if ( ItemContainerGenerator . Status == GeneratorStatus . ContainersGenerated )
113+ {
114+ UpdateTags ( ) ;
115+ }
105116 }
106117
107118 public override void OnApplyTemplate ( )
@@ -121,6 +132,12 @@ public override void OnApplyTemplate()
121132 _selectAllItem . Selected += SelectAllItem_Selected ;
122133 _selectAllItem . Unselected += SelectAllItem_Unselected ;
123134 }
135+
136+ Dispatcher . BeginInvoke ( new Action ( ( ) =>
137+ {
138+ IsDropDownOpen = true ;
139+ IsDropDownOpen = false ;
140+ } ) , DispatcherPriority . DataBind ) ;
124141 }
125142
126143 public bool VerifyData ( )
You can’t perform that action at this time.
0 commit comments