<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>A Comparable DataTrigger</title><link>http://blogs.msdn.com/mikehillberg/archive/2008/09/30/ComparableDataTrigger.aspx</link><description>Property triggers today only check for equality. We’d like to add support for other comparison operators, but that hasn’t happened yet. But I needed them for a project, and wrote a workaround for it. It’s a bit hacky in a couple of places, but if you</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>  A Comparable DataTrigger : EasyCoded</title><link>http://blogs.msdn.com/mikehillberg/archive/2008/09/30/ComparableDataTrigger.aspx#8969960</link><pubDate>Tue, 30 Sep 2008 10:22:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8969960</guid><dc:creator>  A Comparable DataTrigger : EasyCoded</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.easycoded.com/a-comparable-datatrigger/"&gt;http://www.easycoded.com/a-comparable-datatrigger/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Comparable DataTriggers in WPF</title><link>http://blogs.msdn.com/mikehillberg/archive/2008/09/30/ComparableDataTrigger.aspx#8979155</link><pubDate>Tue, 07 Oct 2008 01:41:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8979155</guid><dc:creator>TrackBack</dc:creator><description>&lt;p&gt;Do you work with databindings in WPF and find that you have ever wanted to do this?? &amp;amp;lt;DataTrigger Binding=&amp;quot;{l:ComparisonBinding Age, LT, 65}&amp;quot; Value=&amp;quot;{x:Null}&amp;quot; &amp;amp;gt; One of the most requested WPF features is the ability to do comparisons in a databinding.&lt;/p&gt;
</description></item><item><title>Comparable DataTriggers in WPF</title><link>http://blogs.msdn.com/mikehillberg/archive/2008/09/30/ComparableDataTrigger.aspx#8979161</link><pubDate>Tue, 07 Oct 2008 01:41:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8979161</guid><dc:creator>TrackBack</dc:creator><description>&lt;p&gt;Do you work with databindings in WPF and find that you have ever wanted to do this?? &amp;amp;lt;DataTrigger Binding=&amp;quot;{l:ComparisonBinding Age, LT, 65}&amp;quot; Value=&amp;quot;{x:Null}&amp;quot; &amp;amp;gt; One of the most requested WPF features is the ability to do comparisons in a databinding.&lt;/p&gt;
</description></item><item><title>re: A Comparable DataTrigger</title><link>http://blogs.msdn.com/mikehillberg/archive/2008/09/30/ComparableDataTrigger.aspx#8988775</link><pubDate>Wed, 08 Oct 2008 02:49:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8988775</guid><dc:creator>johnzabroski</dc:creator><description>&lt;p&gt;I do something similar in my code, but my implementation is superior (sorry, you are &amp;quot;Doing It Wrong&amp;quot;, Mike). &amp;nbsp;1) Your ComparisonBinding has an arity of two. 2) You don't explain how you deal with three-valued logic (a major problem with WPF's current Binding story, you guys pretend like the problem doesn't even exist) 3) You can't compare sets (where is the Strategy pattern for introducing my own Comparator? &amp;nbsp;That hard-coded enumeration is silly, and brittle and will result in client bugs)&lt;/p&gt;
&lt;p&gt;I saw Josh Smith and Brennon Williams complaining about this on the WPF Disciples mailing list, and they are just plain wrong. &amp;nbsp;I agree people should be complaining about this, but they are complaining for the wrong reasons. &amp;nbsp;Don't listen to them.&lt;/p&gt;
&lt;p&gt;The only point Josh/Brennon have is tooling support. &amp;nbsp; I've already stopped waiting on Cider. I just couldn't understand what was taking so long, so I chose to build my own. &amp;nbsp;Unfortunately, my solution makes heavy use of a large MarkupExtension library, and I can't use it for SL2. &amp;nbsp;(I've complained about this on the SL2 forums before, pronouncing the XAML Silverlight data format to be &amp;quot;XAML without the X&amp;quot;.)&lt;/p&gt;
</description></item><item><title>re: A Comparable DataTrigger</title><link>http://blogs.msdn.com/mikehillberg/archive/2008/09/30/ComparableDataTrigger.aspx#8988871</link><pubDate>Wed, 08 Oct 2008 03:03:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8988871</guid><dc:creator>johnzabroski</dc:creator><description>&lt;p&gt;Also, to drill home the point, your sample code for that ValueConverter object is brittle. &amp;nbsp;Storing &amp;quot;back references&amp;quot; in ValueConverter objects is a huge hack (in fact, it will not pass a code review for my project), and I feel sorry for the person who has to maintain that code long term. &amp;nbsp;Nothing is more fungible than user interface requirements - nothing! &amp;nbsp;Plan for change.&lt;/p&gt;
&lt;p&gt;I just don't want people getting the wrong idea on this. &amp;nbsp;I saw Josh and Brennon upset about this, but felt it was for totally wrong reasons. &amp;nbsp;Rather than criticize your strategy, I am merely criticizing your tactics. &amp;nbsp;The idea is good, but the implementation is anti-exemplary.&lt;/p&gt;
&lt;p&gt;Moreover, my only &amp;quot;strategy&amp;quot; criticism is this: it's a really bad idea to keep adding subclasses to Binding when clients cannot extend it for themselves. &amp;nbsp;You should open up Binding first, let the community contribute their own extensions to solve the problem. &amp;nbsp;Actually, I wish I had further access to BindingBase, because MultiBinding and Binding interfaces simply are not that well designed (I had to come up with a kludge workaround to this similar to M. Orcun Topdagi's fix:Binding kludge).&lt;/p&gt;
</description></item><item><title>re: A Comparable DataTrigger</title><link>http://blogs.msdn.com/mikehillberg/archive/2008/09/30/ComparableDataTrigger.aspx#9191934</link><pubDate>Wed, 10 Dec 2008 21:28:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9191934</guid><dc:creator>Nullable</dc:creator><description>&lt;p&gt;Good stuff... except returning &amp;quot;null&amp;quot; / &amp;quot;non-null&amp;quot; is pretty lame :) Why not do &amp;quot;True&amp;quot; and &amp;quot;False&amp;quot;. Then &amp;quot;remembering to set to null&amp;quot; won't be necessary ethter, but rather your 'converter' will simply convert to True if matched, and False if not.&lt;/p&gt;
&lt;p&gt;Other than that... good work :)&lt;/p&gt;
</description></item></channel></rss>