Getting an error when trying to display a radwindow a second time.
works fine on the first time I call it. After it closes, and I try to re-execute the code to display it, i get the following error in my generic top level silverlight error handler.
"Exception has been thrown by the target of an invocation."
I'm sure its me, but not sure what I'm missing.
Heres the code that opens the window.
works fine on the first time I call it. After it closes, and I try to re-execute the code to display it, i get the following error in my generic top level silverlight error handler.
"Exception has been thrown by the target of an invocation."
I'm sure its me, but not sure what I'm missing.
Heres the code that opens the window.
private void cmdAdd_Click(object sender, RoutedEventArgs e)
{
frmNew.Closed +=
new EventHandler<WindowClosedEventArgs>(OnWindowClosed);
txtNew.Text =
"[Enter Item ]";
frmNew.Show();
}
And teh code that executes on a button push from inside the form.
private void OnBtnOkClicked(object sender, RoutedEventArgs e)
{
string newName = txtNewName.Text;
frmNewUserStory.Close();
if (newName != "")
{
//Doo a bunch of stuff
}
}