Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ComboBox.StaysOpenOnEdit Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets whether a ComboBox that is open and displays a drop-down control will remain open when a user clicks the TextBox.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public bool StaysOpenOnEdit { get; set; }

Property Value

Type: System.Boolean

true to keep the drop-down control open when the user clicks on the text area to start editing; otherwise, false. The default is false.

Identifier field

StaysOpenOnEditProperty

Metadata properties set to true

None

This example shows how to use the StaysOpenOnEdit property to create a combo box whose drop-down control stays open while the user enters information into the text box.

<ComboBox Name="cb" Margin="10,10,3,3" Width="200" Height="30" Grid.Column="0" Grid.Row="2"         
          ItemsSource="{StaticResource myCities}" Text="My Cities"
          IsEditable="true"  IsReadOnly="true" 
          IsDropDownOpen="True" StaysOpenOnEdit="True">
</ComboBox>

.NET Framework
Available since 3.0
Return to top
Show:
© 2018 Microsoft