Hi, Just wondering if there is anything special to getting the contextmenu to popup on rightclick mouse. I set the OpenMode = "RightClick" and nothing happens. Set it back to LeftClick and it works fine. Is there anything special to do to allow the form to accept rightclick mouse arguments?
Thanks
Hi,I tried this sample and it works fine.You don't need to set windowless for SL4.Is there something specific in the application?Regards,Marin
Hello,I have the same problem. When eventName = RightClick, the contextual menu is not displayed. However, if the eventName = LeftClick, the contextual menu is displayed.I'm using SL4 and version of the dll is 10.1.20101.1005 trial.
My code:
- HTML Page:
<form id="form1" runat="server" style="height:100%">
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="~/ClientBin/ContextMenuOnTextBox.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="transparent" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />
<param name="windowless" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
</form>
- Xaml page:
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel Grid.Column="0">
<Button x:Name="btn" Content="Click me" HorizontalAlignment="Left"/>
<Button x:Name="btnClick" Content="Click" Click="btnClick_Click" Margin="100"/>
<TextBlock x:Name="result" />
</StackPanel>
<igMenu:ContextMenuService.Manager>
<igMenu:ContextMenuManager OpenMode="LeftClick" ModifierKeys="None">
<igMenu:ContextMenuManager.ContextMenu>
<igMenu:XamWebContextMenu >
<!--ItemClicked="XamWebContextMenu_ItemClicked" Opening="XamWebContextMenu_Opening_1"-->
<igMenu:XamWebMenuItem Header="Item_1}" >
<!--Click="XamWebMenuItem_Click"-->
</igMenu:XamWebMenuItem>
<igMenu:XamWebMenuItem Header="Item_2}">
<igMenu:XamWebMenuItem Header="Item_3}">
<igMenu:XamWebMenuItem Header="Item_4}">
<igMenu:XamWebMenuItem Header="Item_5}">
<igMenu:XamWebMenuItem Header="Item_6}">
</igMenu:XamWebContextMenu>
</igMenu:ContextMenuManager.ContextMenu>
</igMenu:ContextMenuManager>
</igMenu:ContextMenuService.Manager>
</Grid>
Hi,
Did you set the Windowless parameter of the Silverlight plug-in to True?
In order to get the right click working this parameter should be set.
You can read more about Windowless parameter here:http://msdn.microsoft.com/en-us/library/cc838156(VS.95).aspxAnd more about the xamWebContextMenu here:http://help.infragistics.com/Help/NetAdvantage/Silverlight/2009.2/CLR3.5/html/xamWebContextMenu_Opening_and_Showing_xamWebContextMenu.htmlRegards