Greetings,
While working with the RadDesktopAlert, I found an issue (possibly a bug) in the following scenario :
When RightToLeft property of RadDesktopAlert is set to True, ScreenPosition property doesn't work properly as it is supposed to.
For example, setting ScreenPosition to BottomRight and RightToLeft property to True, the popup box doesn't start at BottomRight position. I attached a gif file that illustrates the issue. Here is the code I used in the test project :
Imports Telerik.WinControlsImports Telerik.WinControls.UIPublic Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim alert1 As New RadDesktopAlert alert1.AutoCloseDelay = 3 alert1.AutoSize = True alert1.FadeAnimationFrames = 10 alert1.FadeAnimationSpeed = 3 alert1.Opacity = 0.85! alert1.PopupAnimationEasing = Telerik.WinControls.RadEasingType.OutExponential alert1.PopupAnimationFrames = 10 If CheckBox1.Checked = True Then alert1.RightToLeft = System.Windows.Forms.RightToLeft.Yes Else alert1.RightToLeft = System.Windows.Forms.RightToLeft.No End If alert1.ScreenPosition = Telerik.WinControls.UI.AlertScreenPosition.BottomRight alert1.ShowOptionsButton = False alert1.ShowPinButton = False alert1.CaptionText = "Test Project" alert1.ContentText = "This is a test" alert1.PlaySound = True alert1.Popup.AlertElement.Font = New Font("Tahoma", 10, FontStyle.Regular) alert1.Popup.AlertElement.ContentElement.Font = New Font("Tahoma", 10, FontStyle.Regular) alert1.Show() End SubEnd Class
Best Wishes,
Thanks for your attention.
To reproduce: change to 150% DPI scaling and try to show a RadDesktopAlert.
Workaround:
bool isFirstTime = true;
private void radButton1_Click(object sender, EventArgs e)
{
this.radDesktopAlert1.CaptionText = "New E-mail Notification";
this.radDesktopAlert1.ContentText = "Hello Jack, I am writing to inform you " +
"that the planning meeting scheduled for Wednesday has been postponed and" +
"it will eventually be rescheduled, possibly for the next Tuesday";
if (isFirstTime)
{
this.radDesktopAlert1.PopupAnimation = false;
this.radDesktopAlert1.Show();
this.radDesktopAlert1.Hide();
this.radDesktopAlert1.Show();
isFirstTime = false;
}
else
{
this.radDesktopAlert1.Show();
}
}
To reproduce: RadDesktopAlert oNotificacion = new RadDesktopAlert(this.components); oNotificacion.FixedSize = new System.Drawing.Size(350, 150); oNotificacion.CaptionText = "TITLE"; oNotificacion.ContentText = "Alert TEXT"; oNotificacion.ContentImage = this.pictureBox1.Image; oNotificacion.Show(); Workaround: oNotificacion.Popup.Image = this.pictureBox1.Image;
To reproduce:
- run the attached sample project
- click the 'show' button
- click the 'update text' button while the alert is shown. You will notice that the text is updated but the alert is now resized according to the new content.
Workaround: hide the alert and show it again in order to force recalculating the size.
Me.RadDesktopAlert1.PopupAnimation = False
Me.RadDesktopAlert1.Hide()
Me.RadDesktopAlert1.ContentText = Me.RadDesktopAlert1.ContentText & "Donec ornare, elit a lobortis luctus, mauris est interdum leo, eget malesuada ligula diam quis nunc."
Me.RadDesktopAlert1.Show()
Me.RadDesktopAlert1.PopupAnimation = True
There should be an option in RadDesktopAlert which allows it to size according to its content.
Workaround: create custom alert and popup and override the InitializeDropDownAnimation, refer to the attached project
One should be able to show a DesktopAlert at a custom position on the screen, defined by (x,y) coordinates. READY FOR TEST
FIX. RadDesktopAlert stays focused all the time, so using the Enter and the Backspace keys for example in an editor while the alert is shown causes the alert to close.