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

RadDesktopAlert

4 Answers 167 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jai
Top achievements
Rank 1
Jai asked on 10 Mar 2017, 07:15 AM

Telerik.Windows.Controls.RadDesktopAlert doesn't seem to have a global click event AND also does not have a PopUp property to achieve that. Currently It gets fired only When the user clicks the Content of the RadDesktopAlert . Requirement says  for setting where the user can click anywhere on the DesktopAlert and get fired the click event. I tried looking for Hwnd or Handle so I could manually register a click event in this manner, but even those properties don't exist.

I have a requirement where I need a global event, how to achieve global Click event ?

 

4 Answers, 1 is accepted

Sort by
0
Accepted
Kalin
Telerik team
answered on 14 Mar 2017, 09:17 AM
Hi Jai,

By design only the Content is click-able - this way the alert can be dragged from anywhere else. However you could achieve the desired, but you would loose the drag drop functionality. What you need to do is to hook to the Loaded event RadDesktopAlert and set the CaptionHeight property of the parent WindowBase to 0:

void alert_Loaded(object sender, RoutedEventArgs e)
{
    var parentWindow = (sender as RadDesktopAlert).ParentOfType<WindowBase>();
    if (parentWindow != null)
    {
        parentWindow.CaptionHeight = 0;
    }
}

Hope this helps.

Regards,
Kalin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Jai
Top achievements
Rank 1
answered on 14 Mar 2017, 12:00 PM

Thanks Kalin & Telerik Team

I am able to achieve my requirement from your above answer.

 

0
Jai
Top achievements
Rank 1
answered on 12 Apr 2017, 05:04 PM

Hi Kalin,

I need your quick suggestion on the below requirement for our reputed Client (Transportation domain).
We are using the RaddesktopAlert and have an immediate requirement to have some buttons  on RaddesktopAlert to perform some functionalities. I came across that RaddesktopAlert for Winforms supports this but don't have any idea how to achieve the same on RaddesktopAlert for WPF.

Any help on this one will be grateful :)

0
Nasko
Telerik team
answered on 13 Apr 2017, 07:40 AM
Hi,

Please, check the following forum thread that provides detailed information how to achieve the desired functionality - a sample project is also provided:
http://www.telerik.com/forums/wpf-raddesktopalert-with-buttons

Hope this helps.

Regards,
Nasko
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
General Discussions
Asked by
Jai
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Jai
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or