How can I move the dock title position to the center?

2 posts, 0 answers
  1. jin
    jin avatar
    5 posts
    Member since:
    May 2020

    Posted 03 Jul Link to this post

    Hello

    I want if toolwindow is floating mode, toolwindow title text to be in the middle.

     

     

                if (mapDockWindow.IsInFloatingMode)
                {

                        // What should I do?
                }

     

     

  2. Nadya
    Admin
    Nadya avatar
    399 posts

    Posted 07 Jul Link to this post

    Hello, Jin,

    In order to set TextAlignment property when a ToolWindow is floating I can suggest handling the FloatingWindowCreated event set the following properties as shown below:

    private void RadDock1_FloatingWindowCreated(object sender, FloatingWindowEventArgs e)
    {
        e.Window.FormElement.TitleBar.TitlePrimitive.StretchHorizontally = true;
        e.Window.FormElement.TitleBar.TitlePrimitive.TextAlignment = ContentAlignment.MiddleCenter;
    }

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

    Regards,
    Nadya
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top