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

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

1 Answer 96 Views
Dock
This is a migrated thread and some comments may be shown as answers.
jin
Top achievements
Rank 1
Veteran
jin asked on 03 Jul 2020, 05:30 AM

Hello

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

 

 

            if (mapDockWindow.IsInFloatingMode)
            {

                    // What should I do?
            }

 

 

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 07 Jul 2020, 10:28 AM

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.
Tags
Dock
Asked by
jin
Top achievements
Rank 1
Veteran
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or