RadWindow.Confirm disappearing after clicking window behind

3 posts, 0 answers
  1. Wilfred
    Wilfred avatar
    4 posts
    Member since:
    Feb 2017

    Posted 16 Feb 2017 Link to this post


    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?


  2. Stefan Nenchev
    Stefan Nenchev avatar
    607 posts

    Posted 21 Feb 2017 Link to this post

    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.

    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 allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Wilfred
    Wilfred avatar
    4 posts
    Member since:
    Feb 2017

    Posted 21 Feb 2017 in reply to Stefan Nenchev Link to this post

    Hi Stefan,

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


Back to Top