Steps to reproduce
- Click button in ribbon to add DocumentWindow to container
- Close DocumentWindow using cross button on right top sid
- Container disapears and adding new DocumentWindow using button from first step does not work
<ribbon:RibbonWindow
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
xmlns:Themes="clr-namespace:ActiproSoftware.Windows.Themes;assembly=ActiproSoftware.Shared.Wpf30"
xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=PresentationFramework"
xmlns:Media="clr-namespace:System.Windows.Media;assembly=PresentationCore"
xmlns:Drawing="clr-namespace:System.Drawing;assembly=System.Drawing"
x:Class="WpfApplication8.MainWindow"
ApplicationName="AAA" WindowState="Maximized"
Themes:ThemeManager.Theme="Office2007Black"
>
<DockPanel LastChildFill="True" x:Name="MainDockPanel" >
<ribbon:Ribbon x:Name="ribbon" DockPanel.Dock="Top" >
<ribbon:Ribbon.Tabs>
<ribbon:Tab Label="General">
<ribbon:Group Label="Files">
<ribbon:Button Click="ButtonClick" Label="Load plugin"/>
</ribbon:Group>
</ribbon:Tab>
</ribbon:Ribbon.Tabs>
</ribbon:Ribbon>
<docking:DockSite x:Name="dockSite" >
<docking:Workspace>
<docking:TabbedMdiHost x:Name="tabbedMdiHost">
<docking:TabbedMdiContainer x:Name="tabbedMdiContainer" Background="Gold">
</docking:TabbedMdiContainer>
</docking:TabbedMdiHost>
</docking:Workspace>
</docking:DockSite>
</DockPanel>
</ribbon:RibbonWindow>
using System.Windows;
using ActiproSoftware.Windows.Controls.Docking;
namespace WpfApplication8
{
public partial class MainWindow
{
public void ButtonClick(object sender, RoutedEventArgs e)
{
DocumentWindow window1 = new DocumentWindow {Title = "Title1"};
tabbedMdiContainer.Items.Add(window1);
}
}
}