I have created a simple demo of my problem (see below). Each time the Add button is clicked (top left) a document is added to the tabbed MDI container. The problem is that the Active Files dropdown button at the top right of the tabbed MDI container remains disabled as I add documents. Strangely, it becomes enabled when I close any of the documents, and remains enabled thereafter. Is this a bug, or am I doing something wrong?
Peter
Here is the XAML for the main window
<Window x:Class="ActiproDockingTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:apd="http://schemas.actiprosoftware.com/winfx/xaml/docking"
Title="MainWindow" Height="350" Width="525">
<DockPanel>
<Button DockPanel.Dock="Top" Content="Add" Click="Add_Click" HorizontalAlignment="Left"/>
<apd:DockSite>
<apd:Workspace>
<apd:TabbedMdiHost>
<apd:TabbedMdiContainer x:Name="mdiTab"/>
</apd:TabbedMdiHost>
</apd:Workspace>
</apd:DockSite>
</DockPanel>
</Window>
And here is the C#
using System.Windows;
using System.Windows.Controls;
using ActiproSoftware.Windows.Controls.Docking;
namespace ActiproDockingTest
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
int count = 0;
private void Add_Click(object sender, RoutedEventArgs e)
{
int i = ++count;
AddTab(new TextBlock() { Text = "This is document " + i }, "Document " + i);
}
private void AddTab(object tabContent, string title)
{
DockingWindow window = new DockingWindow();
window.Content = tabContent;
window.Title = title;
mdiTab.Items.Add(window);
window.Activate();
}
}
}