Not a but? Redisplay of Window

5 posts, 0 answers
  1. Cuthahotha
    Cuthahotha avatar
    81 posts
    Member since:
    Sep 2008

    Posted 17 Sep 2008 Link to this post

    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.

    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

            }

    }

     

  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 18 Sep 2008 Link to this post

    Hi Steve,

    If you want to close and reopen RadWindow you should call the Hide method for closing. You should call the Close method only when you are done with this window again (window can be garbage collected).

    If you have other questions, we will be glad to help.

    Kind regards,
    Hristo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft banner
  4. Cuthahotha
    Cuthahotha avatar
    81 posts
    Member since:
    Sep 2008

    Posted 18 Sep 2008 Link to this post

    Thanks.
  5. Jaime
    Jaime avatar
    32 posts
    Member since:
    Sep 2008

    Posted 02 Dec 2008 Link to this post

    Hi, I have a case in which the .Close is needed.

    If the window is shown over a listbox with the Drag & Drop funcionality, the Drag & Drop funcionality will stop working arround the area where the window was.

    .Close() solves the problem, but it can't be shown again.

    Any Ideas...??

    Thanx in advance.
  6. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 03 Dec 2008 Link to this post

    Hi Jaime,

    This was problem with RadDragDropManager but it is fixed now. In the middle of december we will release service pack 2 which include this fix. If you need it earlier you need to open a support ticket and we will send you the hotfix.


    Best wishes,
    Hristo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
DevCraft banner