How to visible the minimizeButton in Floating Window

3 posts, 0 answers
  1. Kim
    Kim avatar
    10 posts
    Member since:
    Oct 2019

    Posted 20 Jan Link to this post

    Hello.

    I want to know about how to visible the minimizeButton in 'Floating Window'.

    private void CtrlWorkbenchDoc_FloatingWindowCreated(object sender, FloatingWindowEventArgs e)
            {
                e.Window.FormElement.TitleBar.MinimizeButton.Visibility = ElementVisibility.Visible;
                e.Window.FormElement.TitleBar.CloseButton.Visibility = ElementVisibility.Collapsed;
                e.Window.ControlBox = true;
                e.Window.MaximizeBox = true;
                e.Window.MinimizeBox = true;
            }

    I wrote the above code but minimizeButton were not showed in 'Floating Window'.

    So, I want to know about another ways. 

    Thanks.

  2. Nadya
    Admin
    Nadya avatar
    391 posts

    Posted 22 Jan Link to this post

    Hello Kim,

    In order to show the minimize button in the FloatingWindow, please refer to the following code snippet:

    private void RadDock1_FloatingWindowCreated(object sender, Telerik.WinControls.UI.Docking.FloatingWindowEventArgs e)
    {
        FloatingWindow window = e.Window;
        window.FormElement.TitleBar.MinimizeButton.PropertyChanged += 
        this.MinimizeButton_PropertyChanged;
        window.MinimizeBox = true;
    }
    
    private void MinimizeButton_PropertyChanged(object sender, PropertyChangedEventArgs e)
    {
        if (e.PropertyName == "Visibility")
        {
            (sender as RadImageButtonElement).Visibility = ElementVisibility.Visible;
        }
    }

    I hope this helps. Should you have any other questions do not hesitate to ask.

    Regards,
    Nadya
    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.
  3. Kim
    Kim avatar
    10 posts
    Member since:
    Oct 2019

    Posted 22 Jan in reply to Nadya Link to this post

    Thanks for the comment!
Back to Top