I need some assistance in having ShowDialog appear more than once as in this case 2x without getting the error as follows: Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle after a Window has closed. Any help is appreciated.
namespace Application
{
public partial class App : Application
{
int count = 0;
int logonAgreements = 2;
while (count < logonAgreements)
{
DialogResult = lf2.ShowDialog(logonAgreements, count + 1);
if (DialogResult == true)
{
count++;
}
else if (DialogResult == false)
{
Close();
}
}
public DialogResult ShowDialog(int numCustomer, int currentCustomerIndex)
{
this.labelPanelHeader.Content = "Log-On Agreement" + " (" + currentCustomerIndex + " of " + numCustomer + ")";
return this.ShowDialog();
}
}
}