<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: WPF Context Menus</title>
	<atom:link href="http://peteohanlon.wordpress.com/2008/09/04/wpf-context-menus/feed/" rel="self" type="application/rss+xml" />
	<link>http://peteohanlon.wordpress.com/2008/09/04/wpf-context-menus/</link>
	<description>Confessions of a WPF lover</description>
	<lastBuildDate>Sat, 14 Nov 2009 07:45:20 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Irfan Ahmad</title>
		<link>http://peteohanlon.wordpress.com/2008/09/04/wpf-context-menus/#comment-110</link>
		<dc:creator>Irfan Ahmad</dc:creator>
		<pubDate>Thu, 06 Nov 2008 13:18:59 +0000</pubDate>
		<guid isPermaLink="false">http://peteohanlon.wordpress.com/?p=23#comment-110</guid>
		<description>I think you didn&#039;t get my point. Here is a sample code where I need to attach a context menu to each item.
XAML code :

            

C# Code Behind:

        private ObservableCollection itemsList = new ObservableCollection();

        public MyClass()
        {
            InitializeComponent();
            
            // Data bind items list to list box
            lbItems.ItemsSource = itemsList;
        }

Now here the list box item source is set at run time rather than hardcoding like . So my question is how to associate a context menu with the items that it picks from the collection.</description>
		<content:encoded><![CDATA[<p>I think you didn&#8217;t get my point. Here is a sample code where I need to attach a context menu to each item.<br />
XAML code :</p>
<p>C# Code Behind:</p>
<p>        private ObservableCollection itemsList = new ObservableCollection();</p>
<p>        public MyClass()<br />
        {<br />
            InitializeComponent();</p>
<p>            // Data bind items list to list box<br />
            lbItems.ItemsSource = itemsList;<br />
        }</p>
<p>Now here the list box item source is set at run time rather than hardcoding like . So my question is how to associate a context menu with the items that it picks from the collection.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peteohanlon</title>
		<link>http://peteohanlon.wordpress.com/2008/09/04/wpf-context-menus/#comment-109</link>
		<dc:creator>peteohanlon</dc:creator>
		<pubDate>Thu, 06 Nov 2008 12:02:06 +0000</pubDate>
		<guid isPermaLink="false">http://peteohanlon.wordpress.com/?p=23#comment-109</guid>
		<description>Irfan

You would associate it with the ListBoxItem, for instance:

&lt;ListBoxItem ContextMenu = &quot;{StaticResource MyMenu}&quot; &gt;</description>
		<content:encoded><![CDATA[<p>Irfan</p>
<p>You would associate it with the ListBoxItem, for instance:</p>
<p>&lt;ListBoxItem ContextMenu = &#8220;{StaticResource MyMenu}&#8221; &gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Irfan Ahmad</title>
		<link>http://peteohanlon.wordpress.com/2008/09/04/wpf-context-menus/#comment-108</link>
		<dc:creator>Irfan Ahmad</dc:creator>
		<pubDate>Thu, 06 Nov 2008 09:17:49 +0000</pubDate>
		<guid isPermaLink="false">http://peteohanlon.wordpress.com/?p=23#comment-108</guid>
		<description>What if the list box is databind with a collection? How would we then attach the context menu with the list box item ?</description>
		<content:encoded><![CDATA[<p>What if the list box is databind with a collection? How would we then attach the context menu with the list box item ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
