"Active Files" popup of TabbedMdiHost contains empty items only

Docking/MDI for WPF Forum

Posted 2 years 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 2 years ago]

Comments (2)

Answer - Posted 2 years 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 2 years 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 (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.