How can right-to-left to form his form in this way?
9 Answers, 1 is accepted
The following snippet shows how you can set the text alignment:
this
.FormElement.TitleBar.TitlePrimitive.Alignment = ContentAlignment.MiddleRight;
Let me know if I can assist you further.
Regards,
Dimitar
Telerik by Progress
This code did not affect alignment.
How could the form right to left, but in this case I have shown in the image
Thank you for writing back.
With the code from my previous post, the form looks like in your image. So I am a bit confused about what is the exact desired look. Could you please elaborate?
In addition, the following article shows how you can enable the right to left-to-right layout: Right-To-Left Support.
I am looking forward to your reply.
Regards,
Dimitar
Telerik by Progress
I want to be the property of form right to left,But buttons close, maximize, minimize form left to right are.
How to make buttons close, maximize, minimize, or change the form of property right and right to left unchanged?
You can set the RightToLeft property of the buttons panel only:
this
.FormElement.TitleBar.SystemButtons.RightToLeft =
true
;
I hope this will be useful.
Regards,
Dimitar
Telerik by Progress
Thank written code.
Just another problem that,caption form must be right
I have used these codes:
this.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.FormElement.TitleBar.RightToLeft = false;
Thank you for writing back.
You can use the code from my first post. I have recorded a small video to show you how this works on my side. Please note that I still do not understand what is the layout you want to achieve, so if you need further assistance please provide a detailed description of your requirement.
I hope this will be useful.
Regards,
Dimitar
Telerik by Progress
This code has no effect on my form :
this.FormElement.TitleBar.TitlePrimitive.Alignment = ContentAlignment.MiddleRight;
I am running version of RadControls for WinForms Q1 2012
Is it possible in this version of the code not work?
Thank you for writing back.
With this version, you can set the position by dynamically adjusting the Margin of the title. For example, you can use the SizeChanged event:
private
void
RadForm1_SizeChanged(
object
sender, EventArgs e)
{
var buttonsWidht =
this
.FormElement.TitleBar.SystemButtons.Size.Width;
var width =
this
.FormElement.TitleBar.Size.Width;
var titleWidth = TextRenderer.MeasureText(
this
.Text,
this
.Font).Width +
this
.FormElement.TitleBar.IconPrimitive.Size.Width +15;
this
.FormElement.TitleBar.TitlePrimitive.Margin =
new
Padding(width - (buttonsWidht + titleWidth), 0, 0, 0);
}
I hope this helps.
Regards,
Dimitar
Telerik by Progress