private void ValOKBut_Click(object sender, EventArgs e)
{
int totitem = ValLstBox.Items.Count;
///Then close the dialogue////
DGValuesForm.ActiveForm.Close();
//release resources
// DGValuesForm.ActiveForm.Dispose();//if disposed here we can get listbox values in DataPanel.xaml.cs
}