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

RadWindow.Confirm disappearing after clicking window behind

4 Answers 88 Views
Window
This is a migrated thread and some comments may be shown as answers.
Wilfred
Top achievements
Rank 1
Wilfred asked on 16 Feb 2017, 08:39 PM

Hi,

I've implemented a RadWindow.Confirm() box with custom 'Ok' functionality and it works fine. However, I'm having a problem with the confirmation box disappearing behind the main application window when I click to any window behind the main application window. To be more clear, say I have windows A and B. B is the main application window, A is Outlook (nothing to do with my application). When I display a confirmation box in window B, it shows fine. Now, if I click on window A, without making a selection in the confirmation box, both window B and the confirmation box disappear. Good so far. Now, if I select window B from the task bar, window B is displayed, but the confirmation box is not. Window B is no longer responsive until I action the confirmation box which I have to ALT-TAB to get to.

Is this a bug or is there some configuration I can use to ensure it always stays on top of my application window?

Thanks

4 Answers, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 21 Feb 2017, 11:22 AM
Hi Wilfred,

Try setting the Owner of the RadWindow to be the Window that invoked it and when you activate it the Confirmation dialog should be brought into view as well:

private void OnOpenIcon2Clicked(object sender, RoutedEventArgs e)
        {
            var owner = (sender as UIElement).ParentOfType<Window>();
            RadWindow.Confirm(new DialogParameters
            {
                ContentStyle = Application.Current.Resources["Icon2AlertStyle"] as Style,
                Owner = owner,
                Content = "Dialog with Icon 2.",
                Header = "Dialog with Icon 2" });
        }

If you would like to keep the confirmation dialog always visible when switching between the application, you can create a custom RadWindow and set its IsTopmost property to true.

Regards,
Stefan Nenchev
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 you to write beautiful native mobile apps using a single shared C# codebase.
0
Wilfred
Top achievements
Rank 1
answered on 21 Feb 2017, 04:50 PM

Hi Stefan,

This worked. I had to rejig some stuff to ensure I had a proper parent, but it works now.

Thanks!

0
mkk09
Top achievements
Rank 1
answered on 20 Dec 2019, 11:09 AM

HI,

Is there any change that i can change Property of RadWindows to IsTopmost in business layer(C# code.)

Thanks.

0
Vladimir Stoyanov
Telerik team
answered on 20 Dec 2019, 03:43 PM

Hi,

I posted a reply in the other forum thread, where you have commented: Radwindow appearing behind child window. May I ask you to continue the discussion there in order to avoid duplicating replies? 

Thank you in advance for your understanding.

Regards,
Vladimir Stoyanov
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.
Tags
Window
Asked by
Wilfred
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Wilfred
Top achievements
Rank 1
mkk09
Top achievements
Rank 1
Vladimir Stoyanov
Telerik team
Share this question
or