3 Answers, 1 is accepted
0
Hi ,
Thank you for writing.
The text element responsible for the caption is located in a panel which is stretched horizontally. This way the caption starts always from the left and the buttons are located on the other end to the right.
You can access the caption element and adjust its location by setting its PositionOffset property:
I hope this helps. Should you have further questions please do not hesitate to write back.
Regards,
Hristo Merdjanov
Telerik
Thank you for writing.
The text element responsible for the caption is located in a panel which is stretched horizontally. This way the caption starts always from the left and the buttons are located on the other end to the right.
You can access the caption element and adjust its location by setting its PositionOffset property:
public
Form1()
{
InitializeComponent();
this
.radDesktopAlert1.Popup.PopupOpened += Popup_PopupOpened;
}
private
void
Popup_PopupOpened(
object
sender, EventArgs args)
{
AlertWindowTextAndSystemButtonsElement captionParent =
this
.radDesktopAlert1.Popup.AlertElement.CaptionElement.TextAndButtonsElement;
TextPrimitive captionElement = captionParent.TextElement;
int
offset = captionParent.Size.Width / 2 - captionElement.Size.Width / 2;
captionElement.PositionOffset =
new
SizeF(offset, 0);
}
I hope this helps. Should you have further questions please do not hesitate to write back.
Regards,
Hristo Merdjanov
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms. For more information check out this blog post and share your thoughts.
0
Bekir
Top achievements
Rank 1
Iron
answered on 04 Jul 2016, 10:19 PM
Hi Hristo,
Thank you very much for your response.
This is what I need.
In addition to that you showed, I add this code for ContentText alignment;
Thank you again.
Regards...
AlertWindowContentElement contentElmn =
this
.DesktopShortAlert.Popup.AlertElement.ContentElement;
contentElmn.TextAlignment = ContentAlignment.MiddleCenter;
0
Hi ,
Thank you for writing back.
The snippet you provided handles the text alignment of the content and I am glad it fits your local setup.
Should you have further questions please do not hesitate to write back.
Regards,
Hristo Merdjanov
Telerik
Thank you for writing back.
The snippet you provided handles the text alignment of the content and I am glad it fits your local setup.
Should you have further questions please do not hesitate to write back.
Regards,
Hristo Merdjanov
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.