<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Implementing a ContextMenu in Silverlight 4 Beta</title>
	<atom:link href="http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/</link>
	<description>Musings + some code.</description>
	<lastBuildDate>Tue, 19 Jan 2010 15:49:32 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dmitriy Sosunov</title>
		<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/comment-page-1/#comment-217</link>
		<dc:creator>Dmitriy Sosunov</dc:creator>
		<pubDate>Tue, 19 Jan 2010 15:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.jebishop.com/?p=55#comment-217</guid>
		<description>Why ContextMenu inherits  from UserControl, instead of inherit from ItemsControl? Your approach not provides ability to bind context menu items with datasource.

Dmitriy.</description>
		<content:encoded><![CDATA[<p>Why ContextMenu inherits  from UserControl, instead of inherit from ItemsControl? Your approach not provides ability to bind context menu items with datasource.</p>
<p>Dmitriy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Lebrun</title>
		<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/comment-page-1/#comment-211</link>
		<dc:creator>Thomas Lebrun</dc:creator>
		<pubDate>Fri, 15 Jan 2010 18:17:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.jebishop.com/?p=55#comment-211</guid>
		<description>Hi Jesse,

I&#039;m having the same issue as Eric Schoen: When the context menu tries to open in the right mouse button up handler, setting .IsOpen to true causes an error deep inside the native SL stack.

Any ideas ?


Thanks !</description>
		<content:encoded><![CDATA[<p>Hi Jesse,</p>
<p>I&#8217;m having the same issue as Eric Schoen: When the context menu tries to open in the right mouse button up handler, setting .IsOpen to true causes an error deep inside the native SL stack.</p>
<p>Any ideas ?</p>
<p>Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anil</title>
		<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/comment-page-1/#comment-120</link>
		<dc:creator>Anil</dc:creator>
		<pubDate>Thu, 31 Dec 2009 07:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.jebishop.com/?p=55#comment-120</guid>
		<description>Very Nice!!!!!!! 

Jesse, I have question. Is there anyway to dynamically generate menu item using binding using this control?

Thanks
Anil</description>
		<content:encoded><![CDATA[<p>Very Nice!!!!!!! </p>
<p>Jesse, I have question. Is there anyway to dynamically generate menu item using binding using this control?</p>
<p>Thanks<br />
Anil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Schoen</title>
		<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/comment-page-1/#comment-62</link>
		<dc:creator>Eric Schoen</dc:creator>
		<pubDate>Mon, 21 Dec 2009 15:33:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jebishop.com/?p=55#comment-62</guid>
		<description>This is a nice feature to have in Silverlight and I look forward to being able to use it.  Unfortunately, I can&#039;t get it to work for me in a scenario in which the UI elements to which I&#039;m adding the context menu are created dynamically by the application. I create the context menu as a local resource on a page and attach it to the UI elements I create in the application. In my case, I&#039;m trying to attach the menu to Pushpins displayed on a Bing! map through the Silverlight control, but I suspect the problem would manifest with any sort of UI element.

When the context menu tries to open in the right mouse button up handler, setting .IsOpen to true causes an error deep inside the native SL stack.  The error propagates back to the application as an argument exception:

System.ArgumentException was unhandled by user code
  Message=Value does not fall within the expected range.
  StackTrace:
       at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
       at MS.Internal.XcpImports.SetValue(INativeCoreTypeWrapper obj, DependencyProperty property, DependencyObject doh)
       at System.Windows.DependencyObject.SetValue(DependencyProperty property, DependencyObject doh)
       at System.Windows.Controls.ToolTip.HookupParentPopup()
       at System.Windows.Controls.ToolTip.OnIsOpenChanged(Boolean isOpen)
       at System.Windows.Controls.ToolTip.OnIsOpenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
       at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry&amp; newEntry, ValueOperation operation)
       at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
       at System.Windows.DependencyObject.SetValue(DependencyProperty property, Boolean b)
       at System.Windows.Controls.ToolTip.set_IsOpen(Boolean value)
       at ContextMenuControls.ContextMenu.element_MouseRightButtonUp(Object sender, MouseButtonEventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
  InnerException: 

I found a similar, although not identical, thread from the Silverlight 2 era.  It may just be that all communication with the native layer happens through the Ms.Internal.XcpImports class, so this may be a red herring:

http://forums.silverlight.net/forums/t/31071.aspx

Regards,
Eric</description>
		<content:encoded><![CDATA[<p>This is a nice feature to have in Silverlight and I look forward to being able to use it.  Unfortunately, I can&#8217;t get it to work for me in a scenario in which the UI elements to which I&#8217;m adding the context menu are created dynamically by the application. I create the context menu as a local resource on a page and attach it to the UI elements I create in the application. In my case, I&#8217;m trying to attach the menu to Pushpins displayed on a Bing! map through the Silverlight control, but I suspect the problem would manifest with any sort of UI element.</p>
<p>When the context menu tries to open in the right mouse button up handler, setting .IsOpen to true causes an error deep inside the native SL stack.  The error propagates back to the application as an argument exception:</p>
<p>System.ArgumentException was unhandled by user code<br />
  Message=Value does not fall within the expected range.<br />
  StackTrace:<br />
       at MS.Internal.XcpImports.CheckHResult(UInt32 hr)<br />
       at MS.Internal.XcpImports.SetValue(INativeCoreTypeWrapper obj, DependencyProperty property, DependencyObject doh)<br />
       at System.Windows.DependencyObject.SetValue(DependencyProperty property, DependencyObject doh)<br />
       at System.Windows.Controls.ToolTip.HookupParentPopup()<br />
       at System.Windows.Controls.ToolTip.OnIsOpenChanged(Boolean isOpen)<br />
       at System.Windows.Controls.ToolTip.OnIsOpenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br />
       at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)<br />
       at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry&amp; newEntry, ValueOperation operation)<br />
       at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)<br />
       at System.Windows.DependencyObject.SetValue(DependencyProperty property, Boolean b)<br />
       at System.Windows.Controls.ToolTip.set_IsOpen(Boolean value)<br />
       at ContextMenuControls.ContextMenu.element_MouseRightButtonUp(Object sender, MouseButtonEventArgs e)<br />
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)<br />
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)<br />
  InnerException: </p>
<p>I found a similar, although not identical, thread from the Silverlight 2 era.  It may just be that all communication with the native layer happens through the Ms.Internal.XcpImports class, so this may be a red herring:</p>
<p><a href="http://forums.silverlight.net/forums/t/31071.aspx" rel="nofollow">http://forums.silverlight.net/forums/t/31071.aspx</a></p>
<p>Regards,<br />
Eric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/comment-page-1/#comment-54</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Fri, 18 Dec 2009 22:57:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.jebishop.com/?p=55#comment-54</guid>
		<description>It seems that when I apply your ContextMenu to an element, it is ignoring Placement = PlacementMode.Mouse in your code. I can fiddle with the Xaml, and if I stick a Tooltip in addition to one of your context menu objects, then the placement works correctly.

My scenario is a canvas like container with some simple rectangles...

So if I change this:

                
                    
                        
                            
                        
                    
                

To:

                
                    
                        
                            
                        
                    
                    
                        
                    
                

I get the correct placement...

Any ideas?

Thanks
Rob</description>
		<content:encoded><![CDATA[<p>It seems that when I apply your ContextMenu to an element, it is ignoring Placement = PlacementMode.Mouse in your code. I can fiddle with the Xaml, and if I stick a Tooltip in addition to one of your context menu objects, then the placement works correctly.</p>
<p>My scenario is a canvas like container with some simple rectangles&#8230;</p>
<p>So if I change this:</p>
<p>To:</p>
<p>I get the correct placement&#8230;</p>
<p>Any ideas?</p>
<p>Thanks<br />
Rob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daron Yöndem</title>
		<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/comment-page-1/#comment-14</link>
		<dc:creator>Daron Yöndem</dc:creator>
		<pubDate>Sat, 28 Nov 2009 12:22:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.jebishop.com/?p=55#comment-14</guid>
		<description>Hi Jesse,

Just published an article on my blog about the &quot;right click support&quot; and your awesome control did provide a realistic valuable instant solution for app developers.

http://daron.yondem.com/tr/PermaLink.aspx?guid=b621640a-b973-45e9-a67a-7b8493ca872a

Thanks for the great work! Hope to see your ContextMenu control in the Silvelright Toolkit soon!</description>
		<content:encoded><![CDATA[<p>Hi Jesse,</p>
<p>Just published an article on my blog about the &#8220;right click support&#8221; and your awesome control did provide a realistic valuable instant solution for app developers.</p>
<p><a href="http://daron.yondem.com/tr/PermaLink.aspx?guid=b621640a-b973-45e9-a67a-7b8493ca872a" rel="nofollow">http://daron.yondem.com/tr/PermaLink.aspx?guid=b621640a-b973-45e9-a67a-7b8493ca872a</a></p>
<p>Thanks for the great work! Hope to see your ContextMenu control in the Silvelright Toolkit soon!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jesse</title>
		<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/comment-page-1/#comment-13</link>
		<dc:creator>jesse</dc:creator>
		<pubDate>Mon, 23 Nov 2009 18:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jebishop.com/?p=55#comment-13</guid>
		<description>You can&#039;t add items to the native menu, but there are other ways to access those options. 
Some examples:
-you can create a custom context menu entry to install an out of browser application using the Application.Current.Install() method
-the configuration dialog is accessible via a shortcut in the start menu (or Applications folder on a Mac)</description>
		<content:encoded><![CDATA[<p>You can&#8217;t add items to the native menu, but there are other ways to access those options.<br />
Some examples:<br />
-you can create a custom context menu entry to install an out of browser application using the Application.Current.Install() method<br />
-the configuration dialog is accessible via a shortcut in the start menu (or Applications folder on a Mac)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsp3536</title>
		<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/comment-page-1/#comment-12</link>
		<dc:creator>jsp3536</dc:creator>
		<pubDate>Mon, 23 Nov 2009 17:54:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.jebishop.com/?p=55#comment-12</guid>
		<description>If you supress the silverlight menu on the context click how is the user suppose to get to those options?  Is there a way to append menu items to the the native silverlight menu on the context click?</description>
		<content:encoded><![CDATA[<p>If you supress the silverlight menu on the context click how is the user suppose to get to those options?  Is there a way to append menu items to the the native silverlight menu on the context click?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DataGrid and contextmenu</title>
		<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/comment-page-1/#comment-11</link>
		<dc:creator>DataGrid and contextmenu</dc:creator>
		<pubDate>Mon, 23 Nov 2009 17:12:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.jebishop.com/?p=55#comment-11</guid>
		<description>[...] is a nice implementation of contextmenu by Jesse Bishop in SL4. It supports commands as well as click handlers we could use that control [...]</description>
		<content:encoded><![CDATA[<p>[...] is a nice implementation of contextmenu by Jesse Bishop in SL4. It supports commands as well as click handlers we could use that control [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention jebishop.blog » Implementing a ContextMenu in Silverlight 4 Beta -- Topsy.com</title>
		<link>http://www.jebishop.com/2009/11/18/implementing-a-contextmenu-in-silverlight-4-beta/comment-page-1/#comment-10</link>
		<dc:creator>Tweets that mention jebishop.blog » Implementing a ContextMenu in Silverlight 4 Beta -- Topsy.com</dc:creator>
		<pubDate>Mon, 23 Nov 2009 13:19:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.jebishop.com/?p=55#comment-10</guid>
		<description>[...] This post was mentioned on Twitter by Silverlight News, Rasel Jabbar. Rasel Jabbar said: RT @SilverlightNews: Implementing a ContextMenu in Silverlight 4 Beta - http://snurl.com/tdm56 [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Silverlight News, Rasel Jabbar. Rasel Jabbar said: RT @SilverlightNews: Implementing a ContextMenu in Silverlight 4 Beta &#8211; <a href="http://snurl.com/tdm56" rel="nofollow">http://snurl.com/tdm56</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
