<?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 for Dr. WPF</title>
	<atom:link href="http://drwpf.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://drwpf.com/blog</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>Comment on ItemsControl: &#039;I&#039; is for Item Container by Dr. WPF</title>
		<link>http://drwpf.com/blog/2008/03/25/itemscontrol-i-is-for-item-container/comment-page-1/#comment-2984</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Mon, 30 Aug 2010 18:54:01 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=32#comment-2984</guid>
		<description>#Martin, I just tried the link and it worked for me.  Maybe the forums were down earlier.  Anyway, let me know if you continue to have trouble with the link and any specifics that might help me repro.  Thanks!</description>
		<content:encoded><![CDATA[<p>#Martin, I just tried the link and it worked for me.  Maybe the forums were down earlier.  Anyway, let me know if you continue to have trouble with the link and any specifics that might help me repro.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ItemsControl: &#039;I&#039; is for Item Container by Martin</title>
		<link>http://drwpf.com/blog/2008/03/25/itemscontrol-i-is-for-item-container/comment-page-1/#comment-2982</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Sat, 28 Aug 2010 08:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=32#comment-2982</guid>
		<description>&quot;There are actually many different ways you can view these styles, as I describe in this forum post. &quot;

The link is dead.

These articles are great.</description>
		<content:encoded><![CDATA[<p>&#8220;There are actually many different ways you can view these styles, as I describe in this forum post. &#8221;</p>
<p>The link is dead.</p>
<p>These articles are great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Can I bind my ItemsControl to a dictionary? by Brian</title>
		<link>http://drwpf.com/blog/2007/09/16/can-i-bind-my-itemscontrol-to-a-dictionary/comment-page-2/#comment-2979</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Thu, 26 Aug 2010 19:38:55 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=8#comment-2979</guid>
		<description>This solved exactly the problem I was having! Thanks for writing it.

I did have a bit of trouble for bit there as I had bound my source to Dictionary.Values, but after reading through the comments I was able to bind the source directly to the Dictionary as suggested and then change my data context to &#039;Value&#039; in the XAML and it worked like a charm.

One stumbling block I ran in to was that the ObservableSortedDictionary constructor requires an explicit IComparer object whereas the base SortedDictionary does not. Your observable version would have been a lot easier to drop in if it also used a default comparer when none is supplied.

Cheers,
Brian</description>
		<content:encoded><![CDATA[<p>This solved exactly the problem I was having! Thanks for writing it.</p>
<p>I did have a bit of trouble for bit there as I had bound my source to Dictionary.Values, but after reading through the comments I was able to bind the source directly to the Dictionary as suggested and then change my data context to &#8216;Value&#8217; in the XAML and it worked like a charm.</p>
<p>One stumbling block I ran in to was that the ObservableSortedDictionary constructor requires an explicit IComparer object whereas the base SortedDictionary does not. Your observable version would have been a lot easier to drop in if it also used a default comparer when none is supplied.</p>
<p>Cheers,<br />
Brian</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Can I bind my ItemsControl to a dictionary? by Fan</title>
		<link>http://drwpf.com/blog/2007/09/16/can-i-bind-my-itemscontrol-to-a-dictionary/comment-page-2/#comment-2978</link>
		<dc:creator>Fan</dc:creator>
		<pubDate>Thu, 26 Aug 2010 04:30:56 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=8#comment-2978</guid>
		<description>another line should be added to Deserialization constructor or the TrueDictionary will not be updated when deserializing:

_dictionaryCacheVersion = -1;</description>
		<content:encoded><![CDATA[<p>another line should be added to Deserialization constructor or the TrueDictionary will not be updated when deserializing:</p>
<p>_dictionaryCacheVersion = -1;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Can I bind my ItemsControl to a dictionary? by Fan</title>
		<link>http://drwpf.com/blog/2007/09/16/can-i-bind-my-itemscontrol-to-a-dictionary/comment-page-2/#comment-2977</link>
		<dc:creator>Fan</dc:creator>
		<pubDate>Thu, 26 Aug 2010 03:44:05 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=8#comment-2977</guid>
		<description>I think the _keyedEntryCollection assignment is missing for the Deserialization constructor that causes the deserializating failure.</description>
		<content:encoded><![CDATA[<p>I think the _keyedEntryCollection assignment is missing for the Deserialization constructor that causes the deserializating failure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ItemsControl: &#039;I&#039; is for Item Container by Scott</title>
		<link>http://drwpf.com/blog/2008/03/25/itemscontrol-i-is-for-item-container/comment-page-1/#comment-2971</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Wed, 04 Aug 2010 14:34:04 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=32#comment-2971</guid>
		<description>What if I wanted to be able to drag these characters around on the canvas and have their Locations change to reflect their position on the canvas?</description>
		<content:encoded><![CDATA[<p>What if I wanted to be able to drag these characters around on the canvas and have their Locations change to reflect their position on the canvas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Can I bind my ItemsControl to a dictionary? by Sam</title>
		<link>http://drwpf.com/blog/2007/09/16/can-i-bind-my-itemscontrol-to-a-dictionary/comment-page-2/#comment-2970</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Tue, 03 Aug 2010 16:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=8#comment-2970</guid>
		<description>Ok, well I&#039;ve programatically set the Binding on the control&#039;s Load event by building the path string based on other bound properties.

Something like:

private void Control_Loaded(object sender, RoutedEventArgs e)
{
        // MyDataItem would contain a reference to a data source and key
        // the tag is assigned to be MyDataItem created using a IMultiConverter defined in the xaml 

        MyDataItem dataItem = ((sender as FrameworkElement).Tag as MyDataItem);

        Binding b = new Binding(&quot;[&quot;+dataItem.Key+&quot;]&quot;);
        b.Source = dataItem.DataSourceWithIndexer;

        if (sender is TextBox)
        {
                (sender as TextBox).SetBinding(TextBox.TextProperty, b);
        }
}

This works, but was hoping to do this within the XAML. 

Also, is it correct to set Binding in the Load event?

Thanks again
Sam</description>
		<content:encoded><![CDATA[<p>Ok, well I&#8217;ve programatically set the Binding on the control&#8217;s Load event by building the path string based on other bound properties.</p>
<p>Something like:</p>
<p>private void Control_Loaded(object sender, RoutedEventArgs e)<br />
{<br />
        // MyDataItem would contain a reference to a data source and key<br />
        // the tag is assigned to be MyDataItem created using a IMultiConverter defined in the xaml </p>
<p>        MyDataItem dataItem = ((sender as FrameworkElement).Tag as MyDataItem);</p>
<p>        Binding b = new Binding(&#8221;["+dataItem.Key+"]&#8220;);<br />
        b.Source = dataItem.DataSourceWithIndexer;</p>
<p>        if (sender is TextBox)<br />
        {<br />
                (sender as TextBox).SetBinding(TextBox.TextProperty, b);<br />
        }<br />
}</p>
<p>This works, but was hoping to do this within the XAML. </p>
<p>Also, is it correct to set Binding in the Load event?</p>
<p>Thanks again<br />
Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Can I bind my ItemsControl to a dictionary? by Sam</title>
		<link>http://drwpf.com/blog/2007/09/16/can-i-bind-my-itemscontrol-to-a-dictionary/comment-page-2/#comment-2969</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Tue, 03 Aug 2010 15:35:09 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=8#comment-2969</guid>
		<description>apologies, submission removed content of &#039;[]&#039;, should read:

e.g. Path=&#039;.[{Binding indexerKey}]&#039;

Thanks,
Sam</description>
		<content:encoded><![CDATA[<p>apologies, submission removed content of &#8216;[]&#8216;, should read:</p>
<p>e.g. Path=&#8217;.[{Binding indexerKey}]&#8216;</p>
<p>Thanks,<br />
Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Can I bind my ItemsControl to a dictionary? by Sam</title>
		<link>http://drwpf.com/blog/2007/09/16/can-i-bind-my-itemscontrol-to-a-dictionary/comment-page-2/#comment-2968</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Tue, 03 Aug 2010 15:33:43 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=8#comment-2968</guid>
		<description>Hi Dr WPF/All,

Does anybody know or can tell me a way of binding to a dictionary using a dynamic key.

e.g. Path = &quot;.[]&quot;

I&#039;ve used your (Dr WPF) ObjectReference class in combination with the controls tag property to hold the key info, I&#039;ve also tried MultiBinding.

The problem i have is converting back, unless the path can be set dynamically (which is difficult not being a dp) I have to update the data source (indexer) from within the converter which is obviously wrong and bypasses validation.

Has anyone got any ideas?

TIA
Sam</description>
		<content:encoded><![CDATA[<p>Hi Dr WPF/All,</p>
<p>Does anybody know or can tell me a way of binding to a dictionary using a dynamic key.</p>
<p>e.g. Path = &#8220;.[]&#8221;</p>
<p>I&#8217;ve used your (Dr WPF) ObjectReference class in combination with the controls tag property to hold the key info, I&#8217;ve also tried MultiBinding.</p>
<p>The problem i have is converting back, unless the path can be set dynamically (which is difficult not being a dp) I have to update the data source (indexer) from within the converter which is obviously wrong and bypasses validation.</p>
<p>Has anyone got any ideas?</p>
<p>TIA<br />
Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Can my value converter access the target of the binding? by Geish</title>
		<link>http://drwpf.com/blog/2007/08/18/can-my-value-converter-access-the-target-of-the-binding/comment-page-1/#comment-2954</link>
		<dc:creator>Geish</dc:creator>
		<pubDate>Sun, 04 Jul 2010 10:19:55 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=2#comment-2954</guid>
		<description>How could you recover the targetObject in the ConvertBack call?</description>
		<content:encoded><![CDATA[<p>How could you recover the targetObject in the ConvertBack call?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
