File tree Expand file tree Collapse file tree
ICSharpCode.AvalonEdit/CodeCompletion Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,6 +192,10 @@ protected override void OnMouseDoubleClick(MouseButtonEventArgs e)
192192 /// <summary>
193193 /// Gets/Sets the selected item.
194194 /// </summary>
195+ /// <remarks>
196+ /// The setter of this property does not scroll to the selected item.
197+ /// You might want to also call <see cref="ScrollIntoView"/>.
198+ /// </remarks>
195199 public ICompletionData SelectedItem {
196200 get {
197201 return ( listBox != null ? listBox . SelectedItem : null ) as ICompletionData ;
@@ -204,6 +208,17 @@ public ICompletionData SelectedItem {
204208 }
205209 }
206210
211+ /// <summary>
212+ /// Scrolls the specified item into view.
213+ /// </summary>
214+ public void ScrollIntoView ( ICompletionData item )
215+ {
216+ if ( listBox == null )
217+ ApplyTemplate ( ) ;
218+ if ( listBox != null )
219+ listBox . ScrollIntoView ( item ) ;
220+ }
221+
207222 /// <summary>
208223 /// Occurs when the SelectedItem property changes.
209224 /// </summary>
You can’t perform that action at this time.
0 commit comments