Using the Close Button in Backstage Mode

4 posts, 0 answers
  1. Bryan
    Bryan avatar
    4 posts
    Member since:
    Jul 2014

    Posted 08 Aug 2019 Link to this post

    I need your help.

    When Pageview's View Mode is set to Backstage mode, nothing happens when the Close button is clicked.

    Is this normal?
    If not, what should I do?

    The button's enable attribute is True and the Visible attribute is also Visibility.
    However, the Close Button does nothing.

    I would be grateful if you could let me know how it works.
    Expect a quick answer.

  2. Bryan
    Bryan avatar
    4 posts
    Member since:
    Jul 2014

    Posted 08 Aug 2019 in reply to Bryan Link to this post

    Dev Environment

    Telelik runtime version is v4.0.30319( 2015.2.728.40 )

    VS2013 (C# winform)

     

     

     

  3. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3713 posts

    Posted 12 Aug 2019 Link to this post

    Hello, Bryan,    

    According to the provided information, I suppose that you set the RadPageView.ViewElement.ShowItemCloseButton property to true. It determines whether the CloseButton will be displayed in each item (page), allowing that item to be closed. This property is relevant for the PageViewMode.Strip

    However, if you need to have if for the Backstage view as well, I have prepared a sample code snippet how to achieve it:

    public RadForm1()
    {
        InitializeComponent();
        this.radPageView1.ViewMode = PageViewMode.Backstage;
    }
     
    private void RadForm1_Load(object sender, EventArgs e)
    {
        this.radPageView1.ViewElement.ShowItemCloseButton = true;
     
        foreach (RadPageViewStripItem item in this.radPageView1.ViewElement.Items)
        {
            item.ButtonsPanel.CloseButton.Visibility = ElementVisibility.Visible;
            item.ButtonsPanel.CloseButton.Text = "X";
            item.ButtonsPanel.CloseButton.Click += CloseButton_Click;
        }
    }
     
    void CloseButton_Click(object sender, EventArgs e)
    {
        this.radPageView1.Pages.Remove(((RadPageViewButtonElement)sender).FindAncestor<RadPageViewStripItem>().Page);
    }

    I hope this information helps.
     
    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. Bryan
    Bryan avatar
    4 posts
    Member since:
    Jul 2014

    Posted 13 Aug 2019 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thank you very much for your help.

    It was very very helpful for me.

     

     

Back to Top