Answer the question
In order to leave comments, you need to log in
How to fix System.NullReferenceException error?
There are 2 wpf components on the form
ComboBox Name = "ShowThisMessageToComboBox" SelectionChanged = "ShowThisMessageToComboBox_Changed"
TextBox Name = "ProgrammIdsTextBox"
private void ShowThisMessageToComboBox_Changed(object sender, SelectionChangedEventArgs e)
{
if (ShowThisMessageToComboBox.SelectedIndex == 0) ProgrammIdsTextBox.Visibility = Visibility.Hidden; // Ошибка на этой строке
if (ShowThisMessageToComboBox.SelectedIndex == 1) ProgrammIdsTextBox.Visibility = Visibility.Visible;
}
Answer the question
In order to leave comments, you need to log in
Check if you have a TextBox in a container? Then his program will not see.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question