I did a quick example - but this should be easy - improve your basics!
Start with an empty WPF-Project
Replace the markup in Window1.xaml with this:
<Window x:Class="WpfApplication.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<ComboBox Height="23" Margin="46,30,112,0" Name="comboBox1" VerticalAlignment="Top" SelectionChanged="comboBox1_SelectionChanged" />
<TextBox Margin="46,125,112,114" Name="textBox1" />
</Grid>
</Window>
... and replace the code in Window1.xaml.cs with:
using System;
using System.Windows;
using System.Windows.Controls;
namespace WpfApplication
{
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
comboBox1.Items.Add("Yes");
comboBox1.Items.Add("No");
}
private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
textBox1.Text = (comboBox1.SelectedItem != null && comboBox1.SelectedItem.ToString() == "Yes") ?
"cleared" :
"not cleared";
}
}
}