I know the floating windows come to the front when the application window is focused, but wondered if that was the desired functionality instead of having them in the taskbar.
10 Answers, 1 is accepted
Please refer to the attached sample project that demonstrates how to show the ToolWindow in the task bar. The code that allows this is located in the ShownInTaskBarWindowsGeneratedItemsFactory class.
Hope this helps.
Miroslav Nedyalkov
the Telerik team
![](/forums/images/avatarimages/default.gif)
![](/forums/images/avatarimages/default.gif)
System.InvalidOperationException was unhandled by user code
Message=Cannot set Visibility to Visible or call Show, ShowDialog, Close, or WindowInteropHelper.EnsureHandle while a Window is closing.
Source=PresentationFramework
StackTrace:
at System.Windows.Window.VerifyNotClosing()
at System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
at System.Windows.Window.Close()
at Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Close() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\WindowWithNoChromeWindowHost.cs:line 59
at Telerik.Windows.Controls.WindowBase.CloseHostImidiately() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 1224
at Telerik.Windows.Controls.WindowBase.OnCloseAnimationFinished() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 1066
at Telerik.Windows.Controls.WindowBase.PlayCloseAnimation() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 1012
at Telerik.Windows.Controls.WindowBase.TryClose(Boolean shouldCloseHost) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 652
at Telerik.Windows.Controls.WindowBase.TryClose() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 635
at Telerik.Windows.Controls.WindowBase.Close() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 566
at Telerik.Windows.Controls.RadSplitContainer.RefreshVisibility() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadSplitContainer.cs:line 497
at Telerik.Windows.Controls.RadPaneGroup.RefreshVisibility() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadPaneGroup.cs:line 1210
at Telerik.Windows.Controls.RadPaneGroup.OnItemsChanged(NotifyCollectionChangedEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadPaneGroup.cs:line 841
at System.Windows.Controls.ItemsControl.OnItemCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at MS.Internal.Controls.InnerItemCollectionView._RemoveAt(Int32 index, Int32 indexR, Object item)
at MS.Internal.Controls.InnerItemCollectionView.Remove(Object item)
at System.Windows.Controls.ItemCollection.Remove(Object removeItem)
at Telerik.Windows.Controls.RadPaneGroup.CloseSinglePane(RadPane pane) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadPaneGroup.cs:line 1237
at Telerik.Windows.Controls.RadPaneGroup.ClosePane(RadPane pane) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadPaneGroup.cs:line 620
at Telerik.Windows.Controls.RadDocking.OnPaneClose(RadPane pane) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 868
at Telerik.Windows.Controls.RadDocking.OnRadPaneClose(Object sender, StateChangeCommandEventArgs args) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 834
InnerException:
You are right. When it is closed from the task bar using the close button the reported exception is thrown. We will investigate the issue.Your Telerik points have been updated for the report.
Greetings,
Georgi
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
![](/forums/images/avatarimages/default.gif)
Here you can find PITS item for this issue. As we investigated it further we have found out that the problem comes from telerik:AnimationManager.AnimationSelector="{x:Null}". Removing it from the project should do the trick.
Hope this will help.
Kind regards,
Georgi
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
![](/forums/images/avatarimages/default.gif)
The approach of Miroslav Nedyalkov working great for me, thank you! Together with that I noticed interesting issue. When MainWindow is active and RadPane is minimized, I can see on taskbar that there are multilpe windows opened in my app. I can see it in small window preview and taskbar icon also shows this (look at RadPaneMinimized.png)
When I minimize RadPane AND MainWindow - taskbar icon stops showing multiple icon view and small window preview also shows just one window (look at bothWindowsMinimized.pdf)
How can I fix this?
Hello Eric,
I've tested this, but I couldn't reproduce this on my side. Can you share some code that shows how the RadDocking is setup?
Regards,
Martin Ivanov
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).
![](/forums/images/avatarimages/default.gif)
Hello Martin, here is my sample project
https://dropmefiles.com/eZXgN
You can easily download it by the link
Unfortunately I had some issue with attaching project here so I had to upload it to storage.
Hello Eric,
The forum allows only image files. The upload of archives or other formats is allowed only in via the private ticketing system.
I've downloaded the project and deleted the link from your post because it was containing a licensed version of the Telerik dlls. If you have access to the file storage service, can you please delete the file (or remove the dlls)?
About the reported behavior, I was able to reproduce it with the attached project. This is expected in WPF in the situation when you have a Window and child Window instances with their Owner property set to the main Window. This is the case with the ToolWindow control in RadDocking. You can recreate the same behavior also with the following code:
public class MainWindow
{
// some other code here
public void ShowWindow()
{
var window = new Window();
window.Owner = this;
window.Show();
}
}
Regards,
Martin Ivanov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.