I'm using the XamRibbonWindow for my application. Everything concerning the ribbon and the ribbon application menu works great. However, when attempting to click on the application menu button, if I click just off of it to the top-left I'll get the standard Windows icon menu with "Restore", "Move", "Size", etc...
In Office 2007 apps that menu is disabled. How can I disable that menu?
Thanks!
You are supposed to be able to get that menu when using the keyboard (e.g. pressing Alt-Space) just as you can in Office 2007 but if its showing with the mouse then its probably a bug. I tried to reproduce this using the mouse as you described but was unable to. Can you provide more information on how you are reproducing the problem? E.g. are you using Vista or Windows 7? What is your DPI (looks like 96 but just want to make sure)? Is the window resizable?
Hey Andrew,
I'm using Windows 7 and yes my DPI is set to 96. I'm using NetAdvantage v9.2. The menu is indeed being triggered by a mouse click.
Here's the declaration for my XamRibbonWindow:
<igRibbon:XamRibbonWindow x:Class="efcClient.winMainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:coreGUIClient="clr-namespace:efcCore.GUI.Client;assembly=efcCore"
xmlns:wpfCore="clr-namespace:efcWpfCore.GUI;assembly=efcWpfCore"
xmlns:igRibbon="http://infragistics.com/Ribbon"
xmlns:efcCmd="clr-namespace:efcCore.GUI;assembly=efcCore"
Title="eFileCabinet" MinHeight="222" MinWidth="300"
Height="666" Width="1099" Icon="/efcClient;component/Resource/efc_blue.ico"
Loaded="Window_Loaded"
Closing="Window_Closing" Closed="ClosedWindow" Background="{StaticResource bgBrush}">
As you can see the window is indeed sizable, I haven't placed any restrictions on that.
Is there any other information I can share that will assist in figuring this out?
I've tried to reproduce this within similar settings and haven't been able to. One thing that you could try is to see if the window is getting a syscommand for the system menu (and if so, you could probably suppress that). e.g.
Thanks for the help Andrew!
I've finally been able to test my app on a couple deployment machines, one is Vista, one is Win7 and it works just fine. The menu isn't displayed when clicking in the top-left corner. So I guess it's just something strange happening on my development machine.
The code you supplied does work though, however I had to change SC_MOUSEMENU to 0xF093 to catch the right message. I'm using Windows 7 and I haven't tested this yet on other versions so I'm not sure if it's different. Given that my comp is the only uncooperative one I've encountered so far I think I'll just table this bug and put more energy into it if I can reproduce it on someone else's system.
Thank you for looking into!