Hello,
I have a strange issue with the datacontext-binding to the application-menu, which I do not have when binding to the ribbon-tabs
I have my Viewmodel which exposes iCommands.
First, whta is working correctly:
When I bind to a ribbonTabItem, the following works OK
<
igRibbon:RibbonTabItem x:Name="xamRibbon1_Tab_Main" Header="Main" DataContext="{Binding Path=Ribbon_ApplicationMenu_ViewModel}">
<igRibbon:RibbonGroup Id="ribgrp_Main_MainData" Caption="Main Data">
<igRibbon:ButtonTool Id="rib_Main_Data_ProjectNew" Caption="New Project" Command="{Binding Path=Project_New_Command}"</igRibbon:ButtonTool
</igRibbon:RibbonGroup>
</igRibbon:RibbonTabItem>
When I bind to the same to the applicationMenu --> my commands don't work when clicked on button
<igRibbon:XamRibbon.ApplicationMenu>
<igRibbon:ButtonTool Id="rib_App_Menu_ProjectNew" Caption="New Project" Command="{Binding Path=Project_New_Command}"</igRibbon:ButtonTool>
</
igRibbon:ApplicationMenu>
</igRibbon:XamRibbon.ApplicationMenu>
In my output-debug window I wrote system.out-lines when the "get of the Command" in my viewModel is executed.
Now the strange part: in both cases, the debug-line is printed out (so the correct command should be linked...)
But when clicking on it in the application-menu, nothing happens. but when clicking on it in the ribbontabitem, my command is executed.
I did the test also with simple databinding with a string to the caption --> both thimes the getter for the text is executed, but in the application-menu the caption is EMPTY !!!
Does anyone have an idea what could be wrong?
*) is setting the datacontext for applicationmenu working: I think yes, because the getters on my viemwodel are executed
But why do they not react to a click, why is the caption EMPTY in app-menu and not in ribbontab...
My goal is having different Viewmodels for the application-menu, eacht tabitem, ... instead of one big Viewmodel for the whole ribbon.
But if that's the solution, only 1 datacontext binding to the whole ribbon, then I can maybe change my idea.
thx
Fred
I apologize no one has yet responded to this post.
Have you tried a newer version of NetAdvantage to see if this problem still exists? If you still have this problem, please let us know. It sounds like a bug. In which case, developer support would be the best way for resolving the issue:
http://ko.infragistics.com/gethelp
Thank you,