<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 Forums - Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Forums/rss"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 Forums - Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<link>http://channel9.msdn.com/Forums</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Forums</link>
	<language>en</language>
	<pubDate>Sun, 19 May 2013 06:20:45 GMT</pubDate>
	<lastBuildDate>Sun, 19 May 2013 06:20:45 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>25</c9:totalResults>
	<c9:pageCount>-25</c9:pageCount>
	<c9:pageSize>-1</c9:pageSize>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p>I tried to read about these two, ItemSource and DataContext but I still do not get it. Using Silverlight 4... having a custom control, a ListBox... When I attach some ObservableCollection&lt;T&gt; to the listBox1.ItemSource, it works and shows up.</p>
<p>When I attach some ObservableCollection&lt;T&gt; to the listBox1.DataContext, it also works and shows up.</p>
<p>&nbsp;</p>
<p>So, which one should I use? <strong>o.O</strong></p>
<p>&nbsp;</p>
<p>Thanks.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/554974#554974</link>
		<pubDate>Wed, 09 Jun 2010 21:09:49 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/554974#554974</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p>ItemsSource explains what the source of the items is, whilst DataContext is purely about the concept of given Data being bound against that item, that data may not be used specifically (or directly) as the items, it may be used to set other properties on
 the list control.</p>
<p>&nbsp;</p>
<p>Generally you would bind to the DataContext, and if required (not sure if ItemsSource has a default binding directly to the DataContext) use items source to bind to THE or part of the DataContext.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/b68937d25d1d419f904f9dea00aa4bb1#b68937d25d1d419f904f9dea00aa4bb1</link>
		<pubDate>Wed, 09 Jun 2010 21:45:02 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/b68937d25d1d419f904f9dea00aa4bb1#b68937d25d1d419f904f9dea00aa4bb1</guid>
		<dc:creator>stevo_</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/stevo_/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">stevo_ said:</div><div class="quoteText">
<p>ItemsSource explains what the source of the items is, whilst DataContext is purely about the concept of given Data being bound against that item, that data may not be used specifically (or directly) as the items, it may be used to set other properties on
 the list control.</p>
<p>&nbsp;</p>
<p>Generally you would bind to the DataContext, and if required (not sure if ItemsSource has a default binding directly to the DataContext) use items source to bind to THE or part of the DataContext.</p>
</div></blockquote>
<p>I &quot;think&quot; I get it, hmm, could you show me some small sample line of code where you bind ItemSource to a &quot;certain&quot; part of the DataContext?</p>
<p>&nbsp;</p>
<p>Thanks.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/465b524eea374c2684be9dea00aa4bbd#465b524eea374c2684be9dea00aa4bbd</link>
		<pubDate>Thu, 10 Jun 2010 08:16:48 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/465b524eea374c2684be9dea00aa4bbd#465b524eea374c2684be9dea00aa4bbd</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">turrican said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">stevo_ said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>I &quot;think&quot; I get it, hmm, could you show me some small sample line of code where you bind ItemSource to a &quot;certain&quot; part of the DataContext?</p>
<p>&nbsp;</p>
<p>Thanks.</p>
</div></blockquote>
<p>You need to start using the MVVM design patern</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/2f580acfe0364071ad8b9dea00aa4bc6#2f580acfe0364071ad8b9dea00aa4bc6</link>
		<pubDate>Thu, 10 Jun 2010 08:45:15 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/2f580acfe0364071ad8b9dea00aa4bc6#2f580acfe0364071ad8b9dea00aa4bc6</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">vesuvius said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">turrican said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>You need to start using the MVVM design patern</p>
</div></blockquote>
<p>How exactly will Model View ViewModel help me? Not sure I get what you mean here.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/96f4292e948a4161bbc49dea00aa4bcd#96f4292e948a4161bbc49dea00aa4bcd</link>
		<pubDate>Thu, 10 Jun 2010 13:29:29 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/96f4292e948a4161bbc49dea00aa4bcd#96f4292e948a4161bbc49dea00aa4bcd</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">turrican said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">vesuvius said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>How exactly will Model View ViewModel help me? Not sure I get what you mean here.</p>
</div></blockquote>
<p>You typically databind to the viewmodel (the datacontext for the window/page/pagefunction, and expose properties that are then bound to the controls like the listbox. The listbox finds the properies you expose in the view model using attached properties/routed
 events.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/30fb1704202945b5a5f89dea00aa4bd5#30fb1704202945b5a5f89dea00aa4bd5</link>
		<pubDate>Thu, 10 Jun 2010 14:20:13 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/30fb1704202945b5a5f89dea00aa4bd5#30fb1704202945b5a5f89dea00aa4bd5</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p>MVVM is a nice pattern for WPF/SL, but it has nothing to do with your question.</p>
<p>&nbsp;</p>
<p>Let's say I have an object, &quot;myThingie&quot;&nbsp;that has a couple collections inside of it, &quot;Stuff&quot;, &quot;Things&quot;, and &quot;People&quot;.</p>
<p>&nbsp;</p>
<p>I have a form that has a Grid, &quot;myGrid&quot;, with three ListBoxes, &quot;lst1&quot;, &quot;lst2&quot;, &quot;lst3&quot;.
</p>
<p>&nbsp;</p>
<p>Here's my XAML (with extraneous stuff removed):</p>
<p>&nbsp;</p>
<p>&lt;Grid DataContext={StaticResource myThingie}&gt;</p>
<p>&lt;ListBox ItemSource={Binding Stuff}/&gt;</p>
<p>&lt;ListBox ItemSource={Binding Things}/&gt;</p>
<p>&lt;ListBox ItemSource={Binding People}/&gt;</p>
<p>&lt;/Grid&gt;</p>
<p>&nbsp;</p>
<p>Because there's no source defined in the Binding statements, the ListBoxes automatically look to the DataContext. They'll go up the tree until they find one that's defined.</p>
<p>&nbsp;</p>
<p>Without the DataContext, the ItemSource binding statements get much more complex, and if I ever need to change the source of the data, I'd have to update all of them, instead of the one DataContext.</p>
<p>&nbsp;</p>
<p>Frankly, I'm surprised that just setting the ListBox DataContext works. I would have thought you'd need a ItemSource={Binding} for that to work.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/da9e48af4ad645c3ae209dea00aa4be0#da9e48af4ad645c3ae209dea00aa4be0</link>
		<pubDate>Thu, 10 Jun 2010 14:33:41 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/da9e48af4ad645c3ae209dea00aa4be0#da9e48af4ad645c3ae209dea00aa4be0</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">spivonious said:</div><div class="quoteText">
<p>MVVM is a nice pattern for WPF/SL, but it has nothing to do with your question.</p>
<p>&nbsp;</p>
<p>Let's say I have an object, &quot;myThingie&quot;&nbsp;that has a couple collections inside of it, &quot;Stuff&quot;, &quot;Things&quot;, and &quot;People&quot;.</p>
<p>&nbsp;</p>
<p>I have a form that has a Grid, &quot;myGrid&quot;, with three ListBoxes, &quot;lst1&quot;, &quot;lst2&quot;, &quot;lst3&quot;.
</p>
<p>&nbsp;</p>
<p>Here's my XAML (with extraneous stuff removed):</p>
<p>&nbsp;</p>
<p>&lt;Grid DataContext={StaticResource myThingie}&gt;</p>
<p>&lt;ListBox ItemSource={Binding Stuff}/&gt;</p>
<p>&lt;ListBox ItemSource={Binding Things}/&gt;</p>
<p>&lt;ListBox ItemSource={Binding People}/&gt;</p>
<p>&lt;/Grid&gt;</p>
<p>&nbsp;</p>
<p>Because there's no source defined in the Binding statements, the ListBoxes automatically look to the DataContext. They'll go up the tree until they find one that's defined.</p>
<p>&nbsp;</p>
<p>Without the DataContext, the ItemSource binding statements get much more complex, and if I ever need to change the source of the data, I'd have to update all of them, instead of the one DataContext.</p>
<p>&nbsp;</p>
<p>Frankly, I'm surprised that just setting the ListBox DataContext works. I would have thought you'd need a ItemSource={Binding} for that to work.</p>
</div></blockquote>
<p>I see. Thanks for the clear help.</p>
<p>&nbsp;</p>
<p>I do have &quot;&nbsp;ItemsSource=&quot;{Binding}&quot;&quot; in my XAML for the listBox1.</p>
<p>&nbsp;</p>
<p>A small question, &quot;myThingies&quot;... in my case, it's a ObservableCollection&lt;T&gt;, now, how can I have &quot;Stuff&quot;,&quot;Things&quot;,&quot;People&quot; in this? Do you mean 3 other ObservableCollection&lt;T&gt; inside that one with the name &quot;Stuff&quot;,&quot;Things&quot; and &quot;People&quot;?</p>
<p>&nbsp;</p>
<p>and if that is the case, so when I do the &nbsp;ItemsSource=&quot;{Binding Stuff}&quot; , it will automatically match it with it, right?</p>
<p>&nbsp;</p>
<p>What I mean is, I do understand what you said but I am unsure how I can have several collections in &quot;one&quot; and then attach it to the datacontext? Could you give me a small sample code on an observablecollection having &quot;3&quot; stuff in it?</p>
<p>&nbsp;</p>
<p>Thanks.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/73fa559c1a2c4f0885189dea00aa4bf0#73fa559c1a2c4f0885189dea00aa4bf0</link>
		<pubDate>Thu, 10 Jun 2010 14:50:49 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/73fa559c1a2c4f0885189dea00aa4bf0#73fa559c1a2c4f0885189dea00aa4bf0</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">turrican said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">spivonious said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>I see. Thanks for the clear help.</p>
<p>&nbsp;</p>
<p>I do have &quot;&nbsp;ItemsSource=&quot;{Binding}&quot;&quot; in my XAML for the listBox1.</p>
<p>&nbsp;</p>
<p>A small question, &quot;myThingies&quot;... in my case, it's a ObservableCollection&lt;T&gt;, now, how can I have &quot;Stuff&quot;,&quot;Things&quot;,&quot;People&quot; in this? Do you mean 3 other ObservableCollection&lt;T&gt; inside that one with the name &quot;Stuff&quot;,&quot;Things&quot; and &quot;People&quot;?</p>
<p>&nbsp;</p>
<p>and if that is the case, so when I do the &nbsp;ItemsSource=&quot;{Binding Stuff}&quot; , it will automatically match it with it, right?</p>
<p>&nbsp;</p>
<p>What I mean is, I do understand what you said but I am unsure how I can have several collections in &quot;one&quot; and then attach it to the datacontext? Could you give me a small sample code on an observablecollection having &quot;3&quot; stuff in it?</p>
<p>&nbsp;</p>
<p>Thanks.</p>
</div></blockquote>
<p>The DataContext can be whatever you want it to be.&nbsp;&nbsp;It doesn't have to be a collection. The property is available on all WPF controls.</p>
<p>&nbsp;</p>
<p>In one of my WPF apps, I have the DataContext set to an instance of a DataSet, and the bindings refer to the tables inside.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/2acd791f53f745a8957b9dea00aa4c00#2acd791f53f745a8957b9dea00aa4c00</link>
		<pubDate>Thu, 10 Jun 2010 15:06:35 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/2acd791f53f745a8957b9dea00aa4c00#2acd791f53f745a8957b9dea00aa4c00</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">spivonious said:</div><div class="quoteText">
<p>MVVM is a nice pattern for WPF/SL, but it has nothing to do with your question.</p>
<p>&nbsp;</p>
<p>Let's say I have an object, &quot;myThingie&quot;&nbsp;that has a couple collections inside of it, &quot;Stuff&quot;, &quot;Things&quot;, and &quot;People&quot;.</p>
<p>&nbsp;</p>
<p>I have a form that has a Grid, &quot;myGrid&quot;, with three ListBoxes, &quot;lst1&quot;, &quot;lst2&quot;, &quot;lst3&quot;.
</p>
<p>&nbsp;</p>
<p>Here's my XAML (with extraneous stuff removed):</p>
<p>&nbsp;</p>
<p>&lt;Grid DataContext={StaticResource myThingie}&gt;</p>
<p>&lt;ListBox ItemSource={Binding Stuff}/&gt;</p>
<p>&lt;ListBox ItemSource={Binding Things}/&gt;</p>
<p>&lt;ListBox ItemSource={Binding People}/&gt;</p>
<p>&lt;/Grid&gt;</p>
<p>&nbsp;</p>
<p>Because there's no source defined in the Binding statements, the ListBoxes automatically look to the DataContext. They'll go up the tree until they find one that's defined.</p>
<p>&nbsp;</p>
<p>Without the DataContext, the ItemSource binding statements get much more complex, and if I ever need to change the source of the data, I'd have to update all of them, instead of the one DataContext.</p>
<p>&nbsp;</p>
<p>Frankly, I'm surprised that just setting the ListBox DataContext works. I would have thought you'd need a ItemSource={Binding} for that to work.</p>
</div></blockquote>
<p>I know that the question lacked a direct reference to the pattern but he inevitably will start to get his &quot;knickers in a twist&quot; if he does not start using it.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/a91b472ed05a414fbc439dea00aa4c0e#a91b472ed05a414fbc439dea00aa4c0e</link>
		<pubDate>Thu, 10 Jun 2010 15:08:46 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/a91b472ed05a414fbc439dea00aa4c0e#a91b472ed05a414fbc439dea00aa4c0e</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">spivonious said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">turrican said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>The DataContext can be whatever you want it to be.&nbsp;&nbsp;It doesn't have to be a collection. The property is available on all WPF controls.</p>
<p>&nbsp;</p>
<p>In one of my WPF apps, I have the DataContext set to an instance of a DataSet, and the bindings refer to the tables inside.</p>
</div></blockquote>
<p>Yes, I understand, ok I'll have to test with the collection and see how it goes.</p>
<p>&nbsp;</p>
<p>On a sidenote, when doing &quot;SELECT * FROM TABLE1 ; SELECT * FROM TABLE2&quot; I can get two tables out. Is it possible to get those two in a DataSet somehow? ( bit offtopic question but I thought you might know it. )</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/9c71ac0ff5c942fba21f9dea00aa4c18#9c71ac0ff5c942fba21f9dea00aa4c18</link>
		<pubDate>Thu, 10 Jun 2010 15:40:02 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/9c71ac0ff5c942fba21f9dea00aa4c18#9c71ac0ff5c942fba21f9dea00aa4c18</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">vesuvius said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">spivonious said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>I know that the question lacked a direct reference to the pattern but he inevitably will start to get his &quot;knickers in a twist&quot; if he does not start using it.</p>
</div></blockquote>
<p>Hm... I am still unclear... but... my XAML is almost totally separated from my code, except attaching a style and the only thing I do is to attach collections to it. Am I missing something here?</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/4a2af3f8bea4454596759dea00aa4c22#4a2af3f8bea4454596759dea00aa4c22</link>
		<pubDate>Thu, 10 Jun 2010 15:40:59 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/4a2af3f8bea4454596759dea00aa4c22#4a2af3f8bea4454596759dea00aa4c22</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">turrican said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">spivonious said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Yes, I understand, ok I'll have to test with the collection and see how it goes.</p>
<p>&nbsp;</p>
<p>On a sidenote, when doing &quot;SELECT * FROM TABLE1 ; SELECT * FROM TABLE2&quot; I can get two tables out. Is it possible to get those two in a DataSet somehow? ( bit offtopic question but I thought you might know it. )</p>
</div></blockquote>
<p>I would do a join in the SQL then populate a single&nbsp;DataTable, it's more efficient.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/57fa05f34e814a85ada59dea00aa4c2a#57fa05f34e814a85ada59dea00aa4c2a</link>
		<pubDate>Thu, 10 Jun 2010 18:26:13 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/57fa05f34e814a85ada59dea00aa4c2a#57fa05f34e814a85ada59dea00aa4c2a</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">turrican said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">vesuvius said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Hm... I am still unclear... but... my XAML is almost totally separated from my code, except attaching a style and the only thing I do is to attach collections to it. Am I missing something here?</p>
</div></blockquote>
<p>This is very very very very very good to get to grips with <a href="http://live.visitmix.com/MIX10/Sessions/EX14">
MVVM</a>.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/4f9da9828f9b4ca8ab149dea00aa4c32#4f9da9828f9b4ca8ab149dea00aa4c32</link>
		<pubDate>Thu, 10 Jun 2010 18:27:06 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/4f9da9828f9b4ca8ab149dea00aa4c32#4f9da9828f9b4ca8ab149dea00aa4c32</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">vesuvius said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">turrican said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>I would do a join in the SQL then populate a single&nbsp;DataTable, it's more efficient.</p>
</div></blockquote>
<p>I know that... but... can it be done? without the join... getting two tables from two selects at once?</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/9bb0dc8c35b54db69fde9dea00aa4c3b#9bb0dc8c35b54db69fde9dea00aa4c3b</link>
		<pubDate>Thu, 10 Jun 2010 19:53:44 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/9bb0dc8c35b54db69fde9dea00aa4c3b#9bb0dc8c35b54db69fde9dea00aa4c3b</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">vesuvius said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">turrican said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>This is very very very very very good to get to grips with <a href="http://live.visitmix.com/MIX10/Sessions/EX14">
MVVM</a>.</p>
</div></blockquote>
<p>Thanks, great video!</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/9003ad53f4854754b2e69dea00aa4c43#9003ad53f4854754b2e69dea00aa4c43</link>
		<pubDate>Thu, 10 Jun 2010 19:54:40 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/9003ad53f4854754b2e69dea00aa4c43#9003ad53f4854754b2e69dea00aa4c43</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">turrican said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">vesuvius said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>I know that... but... can it be done? without the join... getting two tables from two selects at once?</p>
</div></blockquote>
<p>If you can get two tables out of it, then you can add those tables to a dataset. But I agree with vesuvius. Modify the SQL to get what you're really after. Doing two select *s is horribly inefficient.</p>
<p>&nbsp;</p>
<p>Also, there's no point to a Dataset unless the tables are related in some way, or you want to pass them around as one object.</p>
<p>&nbsp;</p>
<p>For more on MVVM, check out Josh Smith's blog: <a href="http://joshsmithonwpf.wordpress.com/">
http://joshsmithonwpf.wordpress.com/</a>&nbsp;Personally, I think the pattern is overkill since you end up duplicating your model in the viewmodel, but it definitely makes unit testing easier.</p>
<p>&nbsp;</p>
<p>The biggest change (IMO)&nbsp;is moving from Click event handlers to Commands. It lets you ignore the details of the UI, like enabling/disabling all of the ways to save if there aren't any changes, and just focus on the action.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/9fa6dce504ff4de8b2299dea00aa4c50#9fa6dce504ff4de8b2299dea00aa4c50</link>
		<pubDate>Fri, 11 Jun 2010 12:25:05 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/9fa6dce504ff4de8b2299dea00aa4c50#9fa6dce504ff4de8b2299dea00aa4c50</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">spivonious said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">turrican said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>If you can get two tables out of it, then you can add those tables to a dataset. But I agree with vesuvius. Modify the SQL to get what you're really after. Doing two select *s is horribly inefficient.</p>
<p>&nbsp;</p>
<p>Also, there's no point to a Dataset unless the tables are related in some way, or you want to pass them around as one object.</p>
<p>&nbsp;</p>
<p>For more on MVVM, check out Josh Smith's blog: <a href="http://joshsmithonwpf.wordpress.com/">
http://joshsmithonwpf.wordpress.com/</a>&nbsp;Personally, I think the pattern is overkill since you end up duplicating your model in the viewmodel, but it definitely makes unit testing easier.</p>
<p>&nbsp;</p>
<p>The biggest change (IMO)&nbsp;is moving from Click event handlers to Commands. It lets you ignore the details of the UI, like enabling/disabling all of the ways to save if there aren't any changes, and just focus on the action.</p>
</div></blockquote>
<p>&quot;...moving from Click event handlers to Commands...&quot;</p>
<p>&nbsp;</p>
<p>Yes, that is REALLY hard for me to understand right now. Trying to find good resource on it to learn more. It's a big shift for me but a necessity to learn it I guess.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/077ef011af9447b3b95a9dea00aa4c5d#077ef011af9447b3b95a9dea00aa4c5d</link>
		<pubDate>Fri, 11 Jun 2010 14:25:49 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/077ef011af9447b3b95a9dea00aa4c5d#077ef011af9447b3b95a9dea00aa4c5d</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">turrican said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">spivonious said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>&quot;...moving from Click event handlers to Commands...&quot;</p>
<p>&nbsp;</p>
<p>Yes, that is REALLY hard for me to understand right now. Trying to find good resource on it to learn more. It's a big shift for me but a necessity to learn it I guess.</p>
</div></blockquote>
<p>Commands are very easy to understand, in MS word you have a cut/copy/paste <em>
commands</em>&nbsp; (it is a design pattern) that can be called from a toolbar button, context menu or menu option. Rather than having three seperate click events you have the notion of a command, that can be called from any place.</p>
<p>&nbsp;</p>
<p>Try get a copy of the Adam Nathan book as that is very good for people that are coming to WPF from ASP.NET or winforms. The hard part is getting to create delegate/relay commands, that video I have just linked to has all this information.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/48c61bb9d45849cc9a6e9dea00aa4c69#48c61bb9d45849cc9a6e9dea00aa4c69</link>
		<pubDate>Fri, 11 Jun 2010 14:44:38 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/48c61bb9d45849cc9a6e9dea00aa4c69#48c61bb9d45849cc9a6e9dea00aa4c69</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">vesuvius said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">turrican said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Commands are very easy to understand, in MS word you have a cut/copy/paste <em>
commands</em>&nbsp; (it is a design pattern) that can be called from a toolbar button, context menu or menu option. Rather than having three seperate click events you have the notion of a command, that can be called from any place.</p>
<p>&nbsp;</p>
<p>Try get a copy of the Adam Nathan book as that is very good for people that are coming to WPF from ASP.NET or winforms. The hard part is getting to create delegate/relay commands, that video I have just linked to has all this information.</p>
</div></blockquote>
<p>Yeah... I see.</p>
<p>&nbsp;</p>
<p>That video helped a lot. I'll try to buy a copy of his book later.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/ebebafeb79ea42e5a0639dea00aa4c75#ebebafeb79ea42e5a0639dea00aa4c75</link>
		<pubDate>Fri, 11 Jun 2010 14:55:05 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/ebebafeb79ea42e5a0639dea00aa4c75#ebebafeb79ea42e5a0639dea00aa4c75</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">turrican said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">vesuvius said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Yeah... I see.</p>
<p>&nbsp;</p>
<p>That video helped a lot. I'll try to buy a copy of his book later.</p>
</div></blockquote>
<p>Also feel free to have a look at these pretty popular&nbsp;<a href="http://ira.me.uk/category/patterns-practices/">tutorials</a> from
<em>moi</em> if you really want to know how to do this properly.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/2869cbe2eaf0421fba119dea00aa4c80#2869cbe2eaf0421fba119dea00aa4c80</link>
		<pubDate>Fri, 11 Jun 2010 15:52:20 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/2869cbe2eaf0421fba119dea00aa4c80#2869cbe2eaf0421fba119dea00aa4c80</guid>
		<dc:creator>Vesuvius</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/vesuvius/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">vesuvius said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">turrican said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Also feel free to have a look at these pretty popular&nbsp;<a href="http://ira.me.uk/category/patterns-practices/">tutorials</a> from
<em>moi</em> if you really want to know how to do this properly.</p>
</div></blockquote>
<p>Coooooooooool!</p>
<p>&nbsp;</p>
<p>One issue though, in that video... they use 3rd party libraries / DLLs ... which is not too good for me imho. I usually never use 3rd party stuff in order to not be dependant on others.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/d90b6f3c502948b181d79dea00aa4c8d#d90b6f3c502948b181d79dea00aa4c8d</link>
		<pubDate>Fri, 11 Jun 2010 19:54:28 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/d90b6f3c502948b181d79dea00aa4c8d#d90b6f3c502948b181d79dea00aa4c8d</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">turrican said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">vesuvius said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Coooooooooool!</p>
<p>&nbsp;</p>
<p>One issue though, in that video... they use 3rd party libraries / DLLs ... which is not too good for me imho. I usually never use 3rd party stuff in order to not be dependant on others.</p>
</div></blockquote>
<p>Well, any dependency you have such as .NET framework DLL's are still a dependency.. you should get over this, I don't think there's a single project I work on that doesn't use 3rd party libs of some sort.</p>
<p>&nbsp;</p>
<p>If you try and recreate everything, you'll create unfortunately inferior results (not specifically through lack of ability), that took longer to make.</p>
<p>&nbsp;</p>
<p>Like anything, the lesson is 'balance'..</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/8d44c11a63dd4c69994a9dea00aa4c97#8d44c11a63dd4c69994a9dea00aa4c97</link>
		<pubDate>Fri, 11 Jun 2010 21:57:58 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/8d44c11a63dd4c69994a9dea00aa4c97#8d44c11a63dd4c69994a9dea00aa4c97</guid>
		<dc:creator>stevo_</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/stevo_/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">stevo_ said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">turrican said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>Well, any dependency you have such as .NET framework DLL's are still a dependency.. you should get over this, I don't think there's a single project I work on that doesn't use 3rd party libs of some sort.</p>
<p>&nbsp;</p>
<p>If you try and recreate everything, you'll create unfortunately inferior results (not specifically through lack of ability), that took longer to make.</p>
<p>&nbsp;</p>
<p>Like anything, the lesson is 'balance'..</p>
</div></blockquote>
<p>The more suppliers, the more complicated, the more dependant. At some places, using more than one supplier isn't even allowed.</p>
<p>&nbsp;</p>
<p>I do not disagree that they can do things better since they specialize on it... but I still dislike using 3rd party stuff. Weird thing is that Microsoft been spending money on crappy stuff, they should gobble up some of these great libs and put it into .NET
 or something. It would help .NET and also help the people who made these things... and also benefit developers. win win win.</p>
<p>&nbsp;</p>
<p>...maybe I'm a dreamer.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/f80f109946464aff80de9dea00aa4ca6#f80f109946464aff80de9dea00aa4ca6</link>
		<pubDate>Fri, 11 Jun 2010 22:15:11 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/f80f109946464aff80de9dea00aa4ca6#f80f109946464aff80de9dea00aa4ca6</guid>
		<dc:creator>Turrican</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/turrican/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Silverlight 4 : ItemSource vs DataContext</title>
		<description><![CDATA[<p><blockquote><div class="quoteUser">turrican said:</div><div class="quoteText">
<blockquote>
<div class="quoteUser">spivonious said:</div>
<div class="quoteText">*snip*</div>
</blockquote>
<p>&quot;...moving from Click event handlers to Commands...&quot;</p>
<p>&nbsp;</p>
<p>Yes, that is REALLY hard for me to understand right now. Trying to find good resource on it to learn more. It's a big shift for me but a necessity to learn it I guess.</p>
</div></blockquote>
<p>A book that I got a lot out of is Pro WPF in C# 2008 from Apress. If you're doing SL, you may want to see if they have a book on SL, but a lot of WPF knowledge is directly applicable to SL.</p>
<p>&nbsp;</p>
<p>As far as Commands, I use Josh Smith's RelayCommand class to&nbsp;define a method for what the command should do and a method to determine if the command can be run. Then I bind an instance of that command to any object in the interface that uses it. With this
 approach it's possible to have a completely empty code-behind, which makes maintenance of the interface a lot easier because it is now completely visual. All of the functionality is contained in other classes.</p>
<p>&nbsp;</p>
<p>I tend to avoid third-party libraries too, unless I need something that I couldn't throw together myself. For me, it's easier to work with objects I designed rather than hope the library works with the specific case I need it for.</p></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/e27e3715423643dab9429dea00aa4cb2#e27e3715423643dab9429dea00aa4cb2</link>
		<pubDate>Mon, 14 Jun 2010 14:55:17 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/554974-Silverlight-4--ItemSource-vs-DataContext/e27e3715423643dab9429dea00aa4cb2#e27e3715423643dab9429dea00aa4cb2</guid>
		<dc:creator>Scott</dc:creator>
		<slash:comments>25</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/spivonious/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>