Hello, I'm moving my old app from windows forms to WPF and have encountered an error with underlined lines in this method. Could anyone help with that problems on DoEvents; SuspendLayout; ResumeLayout. My old method:
private void FindDataBases()
{
string tempDBName = comboBoxDataBases.Text;
// ((FrameworkElement) this).Cursor = Cursors.WaitCursor;
((FrameworkElement)this).Cursor = Cursors.Wait;
Application.DoEvents();
SuspendLayout();
DataSet dataBases = GetDatabases();
((FrameworkElement) this).Cursor = Cursors.Default;
Application.DoEvents();
if ((dataBases != null) && (dataBases.Tables[0].Rows.Count > 0))
{
comboBoxDataBases.DisplayMember = "DbName";
comboBoxDataBases.DataSource = dataBases.Tables[0];
if (comboBoxDataBases.FindStringExact(tempDBName) > 0)
{
comboBoxDataBases.SelectedIndex = comboBoxDataBases.FindStringExact(tempDBName);
}
}
else
{
comboBoxDataBases.DataSource = null;
}
ResumeLayout();
// this.comboBoxDataBases.Focus();
}