4 Answers, 1 is accepted
0
Mark
Top achievements
Rank 1
answered on 27 Jun 2015, 01:19 AM
A was a very informative answer to this straightforward question
0
Hello Nathalie,
Thank you for writing.
In order to center the text in the title-bar, you can use the following code snippet:
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Dess
Telerik
Thank you for writing.
In order to center the text in the title-bar, you can use the following code snippet:
public
Form1()
{
InitializeComponent();
this
.FormElement.TitleBar.TitlePrimitive.StretchHorizontally =
true
;
this
.FormElement.TitleBar.TitlePrimitive.TextAlignment = ContentAlignment.MiddleCenter;
}
I hope this information helps. Should you have further questions, I would be glad to help.
Dess
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Ashish
Top achievements
Rank 1
answered on 17 Apr 2019, 12:50 AM
The following code doesn't work for the RadForm's title-text alignment. I am using the Crystal theme.
this.FormElement.TitleBar.TitlePrimitive.StretchHorizontally = true;
this.FormElement.TitleBar.TitlePrimitive.TextAlignment = ContentAlignment.MiddleLeft;
this.FormElement.TitleBar.TitlePrimitive.StretchHorizontally = true;
this.FormElement.TitleBar.TitlePrimitive.TextAlignment = ContentAlignment.MiddleLeft;
0
Hello, Ashish,
Note that in Crystal theme, the title-bar is in right-to-left mode. That is why setting the TitlePrimitive.TextAlignment property to left doesn't have effect. Feel free to set it to ContentAlignment.MiddleRight in order to obtain the following result:
I hope this information helps.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Note that in Crystal theme, the title-bar is in right-to-left mode. That is why setting the TitlePrimitive.TextAlignment property to left doesn't have effect. Feel free to set it to ContentAlignment.MiddleRight in order to obtain the following result:
ThemeResolutionService.ApplicationThemeName =
"Crystal"
;
this
.FormElement.TitleBar.TitlePrimitive.StretchHorizontally =
true
;
this
.FormElement.TitleBar.TitlePrimitive.TextAlignment = ContentAlignment.MiddleRight;
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.