Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Window > Modal Dialog appearing behind parent RadWindow

Not answered Modal Dialog appearing behind parent RadWindow

Feed from this thread
  • Jérôme avatar

    Posted on Mar 2, 2011 (permalink)

    Hello When I Build my rad windows on main radwindow when I click a lot of time on the button for open them i have ModalDialog which appearing behing the parent Window.

    I have tried to call the ShowDialog of radwindows with Dispatcher.BeginInvoke but it doesn't works for me....

    Someone have an idea for help me??

    Reply

  • Jérôme avatar

    Posted on Mar 2, 2011 (permalink)

    Hello I  specify the owner of the RadWindows, but it also doesn't work. :(

    Reply

  • Taufik Hidayat avatar

    Posted on Mar 4, 2011 (permalink)

    Hi guy,

    I'm facing the same problem here.
    And I don't know what's exactly problem.
    This question is for the Telerik team :)

    Regards.

    Reply

  • Veda avatar

    Posted on May 24, 2011 (permalink)

    Hi,
    I have a requirement where i have to close the dialog window on button click. I'm loading the user control on dialog window and button lies in user control. So in user control i will not have the dialog window object. how can i close the dialog window ?


    TIA

    Regards,
    Veda

    Reply

  • Miroslav Nedyalkov Miroslav Nedyalkov admin's avatar

    Posted on May 26, 2011 (permalink)

    Hello,

    Veda, you could set the Command property of the button to telerik:WindowCommands.Close - this will tell the window to close when the button is clicked.

    Jérôme and Taufik, we are aware of this problem - does it happen when you click the button very fast? If this is the case you could track the progress of the issue using PITS item ID 2923. We are planning to target such issues for Q2 2011.

    Regards,
    Miroslav Nedyalkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Jérôme avatar

    Posted on May 26, 2011 (permalink)

    Yes it happen when we click on the button very fast.
    I have fix the problem with doesn't use the radwindows in this context. :)

    Thanks for the fix.

    Reply

  • Hrushikesh avatar

    Posted on Sep 29, 2011 (permalink)

    This is not resolved in th latest one also. Still going behind the parent window.

    Reply

  • Miroslav Nedyalkov Miroslav Nedyalkov admin's avatar

    Posted on Sep 30, 2011 (permalink)

    Hi Hrushikesh,

    We did a lot of changes and fixed to the RadWindow control and currently we are not able to reproduce this problem. Could you please give us some more details about the scenario you have and if you could send us a sample project that reproduces the issue this would be of great help?

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Raphael avatar

    Posted on Oct 10, 2011 (permalink)

    Hi,

    I have the same problem today with v2011.2.920.1040
    I have a button into my first radwindow which opens (through a delegatecommand) another radwindow.
    If I click several times on the button, child windows open behind my first parent window.

    Do you plan to correct this problem ?

    Raphael


    Reply

  • Boyan Boyan admin's avatar

    Posted on Oct 13, 2011 (permalink)

    Hello Raphael,

    We tested the issue but with no success. I have attached the project I tested with. Could you please take a look and tell me if you are doing something different or you can send me a sample code/project where We can reproduce the bad behavior.

    Greetings,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Raphael avatar

    Posted on Oct 14, 2011 (permalink)

    Hi Boyan,

    Indeed, in your sample it is not reproductible but with a few modifications it is :
    * First, resize your MyWindow and the button into your xaml :

    <telerik:RadWindow x:Class="WindowsOpenedWithCommand.MyWindow"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Width="300" Height="300"
        xmlns:local="clr-namespace:WindowsOpenedWithCommand" WindowStartupLocation="CenterScreen">
         
        <Grid x:Name="LayoutRoot" Background="White">
            <telerik:RadButton x:Name="buton1"  Height="50" Width="100" Content="Open modal window" Command="local:MyCommand.OpenWindow"/>
        </Grid>
    </telerik:RadWindow>

    * Then, Add a little sleep before opening window to simulate a little normal treatment we can have on a real application (myWindow.xaml.cs)

    public partial class MyWindow : RadWindow
        {
            public MyWindow()
            {
     
                CommandManager.SetCommandBindings(this, new CommandBindingCollection()
                {
                    new CommandBinding(MyCommand.OpenWindow, Command_Executed, Command_CanExecute),
                });
                InitializeComponent();
            }
     
            private void Command_Executed(object sender, ExecutedRoutedEventArgs e)
            {
                System.Threading.Thread.Sleep(200);
                new RadWindow { Height = 200, Width = 200, WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen }.ShowDialog();
     
            }
     
            private void Command_CanExecute(object sender, CanExecuteRoutedEventArgs e)
            {
                e.CanExecute = true;
            }
     
     
            public static class MyCommand
            {
                public static ICommand OpenWindow { get; private set; }
     
                static MyCommand()
                {
                    OpenWindow = new RoutedUICommand("My Action", "OpenWindow", typeof(MyCommand));
                }
            }
     
        }


    * Finally, to reproduce you have to click fast (as a double click) one time into the button and the second time near of the button into the background of the window : the second window opens behind the first (picture is the result)


    Raphael.






    Reply

  • Boyan Boyan admin's avatar

    Posted on Oct 18, 2011 (permalink)

    Hello Raphael,

    Could you please try to show the window in a Dispatcher. Use the following code:
    Dispatcher.BeginInvoke(() => win.ShowDialog());
    Showing the RadWindow asynchronously should fix the problem for you.

    Best wishes,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Raphael avatar

    Posted on Oct 18, 2011 (permalink)

    Hi,

    I tried your code without success
    System.Threading.Thread.Sleep(200);
    RadWindow win = new RadWindow { Height = 200, Width = 200, WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen };
    Dispatcher.BeginInvoke(() => win.ShowDialog());

    The second window still appears behind the first.
     You could test it before telling me to test it as I provided to you the code to reproduce and the scenario...



    Reply

  • Boyan Boyan admin's avatar

    Posted on Oct 21, 2011 (permalink)

    Hello Raphael,

    I am sorry for your frustration. I tested the proposed solution and it was working fine at my side. Maybe the problem have been that I have not clicked fast enough or you are testing it in a real scenario that differs in some way from simply sleeping the thread. We already have bug logged for this issue. You can follow its progress here. I will increase the priority of the item, however I doubt that it will make it for Q3. And more realistic target is the service pack.

    As a workaround you can also try to perform the operations you are doing in Dispatcher. This worked  on my machine with Thread.Sleep(200).

    Please, excuse us again for the inconvenience.  Don't hesitate to contact us if you have other questions.


    Best wishes,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Raphael avatar

    Posted on Oct 21, 2011 (permalink)

    Boyan,

    The scenario to reproduce was your sample project with the modifications I described previously. The capture i provided proved it was your sample and not a different project...
    I voted for the issue but it was created more than 6 months ago and not scheduled so I think i am going to be patient...
    For the workaround with the Dispatcher, in my real project, the operations are asynchronous wcf treatments so...

    Thanks for answers

    Raph

    Reply

  • Boyan Boyan admin's avatar

    Posted on Oct 26, 2011 (permalink)

    Hi Raphael,

    Could you please try another possible workaround. Try setting the following line to the ModalWindow:
    win1.IsTopmost = true;
    This worked on the sample project, hopefully is will work on your project as well.

    Greetings,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Raphael avatar

    Posted on Oct 27, 2011 (permalink)

    Hi Boyan,

    Thank you for your reply. This new property which did not exists into the version 2010.3 but which exists into the version 2011.2 works.
    The second radwindow does not appear behind the first anymore even if I click 10 times fastly.

    Thank you for this workaround, you can indicate it into the issue 2923...

    Raphael

    Reply

  • Boyan Boyan admin's avatar

    Posted on Oct 27, 2011 (permalink)

    Hello Raphael,

    I am glad this worked for you. I have updated the Pits item so this can help other users as well and also sorry again for the caused inconvenience. We will try to fix this in our code as well most probably for the service pack of Q3.

    Regards,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Nathaniel avatar

    Posted on Oct 28, 2011 (permalink)

    What would we use for the 3 pre-defined radwindows (Alert, Confirm, Prompt).  I have a Confirm which is popping up behind one of my other Radwindows.

    Reply

  • Nathaniel avatar

    Posted on Oct 28, 2011 (permalink)

    Also the spellchecker control pops up behind child windows.

    Reply

  • Boyan Boyan admin's avatar

    Posted on Nov 2, 2011 (permalink)

    Hi Nathaniel,

    You can set the IsTopMost property to predefined dialogs from the style. Declare WindowStyle in the DialogParameters and set the property there.

    All the best,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Posted on Nov 2, 2011 (permalink)

    @Boyan: That does not work for the spell checker. IsTopMost works well in some scenarios, definitely for straight-up alert and confirm dialogs. But for RadSpellChecker it does not since there is no way to set the style of the dialog windows. See this thread:
    http://www.telerik.com/community/forums/silverlight/spellchecker/setting-the-style-of-the-dialog-windows.aspx

    Reply

  • Boyan Boyan admin's avatar

    Posted on Nov 7, 2011 (permalink)

    Hi Hwsoderlund,

    You are right that this doesn't work for the RadSpellChecker in the moment, but we will fix this by adding the property in the constructor or  will expose the style as they said in the other theme.

    Greetings,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Edvin avatar

    Posted on Nov 22, 2011 (permalink)

    I just switch to 2011_3_1116 (before I have 2010.3) and I run into this problem.  It is very annoying and in complex application it is almost impossible to solve with IsTopMost, because you don't know exactly which window will be topmost. And setting IsTopMost to all doesn't works, works only if I set IsTopMost to the window where I found a problem.

     

    Typically this happens when error or confirm dialog is shown as http response from server. And because it is shown at the back, user have no clue what happens. I have made quite a lot of changes with your last version, but now I'm not able to use it. Can you please give some info when this will be corrected or I will have to switch to old version.

     

    best regards
    edvin

    Reply

  • Ivo Ivo admin's avatar

    Posted on Nov 28, 2011 (permalink)

    Hi Edvin,

    We are currently investigating this issue. As soon as we finish I will write here to inform you what we found.

    Kind regards,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Jorn Master avatar

    Posted on Dec 6, 2011 (permalink)

    I have a RadWindow with a button that opens a FileDialog and the following code(behind) reproduces this behaviour:

    Dim _dlg As New OpenFileDialog With {.Filter = "All files (*.*)|*.*", .Multiselect = True}
     
    If _dlg.ShowDialog = True Then
       Dim _win As New custom_upload_window(_dlg.Files, Me.ParentOfType(Of RadWindow))
       _win.ShowDialog()
    End If

     

    Click the button and the FileDialog opens, select some files and press OK, custom_upload_window opens behind it's parent window.
    I have worked around this with the IsTopmost property, but it's still an issue in some cases I guess.

    (custom_upload_window set Owner property (second parameter))

    Reply

  • Jorn Master avatar

    Posted on Dec 6, 2011 (permalink)

    /* deleted - got an internal server error when posting */

    Reply

  • Jorn Master avatar

    Posted on Dec 6, 2011 (permalink)

    /* deleted - got an internal server error when posting */

    Reply

  • Ivo Ivo admin's avatar

    Posted on Dec 9, 2011 (permalink)

    Hi,

    We will do our best a fix for this issue to be included for one of the upcoming releases.

    Kind regards,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Posted on Apr 20, 2012 (permalink)

    I get the same issue with the scheduleview control.

    if you click on a portion of my program a new window opens with the schedule view. I find ocasional the dialog prompts such as do i want to delete a series or individual appointment get pushed behind the window that contains my schedule view. It sounds like you need to insure that all your dialog prompt windows are set to topmost as i see now way for me to set that.

    Reply

  • Boyan Boyan admin's avatar

    Posted on Apr 25, 2012 (permalink)

    Hi Jacob,

    This is because of the fact that RadScheduleView is taking the focus after the window has been shown. This can be easily fixed by using the IsTopmost property of RadWindow and set it to true.However we don't want to include such fix in the code as it may result in some other problems. We will investigate if we can change the sequence events are invoked so this scenario is working properly. I have logged it in our PITS where you can follow the item's progress.

    For now as a workaround you can easily set the IsTopMost property to these modal windows by using ScheduleViewDialogFactory. I have attached a simple project how this can be achieved. This should solve your problems.

    Kind regards,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Window > Modal Dialog appearing behind parent RadWindow
Related resources for "Modal Dialog appearing behind parent RadWindow"

Silverlight Window Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]