"Active Files" popup of TabbedMdiHost contains empty items only

Docking/MDI for WPF Forum

Posted 4 months ago by Sascha Nitschke
Version: 13.2.0592
Avatar

Hello Actipro,

my TabbedMdiContainer will be filled in code-behind with DocumentWindows. The menu "active files" will automatically be filled with items but only the image (ImageSource property) will be displayed. The filenames are missing here.

<docking:Workspace>
	<docking:TabbedMdiHost>
		<docking:TabbedMdiContainer Background="{DynamicResource {x:Static themes:AssetResourceKeys.WindowBackgroundNormalBrushKey}}" />
	</docking:TabbedMdiHost>
</docking:Workspace>
<docking:DocumentWindow x:Class="MyApp.SaveDocumentWindow"
                        ...
                        xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking" 
                        FileName="{Binding FileNameBase, Mode=OneTime}"
                        Description="{Binding FileNameBase, Mode=OneTime}"
                        Header="{Binding FileNameBase, Mode=OneTime}"
                        ImageSource="{StaticResource FileImageKey">
    <!-- Content -->
</docking:DocumentWindow>
private DocumentWindow CreateDocumentWindow(SingleChordsViewModel singleChords, bool isAlreadyOpened)
{
	DocumentWindow documentWindow;

	if (isAlreadyOpened)
	{
		documentWindow = _dockSite.DocumentWindows.Single(dw => dw.DataContext.Equals(singleChords));
	}
	else
	{
		documentWindow = new SaveDocumentWindow(_dockSite) { DataContext = singleChords };
	}
	
	// activate the DocumentWindow
	documentWindow.Activate();

	return documentWindow;
}

Have I missed anything? Or is there a workaround to fill/modify the popup items manually?

Regards
Sascha

[Modified 4 months ago]

Comments (2)

Answer - Posted 4 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Sascha,

Please try binding the DocumentWindow.Title property too and see if that resolves it.


Actipro Software Support

Posted 4 months ago by Sascha Nitschke
Avatar

THAT'S IT!

It works like a charm. I was looking for hours and just missed the DocumentWindow.Title property. Too easy! In the future I will ask you earlier ;),

Thank you very much. Actipro rulez!

The latest build of this product (v22.1.4) was released 27 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.