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

RadWindow Closing problem

5 Answers 242 Views
Window
This is a migrated thread and some comments may be shown as answers.
Shaun
Top achievements
Rank 1
Shaun asked on 15 Apr 2016, 10:14 AM

I am not sure whether this should be classed as a bug or not.

When using the VisualStudio2013 Dark Theme and closing a RadWindow it "Shrinks" and fades away. However the window is still active whilst it is shrinking.

In my use case I have a RadWindow as a popup with a RadListBox containing several items. On the RadListBox's SelectionChanged Event some work is carried out and I call Close() on the RadWindow. This happens very quickly and if a user double clicks a RadListBoxItem rather than single clicking the RadWindow it is already closing and the RadListBoxItem below the selected item moves under the curser as the RadWindow "Shrinks". This item then fires the same event.

As a work around I am going to set IsEnabled=false on all my RadWindows before calling Close() as this fixes the issue.

I just wondered whether this could effect other peoples projects in different ways, and whether the IsEnabled=false should be set somewhere else within the Telerik code as an automated process.

Regards,

Shaun

 

 

5 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 18 Apr 2016, 08:47 AM
Hi Shaun,

I tested the explained scenario with 2016.1 217 version of the controls, however I couldn't observe that behavior. Can you please check the attached sample project and let me know whether you could reproduce the issue - if so I would like to ask you share a video demonstrating the exact steps to reproduce?

I'm looking forward to hearing from you.

Regards,
Kalin
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Shaun
Top achievements
Rank 1
answered on 18 Apr 2016, 09:20 AM

Hi Kalin,

Yes it is possible to reproduce with your example. Modify the ListBox_SelectionChanged function like below;

private void ListBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            ListBoxItem lbi = (ListBoxItem) e.AddedItems[0];
            Debug.WriteLine(lbi.Content);
            this.Close();
        }

 

Then select item 3. If you click again (slightly slower than double click without moving your curser) you can select item 2 as the RadWindow is closing. Your debug output should now show this.

 

Hope this helps,

 

shaun

0
Shaun
Top achievements
Rank 1
answered on 18 Apr 2016, 09:23 AM

An extra note. Just click like made on item 3 until the window has completely disappeared and you will get it changing several times. I managed to get the following output doing this;

Item 3
Item 2
Item 3
Item 2

 

Regards,

Shaun

0
Accepted
Kalin
Telerik team
answered on 18 Apr 2016, 10:29 AM
Hi Shaun,

This is expected - while the closing animation is playing you would be able to click somewhere on the Window. So as a solution you could disable the ListBox or you could show BusyIndicator (it will disable the content and show busy message) before calling the Close method of RadWindow.

Hope this helps

Regards,
Kalin
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Shaun
Top achievements
Rank 1
answered on 18 Apr 2016, 10:35 AM

Thanks for looking into this Kalin. I will stick with disabling the window before closing it for now. I just wanted to check that it was expected or not.

 

Regards,

 

Shaun

Tags
Window
Asked by
Shaun
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Shaun
Top achievements
Rank 1
Share this question
or