Community, I'm not 100% sure if this pertains to the TabbedGroupedMDIManager or the DockingManager controls, but I have the need to change the font for the context menu that appears, as shown in the attached image.
Any one have any thoughts on where I can do this?
|
dockingManager1.DockContextMenu += DockingManager1_DockContextMenu;
private void DockingManager1_DockContextMenu(object sender, DockContextMenuEventArgs arg) {
foreach (BarItem item in arg.ContextMenu.ParentBarItem.Items)
{
item.CustomTextFont = new Font("Broadway", 12);
}
} |
|
this.tabbedMDIManager.TabControlAdded += new TabbedMDITabControlEventHandler(tabbedMDIManager_TabControlAdded);
private void tabbedMDIManager_TabControlAdded(object sender, TabbedMDITabControlEventArgs args) {
foreach (BarItem item in tabbedMDIManager.ContextMenuItem.Items)
{
item.CustomTextFont = new Font("Cooper Black", 12);
}
} |
Unfortunately neither of those blocks of code do anything for my project.
Additionally, when right-clicking on the caption of a dock, the 'dockcontextmenu' event fires and an exception is thrown:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
My original ask was for the context menu when windows are docked as tabs. I'm using the TabbedGroupedMDIManager, but the provided code is for a control of type TabbedMDIManager. I do know that these controls are similar, so I tried the code provided within the TabControlAdded event for the TabbedGroupedMDIManager, but that didn't work either.
However, the provided example IS doing what I would expect. So I'm going to have to revisit my code and compare.
Thank you.
|
Tabbed.TabControlAdded += TabbedGroupedMDIManager1_TabControlAdded;
private void TabbedGroupedMDIManager1_TabControlAdded(object sender, TabbedMDITabControlEventArgs args) {
foreach (BarItem item in Tabbed.ContextMenuItem.Items)
{
item.CustomTextFont = new Font("Broadway", 12);
}
} |
I just noticed that the provided example is working as expected, because the TabbedGroupedMDIManager form is distinct from the DockingManager form.
In my project, I'm using both controls simultaneously on the same form.
Can you provide an example using both controls in the same form with the original requirements of changing the font?
Thanks.
Support, this is not working with the Office2019Colorful theme and appears to be a bug. See attached screenshots. I used your most recent provided example and just added the theme to the components. The issue shown is what I'm experiencing. For consistency through the application, the Office2019Colorful theme is to be used.
Where do I go from here? This appears to be a bug with the theme
Support,
I'm following up on this defect as it was noted that a patch would be provided. Can you please provide an update?
Thanks.
|
Recommended approach – exe will perform automatic configuration
Please find the patch setup here:
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from:
Please find the Nugets from the below location:
|