This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
src/GitHub.UI/Controls/AutoCompleteBox Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -740,6 +740,34 @@ public IAutoCompleteAdvisor Advisor
740740 set ;
741741 }
742742
743+ /// <summary>
744+ /// Identifies the
745+ /// <see cref="P:GitHub.UI.AutoCompleteBox.IAutoCompleteAdvisor" />
746+ /// dependency property.
747+ /// </summary>
748+ /// <value>The identifier for the
749+ /// <see cref="P:GitHub.UI.AutoCompleteBox.IAutoCompleteAdvisor" />
750+ /// dependency property.</value>
751+ public static readonly DependencyProperty AdvisorProperty =
752+ DependencyProperty . Register (
753+ "Advisor" ,
754+ typeof ( IAutoCompleteAdvisor ) ,
755+ typeof ( AutoCompleteBox ) ,
756+ new PropertyMetadata ( null , OnAdvisorPropertyChanged ) ) ;
757+
758+ /// <summary>
759+ /// AdvisorProperty property changed handler.
760+ /// </summary>
761+ /// <param name="d">AutoCompleteBox that changed its Advisor.</param>
762+ /// <param name="e">Event arguments.</param>
763+ private static void OnAdvisorPropertyChanged ( DependencyObject d , DependencyPropertyChangedEventArgs e )
764+ {
765+ var source = d as AutoCompleteBox ;
766+ if ( source == null ) return ;
767+
768+ source . Advisor = ( IAutoCompleteAdvisor ) e . NewValue ;
769+ }
770+
743771 /// <summary>
744772 /// Builds the visual tree for the
745773 /// <see cref="GitHub.UI.AutoCompleteBox" /> control
You can’t perform that action at this time.
0 commit comments