Головна‎ > ‎C# WPF‎ > ‎

Випадаючий список

СomboBox -> Items -> ComboBoxItem



if (comboBox.Text == "123") {

}



public string[] mas { get; set; }

public MainWindow()
{
     InitializeComponent();

     mas = new string[]{ "domo", "komo", "Romo" };
     DataContext = this;
}


<ComboBox x:Name="comboBox" ItemsSource="{Binding mas}" HorizontalAlignment="Left" Margin="222,152,0,0" VerticalAlignment="Top" Width="120"/>