This is a migrated thread and some comments may be shown as answers.

closing form with the last radpageviewpage close button

1 Answer 53 Views
PageView
This is a migrated thread and some comments may be shown as answers.
ricric
Top achievements
Rank 1
ricric asked on 30 Apr 2011, 11:53 AM
hi..
i have radpageviewpage with the close button element, i want when i close the last radpageviewpage, the form will close automatically too, how can i do it?
thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 01 May 2011, 11:07 AM
Hello,

A very easy way would be to just register for the PageRemoved event and if there are no other pages just close the form.

private void radPageView1_PageRemoved(object sender, Telerik.WinControls.UI.RadPageViewEventArgs e)
{
    if (radPageView1.Pages.Count == 0)
    {
        this.Close();
    }
}

For more help and info on the PageView please take a look at this help article

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga

Telerik WinForms MVP
Tags
PageView
Asked by
ricric
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Share this question
or