private void SearchForm_Load(object sender, EventArgs e) { //Loads the form and changes the visibility of the code. TransactionIDTextBox.Focus(); SearchListBoxPanel.Visible = false; ClearButton.Visible = false; Searchpanel.Visible = true; ExitButton.Visible = true; }
private void ClearButton_Click(object sender, EventArgs e) { //Code to chnage the visisbility of the code. ExitButton.Focus(); Searchpanel.Visible = true; TransactionDateTextBox.Clear(); TransactionIDTextBox.Clear(); SearchDetailsListBox.Items.Clear(); SearchListBoxPanel.Visible = false; }
private void TextBox_KeyDown(object sender, KeyEventArgs e) { if (e.Key != Key.Enter) { return; } var exp = TransactionIDTextBox.GetBindingExpression(TextBox.TextProperty); exp?.UpdateSource(); }