<?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: ItemsControl: &#039;C&#039; is for Collection</title>
	<atom:link href="http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/feed/" rel="self" type="application/rss+xml" />
	<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/</link>
	<description>Drinking (and serving) the WPF Kool-Aid since 2002</description>
	<lastBuildDate>Mon, 30 Aug 2010 18:54:01 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Catherine</title>
		<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/comment-page-1/#comment-2948</link>
		<dc:creator>Catherine</dc:creator>
		<pubDate>Sun, 27 Jun 2010 08:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=18#comment-2948</guid>
		<description>To be a bit more specific about the &quot;I think I love you&quot; comment, I am struggling as a WPF newbie to get a simple window working showing a DataGrid of items, and a combobox that allows you to filter the datagrid based on the contents of one of the fields. Obviously I want the combo to refresh when the datagrid changes, but to have its sort order independent of that of the datagrid. After hours of web searching, I read this. Now it works!!!</description>
		<content:encoded><![CDATA[<p>To be a bit more specific about the &#8220;I think I love you&#8221; comment, I am struggling as a WPF newbie to get a simple window working showing a DataGrid of items, and a combobox that allows you to filter the datagrid based on the contents of one of the fields. Obviously I want the combo to refresh when the datagrid changes, but to have its sort order independent of that of the datagrid. After hours of web searching, I read this. Now it works!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Catherine</title>
		<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/comment-page-1/#comment-2947</link>
		<dc:creator>Catherine</dc:creator>
		<pubDate>Sun, 27 Jun 2010 08:52:11 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=18#comment-2947</guid>
		<description>I think I love you.</description>
		<content:encoded><![CDATA[<p>I think I love you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ykab</title>
		<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/comment-page-1/#comment-740</link>
		<dc:creator>ykab</dc:creator>
		<pubDate>Fri, 05 Mar 2010 02:30:52 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=18#comment-740</guid>
		<description>extremely well written and enlightening. can&#039;t wait to read more of your posts.</description>
		<content:encoded><![CDATA[<p>extremely well written and enlightening. can&#8217;t wait to read more of your posts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/comment-page-1/#comment-733</link>
		<dc:creator>George</dc:creator>
		<pubDate>Mon, 01 Mar 2010 15:28:46 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=18#comment-733</guid>
		<description>Great Post!! Thank you very much.</description>
		<content:encoded><![CDATA[<p>Great Post!! Thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/comment-page-1/#comment-181</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Fri, 03 Apr 2009 04:05:59 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=18#comment-181</guid>
		<description>Hi Trey,&lt;br&gt;&lt;br&gt;The entities model works great with WPF for data retrieval and presentation. I haven&#039;t actually tried using it for transactional updates. If you have a simple sample that demonstrates the problem you describe, I wouldn&#039;t mind having a look. Feel free to send it to my ask[at]drwpf[dot]com address.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;-dw</description>
		<content:encoded><![CDATA[<p>Hi Trey,</p>
<p>The entities model works great with WPF for data retrieval and presentation. I haven&#8217;t actually tried using it for transactional updates. If you have a simple sample that demonstrates the problem you describe, I wouldn&#8217;t mind having a look. Feel free to send it to my ask[at]drwpf[dot]com address.</p>
<p>Cheers,<br />-dw</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trey</title>
		<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/comment-page-1/#comment-180</link>
		<dc:creator>Trey</dc:creator>
		<pubDate>Thu, 02 Apr 2009 22:18:08 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=18#comment-180</guid>
		<description>Excellent article. Thank you.&lt;br&gt;&lt;br&gt;Specifically the Collection View as I found examples all over, but no one explaining quite what it does or why it&#039;s necessary. Though I cannot say I am entirely clear on the topic, I have a decent idea now.&lt;br&gt;&lt;br&gt;Perhaps this is because my situation is a bit different, in that my data is coming from a LINQ to Entities models, and I am trying to use a DataGrid.&lt;br&gt;&lt;br&gt;I have been able to use ItemsSource and tie it directly to an entity like my Customers EntityObject class (the mapped table basically) and it displays items correctly.&lt;br&gt;&lt;br&gt;All adds, edits, and deletes appear on the DataGrid regardless of further coding.&lt;br&gt;&lt;br&gt;At this point I am trying to resolve the issue with changes being persisted to the database back through the entities layer.&lt;br&gt;&lt;br&gt;The commits are made after most of the events are fired, so I am not sure where to write the code that pushes the changes through the entity model. &lt;br&gt;&lt;br&gt;I&#039;ve tried using the RowEditEnding handler to some success (using an IEditableCollectionView for queueing Adds and Edits to be commited), but again the event finishes before the commit to the collection is actually performed... so if I call entities.SaveChanges() I get concurrency exceptions and other issues with the model not matching the collection.&lt;br&gt;&lt;br&gt;Any help here? Again, I&#039;ve found many examples, but none of them very helpful when using Entities model for CRUD.&lt;br&gt;&lt;br&gt;Thank you.</description>
		<content:encoded><![CDATA[<p>Excellent article. Thank you.</p>
<p>Specifically the Collection View as I found examples all over, but no one explaining quite what it does or why it&#8217;s necessary. Though I cannot say I am entirely clear on the topic, I have a decent idea now.</p>
<p>Perhaps this is because my situation is a bit different, in that my data is coming from a LINQ to Entities models, and I am trying to use a DataGrid.</p>
<p>I have been able to use ItemsSource and tie it directly to an entity like my Customers EntityObject class (the mapped table basically) and it displays items correctly.</p>
<p>All adds, edits, and deletes appear on the DataGrid regardless of further coding.</p>
<p>At this point I am trying to resolve the issue with changes being persisted to the database back through the entities layer.</p>
<p>The commits are made after most of the events are fired, so I am not sure where to write the code that pushes the changes through the entity model. </p>
<p>I&#8217;ve tried using the RowEditEnding handler to some success (using an IEditableCollectionView for queueing Adds and Edits to be commited), but again the event finishes before the commit to the collection is actually performed&#8230; so if I call entities.SaveChanges() I get concurrency exceptions and other issues with the model not matching the collection.</p>
<p>Any help here? Again, I&#8217;ve found many examples, but none of them very helpful when using Entities model for CRUD.</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MacGyver</title>
		<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/comment-page-1/#comment-179</link>
		<dc:creator>MacGyver</dc:creator>
		<pubDate>Wed, 04 Mar 2009 15:07:17 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=18#comment-179</guid>
		<description>Thanks!&lt;br&gt;Now that I re-read the msdn docs (http://msdn.microsoft.com/en-us/library/ms668604.aspx) it does indeed implement the INotifyPropertyChanged event!&lt;br&gt;I guess we can never read them thoroughly enough.</description>
		<content:encoded><![CDATA[<p>Thanks!<br />Now that I re-read the msdn docs (<a href="http://msdn.microsoft.com/en-us/library/ms668604.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms668604.aspx</a>) it does indeed implement the INotifyPropertyChanged event!<br />I guess we can never read them thoroughly enough.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/comment-page-1/#comment-178</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Tue, 03 Mar 2009 01:25:25 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=18#comment-178</guid>
		<description>Hi MacGyver,&lt;br&gt;&lt;br&gt;Yes, that binding should work fine. The ObservableCollection does implement INotifyPropertyChanged and it raises a change notification for the Count property whenever an item is removed or added to the collection.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;-dw</description>
		<content:encoded><![CDATA[<p>Hi MacGyver,</p>
<p>Yes, that binding should work fine. The ObservableCollection does implement INotifyPropertyChanged and it raises a change notification for the Count property whenever an item is removed or added to the collection.</p>
<p>Cheers,<br />-dw</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MacGyver</title>
		<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/comment-page-1/#comment-177</link>
		<dc:creator>MacGyver</dc:creator>
		<pubDate>Mon, 02 Mar 2009 16:04:34 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=18#comment-177</guid>
		<description>First of all; thank you dear Doctor for all the information you&#039;ve spread around the internet (msdn fora, this blog etc.), they&#039;ve helped me tremendously in understanding WPF.&lt;br&gt;&lt;br&gt;Now for my question:&lt;br&gt;Does binding to the ObservableCollection.Count property work (in a DataTrigger) ? &lt;br&gt;Ie. {Binding Path=Accounts.Count} where Accounts is an ObservableCollection. &lt;br&gt;What I assume is that since ObservableCollection does not implement INotifyPropertyChanged it will not work.&lt;br&gt;&lt;br&gt;Thanks.</description>
		<content:encoded><![CDATA[<p>First of all; thank you dear Doctor for all the information you&#8217;ve spread around the internet (msdn fora, this blog etc.), they&#8217;ve helped me tremendously in understanding WPF.</p>
<p>Now for my question:<br />Does binding to the ObservableCollection.Count property work (in a DataTrigger) ? <br />Ie. {Binding Path=Accounts.Count} where Accounts is an ObservableCollection. <br />What I assume is that since ObservableCollection does not implement INotifyPropertyChanged it will not work.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2007/11/05/itemscontrol-c-is-for-collection/comment-page-1/#comment-175</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Fri, 13 Feb 2009 05:49:51 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=18#comment-175</guid>
		<description>Thanks Lax. It&#039;s on my todo list. (Just need to find some time! :-s)&lt;br&gt;&lt;br&gt;The short answer is yes, you can perform custom validation using a custom validation rule, but it&#039;s almost always easier to perform such validation within the viewmodel class using IDataErrorInfo or IEditableObject (see &#039;E&#039; is for Editable Collection).</description>
		<content:encoded><![CDATA[<p>Thanks Lax. It&#8217;s on my todo list. (Just need to find some time! :-s)</p>
<p>The short answer is yes, you can perform custom validation using a custom validation rule, but it&#8217;s almost always easier to perform such validation within the viewmodel class using IDataErrorInfo or IEditableObject (see &#8216;E&#8217; is for Editable Collection).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

